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.
This commit is contained in:
lhchavez
2020-06-28 15:51:43 -07:00
parent 325375e3b6
commit 6a917c0439
4 changed files with 138 additions and 8 deletions

4
script/sanitizers.supp Normal file
View File

@@ -0,0 +1,4 @@
[undefined]
# This library allows unaligned access on Intel-like processors. Prevent UBSan
# from complaining about that.
fun:sha1_compression_states