Created
December 31, 2022 22:34
-
-
Save azat/af073e57a248e04488b21068643f079e to your computer and use it in GitHub Desktop.
ASan does not work with glibc 2.36+
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <pthread.h> | |
int main() | |
{ | |
// something broken in ASan in interceptor for __pthread_mutex_lock | |
// and only since glibc 2.36, and for pthread_mutex_lock everything is OK | |
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; | |
return __pthread_mutex_lock(&mutex); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ clang -g3 -o test-asan test-asan.cpp -fsanitize=address | |
$ ./test-asan | |
AddressSanitizer:DEADLYSIGNAL | |
================================================================= | |
==15659==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000000000 bp 0x7fffffffccb0 sp 0x7fffffffcb98 T0) | |
==15659==Hint: pc points to the zero page. | |
==15659==The signal is caused by a READ memory access. | |
==15659==Hint: address points to the zero page. | |
#0 0x0 (<unknown module>) | |
#1 0x7ffff7cda28f (/usr/lib/libc.so.6+0x2328f) (BuildId: 1e94beb079e278ac4f2c8bce1f53091548ea1584) | |
AddressSanitizer can not provide additional info. | |
SUMMARY: AddressSanitizer: SEGV (<unknown module>) | |
==15659==ABORTING |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://sourceware.org/git/?p=glibc.git;a=commit;h=efa7936e4c91b1c260d03614bb26858fbb8a0204