[Bug sanitizer/58937] Preloaded libasan segfaults on unsanitized executables

y.gribov at samsung dot com gcc-bugzilla@gcc.gnu.org
Thu Nov 14 10:48:00 GMT 2013


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)



More information about the Gcc-bugs mailing list