[llvm] r293791 - [libFuzzer] Do not use llvm-objdump for disassembling a DSO.
Marcos Pividori via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 1 09:59:24 PST 2017
Author: mpividori
Date: Wed Feb 1 11:59:23 2017
New Revision: 293791
URL: http://llvm.org/viewvc/llvm-project?rev=293791&view=rev
Log:
[libFuzzer] Do not use llvm-objdump for disassembling a DSO.
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.
Differential Revision: https://reviews.llvm.org/D29372
Modified:
llvm/trunk/lib/Fuzzer/FuzzerUtilWindows.cpp
Modified: llvm/trunk/lib/Fuzzer/FuzzerUtilWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerUtilWindows.cpp?rev=293791&r1=293790&r2=293791&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerUtilWindows.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerUtilWindows.cpp Wed Feb 1 11:59:23 2017
@@ -181,10 +181,7 @@ const void *SearchMemory(const void *Dat
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);
}
More information about the llvm-commits
mailing list