summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorlhchavez <lhchavez@lhchavez.com>2020-06-28 15:51:43 -0700
committerlhchavez <lhchavez@lhchavez.com>2020-07-09 15:13:34 -0700
commit6a917c0439b95ec1d9a028b440648449c420155f (patch)
treeecfb99d2389d57ba6107156b612d07dcc1775510 /script
parent325375e3b6c2c31152b7ee48794aa6a1f73709d5 (diff)
downloadlibgit2-6a917c0439b95ec1d9a028b440648449c420155f.tar.gz
Add CI support for Memory and UndefinedBehavior Sanitizers
This change adds two new build targets: MSan and UBSan. This is because even though OSS-Fuzz is great and adds a lot of coverage, it only does that for the fuzz targets, so the rest of the codebase is not necessarily run with the Sanitizers ever :( So this change makes sure that MSan/UBSan warnings don't make it into the codebase. As part of this change, the Ubuntu focal container is introduced. It builds mbedTLS and libssh2 as debug libraries into /usr/local and as MSan-enabled libraries into /usr/local/msan. This latter part is needed because MSan requires the binary and all its dependent libraries to be built with MSan support so that memory allocations and deallocations are tracked correctly to avoid false positives.
Diffstat (limited to 'script')
-rw-r--r--script/sanitizers.supp4
1 files changed, 4 insertions, 0 deletions
diff --git a/script/sanitizers.supp b/script/sanitizers.supp
new file mode 100644
index 000000000..4e0e9be83
--- /dev/null
+++ b/script/sanitizers.supp
@@ -0,0 +1,4 @@
+[undefined]
+# This library allows unaligned access on Intel-like processors. Prevent UBSan
+# from complaining about that.
+fun:sha1_compression_states