Merge remote-tracking branch 'origin/use-memsan' into integration_2023_w28

This commit is contained in:
Robert Schmidt
2023-07-13 19:19:15 +02:00
8 changed files with 105 additions and 27 deletions
+9
View File
@@ -155,6 +155,10 @@ Options:
Enable the address sanitizer on all targets
--sanitize-undefined | -fsanitize=undefined
Enable the undefined behavior sanitizer on all targets
--sanitize-memory | -fsanitize=memory
Enable the memory sanitizer on all targets. Requires clang, and is
incompatible with ASan/UBSan. To build, issue:
CC=/usr/bin/clang CXX=/usr/bin/clang++ ./build_oai ... --sanitize-memory
-h | --help
Print this help"
}
@@ -407,6 +411,11 @@ function main() {
--sanitize-undefined | -fundefined=address)
CMAKE_CMD="$CMAKE_CMD -DSANITIZE_UNDEFINED=True"
shift;;
--sanitize-memory | -fsanitize=memory)
echo_warning "Note: memory sanitizer\n* requires clang (tested: v17)\n* is incompatible with address/undefined behavior sanitizer\n* requires cmake_targets/tools/memsan.patch"
sleep 2
CMAKE_CMD="$CMAKE_CMD -DSANITIZE_MEMORY=ON -DSANITIZE_ADDRESS=OFF -DSANITIZE_UNDEFINED=OFF"
shift;;
-h | --help)
print_help
exit 1;;