[PATCH] D29372: [libFuzzer] llvm-objdump doesn't show the same info that objdump on DSO.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 23:29:18 PST 2017
Lgtm, in the future we could add an option to llvm-objdump to print the
same format, but it's not important right now
On Tue, Jan 31, 2017 at 9:36 PM Marcos Pividori via Phabricator <
reviews at reviews.llvm.org> wrote:
> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170201/02848674/attachment.html>
More information about the llvm-commits
mailing list