[PATCH] D20461: [LibFuzzer] Fix sending SIGALRM to main thread under Mac OSX
Dan Liew via llvm-commits
llvm-commits at lists.llvm.org
Thu May 19 22:52:05 PDT 2016
delcypher added a comment.
@kcc
> This may be solved by printing and Exiting_ in the getrusage thread --
the only question is how to avoid the race on CurrentUnitData/CurrentUnitSize w/o having to use a Mutex.
> Want to try this?
I'll take a look tomorrow. I need to first take a look at how `CurrentUnitData` and `CurrentUnitSize` are being used and consequently where they need to locked.
Just a thought. Why not just be single threaded and call `getrusage()` after every iteration of `LLVMFuzzerTestOneInput(...)`? It will mean for long running and non-terminating runs of `LLVMFuzzerTestOneInput(...)` we might not (or ever) detect OOM but it would avoid the complexity and the races. Personally I feel like detecting OOM should really be done externally using something like cgroups, but maybe that's a bad idea.
http://reviews.llvm.org/D20461
More information about the llvm-commits
mailing list