[PATCH] D61070: [libFuzzer] Enable on i386

Kostya Serebryany via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 25 18:01:01 PDT 2019


kcc removed a reviewer: kcc.
kcc added a comment.

Matt, please take a look.



================
Comment at: compiler-rt/test/fuzzer/fork.test:15
+# access-violation is the error thrown on Windows. Address will be smaller on i386.
+CRASH: {{SEGV|access-violation}} on unknown address {{0x000000000000|0x00000000}}
 RUN: %cpp_compiler %S/ShallowOOMDeepCrash.cpp -o %t-ShallowOOMDeepCrash
----------------
no need for a regex, just remove extra zeroes. 


================
Comment at: compiler-rt/test/fuzzer/lit.cfg:28
 
-# LeakSanitizer is not supported on OSX or Windows right now.
+# LeakSanitizer is not supported on OSX, Windows, or i386 right now.
 if (sys.platform.startswith('darwin') or
----------------
That's not true: 

% clang++ -m32  -fsanitize=address ~/misc-c/leak.cc  && ./a.out 

=================================================================
==132478==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 4 byte(s) in 1 object(s) allocated from:
    #0 0x810cf89 in operator new(unsigned int) /usr/local/google/home/kcc/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:105:3
    #1 0x8063e01 in __cxx_global_var_init (/usr/local/google/home/kcc/llvm-build/a.out+0x8063e01)
    #2 0x8063e68 in _GLOBAL__sub_I_leak.cc (/usr/local/google/home/kcc/llvm-build/a.out+0x8063e68)
    #3 0x810f63a in __libc_csu_init (/usr/local/google/home/kcc/llvm-build/a.out+0x810f63a)

SUMMARY: AddressSanitizer: 4 byte(s) leaked in 1 allocation(s).



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61070





More information about the llvm-commits mailing list