diff options
author | Sverker Eriksson <sverker@erlang.org> | 2020-12-03 11:27:48 +0100 |
---|---|---|
committer | Sverker Eriksson <sverker@erlang.org> | 2020-12-18 18:46:22 +0100 |
commit | 856dfc2c90896b10711b1bbf99e27cd167e3958d (patch) | |
tree | 1225f14a75d1d1852dafbce79c021f3f2b61cdde /erts/etc/unix/cerl.src | |
parent | fbb59d4c0e89b4a07e119a98d62e421c24406f00 (diff) | |
download | erlang-856dfc2c90896b10711b1bbf99e27cd167e3958d.tar.gz |
Produce nice asan logs
Support in cerl, test_server, erlang:system_info({memory_checker,_})
and a new escript asan_logs_to_html.
Diffstat (limited to 'erts/etc/unix/cerl.src')
-rw-r--r-- | erts/etc/unix/cerl.src | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/erts/etc/unix/cerl.src b/erts/etc/unix/cerl.src index ea9f8a7978..3889308a67 100644 --- a/erts/etc/unix/cerl.src +++ b/erts/etc/unix/cerl.src @@ -278,6 +278,28 @@ if [ $skip_erlexec = yes ]; then set -- $beam_args IFS="$SAVE_IFS" fi +if [ $run_asan = yes ]; then + # Leak sanitizer options + if [ "x${LSAN_OPTIONS#*suppressions=}" = "x$LSAN_OPTIONS" ]; then + export LSAN_OPTIONS + if [ "x$ERL_TOP" != "x" ]; then + LSAN_OPTIONS="$LSAN_OPTIONS:suppressions=$ERL_TOP/erts/emulator/asan/suppress" + else + echo "No leak-sanitizer suppression file found in \$LSAN_OPTIONS" + echo "and \$ERL_TOP not set." + fi + fi + # Address sanitizer options + export ASAN_OPTIONS + if [ "x$ASAN_LOG_DIR" != "x" ]; then + if [ "x${ASAN_OPTIONS#*log_path=}" = "x$ASAN_OPTIONS" ]; then + ASAN_OPTIONS="$ASAN_OPTIONS:log_path=$ASAN_LOG_DIR/$EMU_NAME-$ASAN_LOGFILE_PREFIX-0" + fi + fi + if [ "x${ASAN_OPTIONS#*halt_on_error=}" = "x$ASAN_OPTIONS" ]; then + ASAN_OPTIONS="$ASAN_OPTIONS:halt_on_error=false" + fi +fi if [ "x$GDB" = "x" ]; then if [ $run_valgrind = yes ]; then valversion=`valgrind --version` |