On 15.07.2018 23:08, Kamil Rytarowski wrote: > On 15.07.2018 19:24, Andreas Gustafsson wrote: >> The NetBSD Test Fixture wrote: >>> The newly failing test cases are: >>> >>> usr.bin/c++/t_asan_double_free:double_free_profile >>> usr.bin/c++/t_asan_global_buffer_overflow:global_buffer_overflow_profile >>> usr.bin/c++/t_asan_heap_overflow:heap_overflow_profile >>> usr.bin/c++/t_asan_off_by_one:off_by_one_profile >>> usr.bin/c++/t_asan_uaf:uaf_profile >>> usr.bin/c++/t_cxxruntime:cxxruntime_pic_profile >>> usr.bin/c++/t_cxxruntime:cxxruntime_profile >>> usr.bin/c++/t_hello:hello_pic_profile >>> usr.bin/c++/t_hello:hello_profile >>> usr.bin/c++/t_static_destructor:static_destructor_pic_profile >>> usr.bin/c++/t_static_destructor:static_destructor_profile >>> usr.bin/c++/t_ubsan_int_add_overflow:int_add_overflow_profile >>> usr.bin/c++/t_ubsan_int_divzero:int_divzero_profile >>> usr.bin/c++/t_ubsan_int_neg_overflow:int_neg_overflow_profile >>> usr.bin/c++/t_ubsan_int_sub_overflow:int_sub_overflow_profile >>> usr.bin/c++/t_ubsan_vla_out_of_bounds:vla_out_of_bounds_profile >>> usr.bin/cc/t_asan_double_free:double_free_profile >>> usr.bin/cc/t_asan_global_buffer_overflow:global_buffer_overflow_profile >>> usr.bin/cc/t_asan_heap_overflow:heap_overflow_profile >>> usr.bin/cc/t_asan_off_by_one:off_by_one_profile >>> usr.bin/cc/t_asan_uaf:uaf_profile >> >> This has now been narrowed down to the following commit: >> >>> 2018.07.13.19.50.21 joerg src/lib/libc/tls/tls.c,v 1.9 >> >> The amd64 port is also affected. >> >> Error messages from the first test failure: >> >> /usr/lib/libc.so.12: warning: warning: __findenv is an internal obsolete function. >> Fail: regexp heap-use-after-free not in stderr >> ASAN:DEADLYSIGNAL >> ================================================================= >> ==15023==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000 (pc 0x080508a3 bp 0xbfbfe8bc sp 0xbfbfe870 T0) >> #0 0x80508a2 in dl_iterate_phdr (/tmp/atf-run.zD2uwg/./test+0x80508a2) >> #1 0x8050f25 in __libc_static_tls_setup (/tmp/atf-run.zD2uwg/./test+0x8050f25) >> #2 0x807430c in _libc_init (/tmp/atf-run.zD2uwg/./test+0x807430c) >> #3 0xbb33d2a7 (/usr/lib/libc.so.12+0x292a7) >> #4 0xbbaee693 (<unknown module>) >> >> AddressSanitizer can not provide additional info. >> SUMMARY: AddressSanitizer: SEGV (/tmp/atf-run.zD2uwg/./test+0x80508a2) in dl_iterate_phdr >> ==15023==ABORTING >> > > I'm upgrading and I will have a look. > The change by Joerg looks fine. Clang (7.0svn) works with asan + -pg (assuming that it does something with gprof), GCC from base breaks for unknown reason. I've reproduced the failure locally... however -pg is known (to me) to be faulty (also without sanitizers involved) -- e.g. std::call_once tests were failing in narrow cases. There were lately some new fixes to gprof + asan: https://sourceware.org/bugzilla/show_bug.cgi?id=23055 Usage of gprof with asan is untypical as there are dedicated tools for code coverage for sanitizers. I will disable these tests for now until we will upgrade to newer GNU toolchain. Besides that GCC uses -shared-libasan by default, while Clang uses -static-libasan. All users are recommended to use -static-libasan with sanitizers., but it's not supported with the base GCC. I've been not working on -shared-libasan version in Clang and there are some bugs left with dlopen(3)-related interfaces.
Attachment:
signature.asc
Description: OpenPGP digital signature