Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options
Hi,
I'm reading your source code recently. It's beautiful work that providing a unified platform for binary instrumentation. But I found a bug, which may significantly reduces the efficiency.
The mergeParser will register itself to reporter while being initialized in merge-file-parser.cc:66
However, it's registered manually in main.cc, which is deleted in this commit. This can be easily reproduced by adding INFO_MSG to g_kcov_debug_mask in util.cc:27, every REPORT line from the mergeParser will be duplicated, which means the mergePaser's callback function onLineReporter is called twice.
This will cause redundant callback when each line of source code is parsed by the parser. According to my test report, this will add about 30% overhead on parsing stage.
Thank you for your reading. I'm looking forward to your further feedback.
(ps: Sorry for my English, I'm not a native speaker.)
Hi, I'm reading your source code recently. It's beautiful work that providing a unified platform for binary instrumentation. But I found a bug, which may significantly reduces the efficiency.
The
mergeParser
will register itself toreporter
while being initialized inmerge-file-parser.cc:66
However, it's registered manually in
main.cc
, which is deleted in this commit. This can be easily reproduced by addingINFO_MSG
tog_kcov_debug_mask
inutil.cc:27
, every REPORT line from themergeParser
will be duplicated, which means themergePaser
's callback functiononLineReporter
is called twice.This will cause redundant callback when each line of source code is parsed by the parser. According to my test report, this will add about 30% overhead on parsing stage.
Thank you for your reading. I'm looking forward to your further feedback.
(ps: Sorry for my English, I'm not a native speaker.)