Enable LLVM asan sanitizer for NetBSD/amd64.
Don't generate -ldl for dlopen(3)-like functions on NetBSD.
These features are available in libc on NetBSD.
Sponsored by <The NetBSD Foundation>
Differential D34960
Enable LLVM asan support for NetBSD/amd64 krytarowski on Jul 3 2017, 11:06 AM. Authored by
Details Enable LLVM asan sanitizer for NetBSD/amd64. Don't generate -ldl for dlopen(3)-like functions on NetBSD. Sponsored by <The NetBSD Foundation>
Diff Detail
Event TimelineComment Actions $ cat /tmp/test.cpp #include <stdio.h> int main(int argc, char **argv) { int *array = new int[100]; delete [] array; return array[argc]; } $ /usr/pkg/bin/clang++ -fsanitize=address test.cpp -g $ ./a.out ASAN:DEADLYSIGNAL ================================================================= ==13051==ERROR: AddressSanitizer: SEGV on unknown address 0x1c2800000008 (pc 0x00000047db6a bp 0x7f7fff366770 sp 0x7f7fff366740 T0) ==13051==The signal is caused by a READ memory access. #0 0x47db69 in main /tmp/test.cpp:8:9 #1 0x4095ea in ___start (/tmp/a.out+0x4095ea) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /tmp/test.cpp:8:9 in main ==13051==ABORTING |