[PATCH] D29372: [libFuzzer] llvm-objdump doesn't show the same info that objdump on DSO.
Marcos Pividori via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 21:36:07 PST 2017
mpividori created this revision.
When disassembling a DSO, for calls to functions from the PLT, `llvm-objdump` only prints the offset from the PLT, like: `<.plt+0x30>`.
While `objdump` and `dumpbin` print the function name, like: `<__sanitizer_cov_trace_pc_guard at plt>`
When analyzing the coverage in `libFuzzer` we dissasemble and look for the calls to `__sanitizer_cov_trace_pc_guard`.
So, this fails when using `llvm-objdump` on a DSO.
This was the reason why `coverage.test` was failing on Windows:
- `dumpbin` was not considered because of https://reviews.llvm.org/D29371
- `llvm-objdump` didn't find the calls to `__sanitizer_cov_trace_pc_guard` in the DLL.
https://reviews.llvm.org/D29372
Files:
lib/Fuzzer/FuzzerUtilWindows.cpp
Index: lib/Fuzzer/FuzzerUtilWindows.cpp
===================================================================
--- lib/Fuzzer/FuzzerUtilWindows.cpp
+++ lib/Fuzzer/FuzzerUtilWindows.cpp
@@ -181,10 +181,7 @@
std::string DisassembleCmd(const std::string &FileName) {
if (ExecuteCommand("dumpbin /summary > nul") == 0)
return "dumpbin /disasm " + FileName;
- if (ExecuteCommand("llvm-objdump > nul") == 0)
- return "llvm-objdump -d " + FileName;
- Printf("libFuzzer: couldn't find tool to disassemble (dumpbin, "
- "llvm-objdump)\n");
+ Printf("libFuzzer: couldn't find tool to disassemble (dumpbin)\n");
exit(1);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29372.86574.patch
Type: text/x-patch
Size: 635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170201/1a9f7a41/attachment.bin>
More information about the llvm-commits
mailing list