[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

Matt Morehouse via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 15 10:36:49 PDT 2020


morehouse added a comment.

I applied this patch locally and ran the fuzzer tests.  I get a segfault:

  $ clang++ -fsanitize=fuzzer -g -m32 SimpleHashTest.cpp
  $ gdb --args ./a.out -seed=1
  ...
  (gdb) run
  ...
  Program received signal SIGSEGV, Segmentation fault. 
  0x00000000 in ?? ()
  (gdb) bt
  #0  0x00000000 in ?? ()
  #1  0x080800b5 in strstr () at /usr/local/google/home/mascasa/code/llvm-project/compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp:96
  #2  0xf7cc7bf5 in __pthread_initialize_minimal () from /lib/i386-linux-gnu/libpthread.so.0
  #3  0xf7cc7014 in _init () from /lib/i386-linux-gnu/libpthread.so.0
  #4  0x00000055 in ?? ()
  #5  0xf7fcc6a0 in ?? ()

It looks like the `REAL(strstr)` isn't set up before it's called.  Could you please take a look?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83494/new/

https://reviews.llvm.org/D83494





More information about the cfe-commits mailing list