[PATCH] D68752: [sancov] Use LLVM Support library JSON writer in favor of individual implementation

Douglas Gliner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 18:54:14 PDT 2019


dgg5503 added a comment.

In D68752#1705235 <https://reviews.llvm.org/D68752#1705235>, @kcc wrote:

> I was actually hoping to get rid of this code entirely. 
>  Why do you need this change?


Hi @kcc,

Are you referring to the JSON formatted coverage report or some other aspect of sancov? The original fix found at D51018 rev 2 <https://reviews.llvm.org/D51018?id=213398> essentially added support for Windows paths to `coverage-report-server.py`. This also required some changes to the JSON writer in sancov and sancov itself to ensure paths were properly normalized and escaped. I figured I might as well have sancov use the LLVM JSON support library to reduce maintenance and also fix any potential escaping issues for free. These changes branched from this suggestion <https://reviews.llvm.org/D51018?id=213398#inline-617242>.

The original reason for D51018 <https://reviews.llvm.org/D51018> was to allow coverage dumped from libFuzzer using `-dump-coverage` to be viewed via `coverage-report-server.py` when the binary was compiled on Windows and therefore had Windows paths in the debug info. This feature has since been deprecated in libFuzzer, however, I would argue these patches are still relevant since you can still dump coverage standalone using the sanitizer run-time (see here <https://clang.llvm.org/docs/SanitizerCoverage.html#default-implementation>).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68752/new/

https://reviews.llvm.org/D68752





More information about the llvm-commits mailing list