Added exitcode=0 to ASan and HWASan options 93/263493/3
authorAndrey Kazmin <a.kazmin@partner.samsung.com>
Fri, 9 Jul 2021 10:17:47 +0000 (13:17 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Fri, 10 Sep 2021 11:56:04 +0000 (11:56 +0000)
It's needed to prevent a sanitized program exit code override
in case of ASan/HWASan error

Change-Id: I00acb504fee8bf295f581d059a907f56de9f1e63
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
packaging/gcc-contrib.spec

index 0e28c46..7e9bdff 100644 (file)
 %define ubsan_force_options -fsanitize=undefined,bounds-strict,float-divide-by-zero,float-cast-overflow
 %define tsan_force_options -fsanitize=thread -fno-omit-frame-pointer -Wp,-U_FORTIFY_SOURCE -Wl,--as-needed -ldl -lpthread
 %define gcov_force_options -fprofile-arcs -ftest-coverage
-%define asan_runtime_options halt_on_error=false:start_deactivated=true:print_cmdline=true:quarantine_size_mb=1:detect_leaks=0:full_address_space=true:handle_segv=0:log_path=/tmp/asan.log:log_exe_name=1:fast_unwind_on_fatal=1:allocator_may_return_null=1
+%define asan_runtime_options halt_on_error=false:start_deactivated=true:print_cmdline=true:quarantine_size_mb=1:detect_leaks=0:full_address_space=true:handle_segv=0:log_path=/tmp/asan.log:log_exe_name=1:fast_unwind_on_fatal=1:allocator_may_return_null=1:exitcode=0
 %define ubsan_runtime_options print_cmdline=true:log_path=/tmp/ubsan.log
 %define lsan_runtime_options print_cmdline=true:detect_leaks=1:log_path=/tmp/lsan.log:log_exe_name=1:fast_unwind_on_malloc=false:malloc_context_size=5:suppressions=/lsan.supp:print_suppressions=false
 %define tsan_runtime_options print_cmdline=true:log_path=/tmp/tsan.log:detect_deadlocks=1:second_deadlock_stack=1
-
 %define hwasan_force_options -fsanitize=hwaddress -fsanitize-recover=hwaddress -Wp,-U_FORTIFY_SOURCE -Wl,--as-needed -ldl -lpthread
-%define hwasan_runtime_options halt_on_error=false:print_cmdline=true:handle_segv=0:log_path=/tmp/hwasan.log:log_exe_name=1
+%define hwasan_runtime_options halt_on_error=false:print_cmdline=true:handle_segv=0:log_path=/tmp/hwasan.log:log_exe_name=1:exitcode=0
 
 Name:         gcc-contrib%{?cross:-%{cross}}
 # With generated files in src we could drop the following