]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: allow sanitized binaries to dump a core 30774/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 4 Jan 2024 19:31:32 +0000 (20:31 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 4 Jan 2024 19:36:25 +0000 (20:36 +0100)
If a binary built with ASan crashes for a reason unrelated to ASan
stuff, we're left with pretty much nothing, as there is neither an ASan
trace nor a coredump. Let's make this slightly more debug-able by
allowing such binaries to dump a core, but without the huge shadow map
(we should be actually fine by just setting disable_coredump=0, since
use_madv_dontdump defaults to true, but let's play it safe and not
potentially dump a 16+ TB core file).

test/test-functions

index c543100654993f2ca7066cf9fd94def5412219a1..016cf156827efd69ffff16b9adabdd091a736df4 100644 (file)
@@ -995,7 +995,7 @@ create_asan_wrapper() {
 
     [[ -z "$ASAN_RT_PATH" ]] && dfatal "ASAN_RT_PATH is empty, but it shouldn't be"
 
-    default_asan_options="${ASAN_OPTIONS:-strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1}"
+    default_asan_options="${ASAN_OPTIONS:-strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:disable_coredump=0:use_madv_dontdump=1}"
     default_ubsan_options="${UBSAN_OPTIONS:-print_stacktrace=1:print_summary=1:halt_on_error=1}"
 
     if [[ "$ASAN_COMPILER" == "clang" ]]; then