diff options
author | Tom Kelly <ctk21@cl.cam.ac.uk> | 2021-03-05 12:07:19 +0000 |
---|---|---|
committer | Tom Kelly <ctk21@cl.cam.ac.uk> | 2021-03-05 12:07:19 +0000 |
commit | f72387096692b6b2f016c15bc7313104aac64891 (patch) | |
tree | e9fd49e3aa3e43a3e4357bc8f2226cf6069397dc /tools | |
parent | c03f7363132479c69aa8016a6ab3400c7548e17f (diff) | |
parent | 5da188b3ff468695681800b1a01191daef6dac0e (diff) | |
download | ocaml-f72387096692b6b2f016c15bc7313104aac64891.tar.gz |
Merge commit '5da188b3ff468695681800b1a01191daef6dac0e' into parallel_minor_gc_4_12
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/ci/inria/extra-checks | 62 |
1 files changed, 24 insertions, 38 deletions
diff --git a/tools/ci/inria/extra-checks b/tools/ci/inria/extra-checks index 6412503928..fc929d46d6 100755 --- a/tools/ci/inria/extra-checks +++ b/tools/ci/inria/extra-checks @@ -48,17 +48,11 @@ arch_error() { error "$msg" } -# Change a variable in Makefile.config -# Usage: set_config_var <variable name> <new value> - +######################################################################### -set_config_var() { - conffile=Makefile.config - mv ${conffile} ${conffile}.bak - (grep -v "^$1=" ${conffile}.bak; echo "$1=$2") > ${conffile} -} +# Print each command before its execution +set -x -######################################################################### # stop on error set -e @@ -106,7 +100,7 @@ else run_testsuite="$make -C testsuite all" fi -# A tool that make error backtrace nicer +# A tool that makes error backtraces nicer # Need to pick the one that matches clang-9 and is named "llvm-symbolizer" # (/usr/bin/llvm-symbolizer-9 doesn't work, that would be too easy) export ASAN_SYMBOLIZER_PATH=/usr/lib/llvm-9/bin/llvm-symbolizer @@ -147,10 +141,6 @@ echo "======== clang 9, address sanitizer, UB sanitizer ==========" git clean -q -f -d -x # Use clang 9 -# We cannot give the sanitizer options as part of -cc because -# then various autoconfiguration tests fail. -# Instead, we'll fix OC_CFLAGS a posteriori. -./configure CC=clang-9 --disable-stdlib-manpages --enable-dependency-generation # These are the undefined behaviors we want to check # Others occur on purpose e.g. signed arithmetic overflow @@ -168,12 +158,14 @@ shift-exponent,\ unreachable" # Select address sanitizer and UB sanitizer, with trap-on-error behavior +sanitizers="-fsanitize=address -fsanitize-trap=$ubsan" + # Don't optimize too much to get better backtraces of errors -set_config_var OC_CFLAGS "-O1 \ --fno-strict-aliasing -fwrapv -fno-omit-frame-pointer \ --Wall -Werror \ --fsanitize=address \ --fsanitize-trap=$ubsan" + +./configure \ + CC=clang-9 \ + CFLAGS="-O1 -fno-omit-frame-pointer $sanitizers" \ + --disable-stdlib-manpages --enable-dependency-generation # Build the system. We want to check for memory leaks, hence # 1- force ocamlrun to free memory before exiting @@ -181,7 +173,7 @@ set_config_var OC_CFLAGS "-O1 \ OCAMLRUNPARAM="c=1" \ LSAN_OPTIONS="suppressions=$(pwd)/tools/ci/inria/lsan-suppr.txt" \ -make $jobs world.opt +make $jobs # Run the testsuite. # We deactivate leak detection for two reasons: @@ -201,17 +193,16 @@ echo "======== clang 9, thread sanitizer ==========" git clean -q -f -d -x -./configure CC=clang-9 --disable-stdlib-manpages --enable-dependency-generation - # Select thread sanitizer # Don't optimize too much to get better backtraces of errors -set_config_var OC_CFLAGS "-O1 \ --fno-strict-aliasing -fwrapv -fno-omit-frame-pointer \ --Wall -Werror \ --fsanitize=thread" + +./configure \ + CC=clang-9 \ + CFLAGS="-O1 -fno-omit-frame-pointer -fsanitize=thread" \ + --disable-stdlib-manpages --enable-dependency-generation # Build the system -make $jobs world.opt +make $jobs # Run the testsuite. # ThreadSanitizer complains about fork() in threaded programs, @@ -230,24 +221,19 @@ TSAN_OPTIONS="die_after_fork=0" $run_testsuite # git clean -q -f -d -x # # Use clang 6.0 -# # We cannot give the sanitizer options as part of -cc because -# # then various autoconfiguration tests fail. -# # Instead, we'll fix OC_CFLAGS a posteriori. # # Memory sanitizer doesn't like the static data generated by ocamlopt, # # hence build bytecode only -# ./configure CC=clang-9 --disable-native-compiler - # # Select memory sanitizer # # Don't optimize at all to get better backtraces of errors -# set_config_var OC_CFLAGS "-O0 -g \ -# -fno-strict-aliasing -fwrapv -fno-omit-frame-pointer \ -# -Wall -Werror \ -# -fsanitize=memory" -# # A tool that make error backtrace nicer +# ./configure \ +# CC=clang-9 \ +# CFLAGS="-O0 -g -fno-omit-frame-pointer -fsanitize=memory" \ +# --disable-native-compiler +# # A tool that makes error backtraces nicer # # Need to pick the one that matches clang-6.0 # export MSAN_SYMBOLIZER_PATH=/usr/lib/llvm-6.0/bin/llvm-symbolizer # # Build the system (bytecode only) and test -# make $jobs world +# make $jobs # $run_testsuite |