This is an archive of the discontinued LLVM Phabricator instance.

[libFuzzer] Disable i386 on non-Linux platforms
ClosedPublic

Authored by metzman on Apr 30 2019, 4:52 PM.

Event Timeline

metzman created this revision.Apr 30 2019, 4:52 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 30 2019, 4:52 PM
Herald added subscribers: llvm-commits, Restricted Project, mgorny. · View Herald Transcript
metzman retitled this revision from [libFuzzer] Disable i386 on Windows to [libFuzzer] Disable i386 on non-Linux platforms.Apr 30 2019, 4:54 PM
metzman edited the summary of this revision. (Show Details)

Please take a look.
I could be less conservative here and only disable i386 on Windows but I frankly don't think the risk of breaking other platforms is worth the benefit (nothing).
This is intended to fix https://bugs.chromium.org/p/chromium/issues/detail?id=957971#c5 I've verified that the "fuzzer" target is no longer possible to build on x86 (as opposed to possible but failing as it was before).
It's also worth noting that this breakage is in part caused by libFuzzer building with MSVC (__builtin_clzll isn't supported by MSVC but _BitScanReverse64 is supported, but not on i386) instead of indirectly with clang.

This revision is now accepted and ready to land.Apr 30 2019, 5:34 PM

I'm also thinking i386 libFuzzer is broken on iOS (though I have no way of confirming this) and thus caused the greendragon bot failure: http://green.lab.llvm.org/green/job/clang-stage2-coverage-R/3958/consoleFull#console-section-35

This revision was automatically updated to reflect the committed changes.
metzman marked an inline comment as done.Apr 30 2019, 7:47 PM
metzman added inline comments.
compiler-rt/trunk/cmake/config-ix.cmake
234 ↗(On Diff #197496)

This is a bug. "LINUX" is undefined here.
But it solved an unrelated issue caused by i386 on Linux bots so I'll need to fix that before I correct this code.