mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
[LibFuzzer] Provide stub implementation of __sanitizer_cov_trace_pc_indir
Calls to this function are currently injected by the ``SanitizerCoverageModule`` pass when the both the ``indirect-calls`` and ``trace-pc`` sanitizer coverage options are enabled and the code being instrumented has indirect calls. Previously because LibFuzzer did not define this function this would lead to link errors when building some of the tests on OSX. Differential Revision: http://reviews.llvm.org/D20946 llvm-svn: 271938
This commit is contained in:
parent
93cec24ce4
commit
8d4b0fab3b
@ -57,7 +57,15 @@ static void HandlePC(uint32_t PC) {
|
||||
|
||||
} // namespace fuzzer
|
||||
|
||||
extern "C" void __sanitizer_cov_trace_pc() {
|
||||
extern "C" {
|
||||
void __sanitizer_cov_trace_pc() {
|
||||
fuzzer::HandlePC(static_cast<uint32_t>(
|
||||
reinterpret_cast<uintptr_t>(__builtin_return_address(0))));
|
||||
}
|
||||
|
||||
void __sanitizer_cov_trace_pc_indir(int *) {
|
||||
// Stub to allow linking with code built with
|
||||
// -fsanitize=indirect-calls,trace-pc.
|
||||
// This isn't used currently.
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user