This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/58937] Preloaded libasan segfaults on unsanitized executables
- From: "y.gribov at samsung dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 14 Nov 2013 10:48:04 +0000
- Subject: [Bug sanitizer/58937] Preloaded libasan segfaults on unsanitized executables
- Auto-submitted: auto-generated
- References: <bug-58937-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58937
--- Comment #11 from Yury Gribov <y.gribov at samsung dot com> ---
(In reply to Evgeniy Stepanov from comment #10)
> We don't intercept signal() on Android
This is just an implementation detail, this fails just as well:
$ cat repro.c
#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
int main() {
jmp_buf env;
int val = setjmp (env);
if (val)
exit (val);
longjmp (env,101);
return 0;
}
$ gcc -g repro.c
$ LD_PRELOAD=/home/ygribov/install/gcc-master/lib64/libasan.so.0 ./a.out
==11784== Sanitizer CHECK failed:
/home/ygribov/gcc/gcc-master/libsanitizer/asan/asan_posix.cc:107
((tsd_key_inited)) != (0) (0, 0)