aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/MachOObjectFile.cpp
diff options
context:
space:
mode:
authorDan Liew <dan@su-root.co.uk>2016-08-12 18:29:36 +0000
committerDan Liew <dan@su-root.co.uk>2016-08-12 18:29:36 +0000
commited3c9cae4972099135982093d40301f7d96fa3b4 (patch)
tree0a9af3f830bb1230450d59a0341a04c819d9d3b5 /llvm/lib/Object/MachOObjectFile.cpp
parentb7abde0343e1042fec643faca571882e3fc133b7 (diff)
downloadllvm-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