Skip to content
Permalink
Browse files

syz-manager: improve coverage source file path generation

If we don't determine correct prefix (e.g. some paths are not full paths),
we can plumb kernel source path twice. It seems that it's not possible
to do the right thing in all possible combinations of what can be in
debug info, if the kernel sources were moved or not, if we have kernel_src
or not. But at least don't plumb kernel_src second time.
  • Loading branch information...
dvyukov committed Sep 19, 2018
1 parent 0415891 commit 5adbd06eff26e9e4c15f0126199b8e6a96e84230
Showing with 2 additions and 2 deletions.
  1. +2 −2 syz-manager/cover.go
@@ -106,8 +106,8 @@ func generateCoverHTML(w io.Writer, kernelObj, kernelObjName, kernelSrc, arch st

var d templateData
for f, covered := range fileSet(coveredFrames, uncoveredFrames) {
remain := strings.TrimPrefix(f, prefix)
if kernelSrc != "" {
remain := filepath.Clean(strings.TrimPrefix(f, prefix))
if kernelSrc != "" && !strings.HasPrefix(remain, kernelSrc) {
f = filepath.Join(kernelSrc, remain)
}
lines, err := parseFile(f)

0 comments on commit 5adbd06

Please sign in to comment.
You can’t perform that action at this time.