diff options
author | Dan Liew <dan@su-root.co.uk> | 2016-08-12 18:29:36 +0000 |
---|---|---|
committer | Dan Liew <dan@su-root.co.uk> | 2016-08-12 18:29:36 +0000 |
commit | ed3c9cae4972099135982093d40301f7d96fa3b4 (patch) | |
tree | 0a9af3f830bb1230450d59a0341a04c819d9d3b5 /llvm/lib/Object/MachOObjectFile.cpp | |
parent | b7abde0343e1042fec643faca571882e3fc133b7 (diff) | |
download | llvm-ed3c9cae4972099135982093d40301f7d96fa3b4.zip llvm-ed3c9cae4972099135982093d40301f7d96fa3b4.tar.gz llvm-ed3c9cae4972099135982093d40301f7d96fa3b4.tar.bz2 |
[LibFuzzer] Fix `-jobs=<N>` where <N> > 1 and the number of workers is > 1 on macOS.
The original `ExecuteCommand()` called `system()` from the C library.
The C library implementation of this on macOS contains a mutex which
serializes calls to `system()`. This prevented the `-jobs=` flag
from running copies of the fuzzing binary in parallel which is
the opposite of what is intended.
To fix this on macOS an alternative implementation of `ExecuteCommand()`
is provided that can be used concurrently. This is provided in
`FuzzerUtilDarwin.cpp` which is guarded to only compile code on Apple
platforms. The existing implementation has been moved to a new file
`FuzzerUtilLinux.cpp` which is guarded to only compile code on Linux.
This commit includes a simple test to check that LibFuzzer is being
executed in parallel when requested.
Differential Revision: https://reviews.llvm.org/D22742
llvm-svn: 278544
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions