From 86b4889e3e0f6faac8433659bcac08c4b32097c0 Mon Sep 17 00:00:00 2001 From: Alexandre Rebert Date: Thu, 21 Nov 2019 13:28:02 -0500 Subject: [PATCH] Disable dead stripping Without it, some optimized targets would fail to launch with the following error: ERROR: The size of coverage PC tables does not match the number of instrumented PCs. This might be a compiler bug, please contact the libFuzzer developers. Also check https://bugs.llvm.org/show_bug.cgi?id=34636 for possible workarounds (tl;dr: don't use the old GNU ld) Related to: - https://github.com/google/oss-fuzz/issues/1042 - llvm.org/pr34636 --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index ed65303..62f7a13 100644 --- a/src/main.rs +++ b/src/main.rs @@ -345,6 +345,7 @@ impl FuzzProject { -Cllvm-args=-sanitizer-coverage-trace-geps \ -Cllvm-args=-sanitizer-coverage-prune-blocks=0 \ -Cllvm-args=-sanitizer-coverage-pc-table \ + -Clink-dead-code \ -Zsanitizer={sanitizer}", sanitizer = sanitizer, );