mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-03 19:32:35 +00:00
3747cde5e8
The Android LLVM build system builds the arm64 fuzzer lib without HWASan, but then applications that enable HWASan can generated an object file with a HWASan-ified version of some libc++ symbols (e.g. `std::__1::piecewise_construct`). The linker can choose the HWASan-ified definition, but then it cannot resolve the relocation from libclang_rt.fuzzer-aarch64-android.a to this symbol because the high bits of the address are unexpectedly set. This produces an error: ``` relocation R_AARCH64_ADR_PREL_PG_HI21 out of range ``` Fix this problem by linking a custom isolated libc++ into Android's fuzzer library. We need to pass through ANDROID_NATIVE_API_LEVEL so that the libc++ for 32-bit Android (API < 24) uses LLVM_FORCE_SMALLFILE_FOR_ANDROID. |
||
---|---|---|
.. | ||
afl | ||
dataflow | ||
scripts | ||
standalone | ||
tests | ||
build.sh | ||
CMakeLists.txt | ||
FuzzerBuiltins.h | ||
FuzzerBuiltinsMsvc.h | ||
FuzzerCommand.h | ||
FuzzerCorpus.h | ||
FuzzerCrossOver.cpp | ||
FuzzerDataFlowTrace.cpp | ||
FuzzerDataFlowTrace.h | ||
FuzzerDefs.h | ||
FuzzerDictionary.h | ||
FuzzerDriver.cpp | ||
FuzzerExtFunctions.def | ||
FuzzerExtFunctions.h | ||
FuzzerExtFunctionsDlsym.cpp | ||
FuzzerExtFunctionsWeak.cpp | ||
FuzzerExtFunctionsWindows.cpp | ||
FuzzerExtraCounters.cpp | ||
FuzzerExtraCountersDarwin.cpp | ||
FuzzerExtraCountersWindows.cpp | ||
FuzzerFlags.def | ||
FuzzerFork.cpp | ||
FuzzerFork.h | ||
FuzzerInterceptors.cpp | ||
FuzzerInterface.h | ||
FuzzerInternal.h | ||
FuzzerIO.cpp | ||
FuzzerIO.h | ||
FuzzerIOPosix.cpp | ||
FuzzerIOWindows.cpp | ||
FuzzerLoop.cpp | ||
FuzzerMain.cpp | ||
FuzzerMerge.cpp | ||
FuzzerMerge.h | ||
FuzzerMutate.cpp | ||
FuzzerMutate.h | ||
FuzzerOptions.h | ||
FuzzerPlatform.h | ||
FuzzerRandom.h | ||
FuzzerSHA1.cpp | ||
FuzzerSHA1.h | ||
FuzzerTracePC.cpp | ||
FuzzerTracePC.h | ||
FuzzerUtil.cpp | ||
FuzzerUtil.h | ||
FuzzerUtilDarwin.cpp | ||
FuzzerUtilFuchsia.cpp | ||
FuzzerUtilLinux.cpp | ||
FuzzerUtilPosix.cpp | ||
FuzzerUtilWindows.cpp | ||
FuzzerValueBitMap.h | ||
README.txt |
See http://llvm.org/docs/LibFuzzer.html