Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: fuzzer/go/frontend/data/stacktrace.go

Issue 1672033002: Deduplicate fuzz cases on the frontend before they are displayed. (Closed) Base URL: https://skia.googlesource.com/buildbot@remove-overview
Patch Set: merged upstream Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fuzzer/go/frontend/data/report_test.go ('k') | fuzzer/go/frontend/data/stacktrace_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 package data 1 package data
2 2
3 import ( 3 import (
4 "bufio" 4 "bufio"
5 "bytes" 5 "bytes"
6 "fmt" 6 "fmt"
7 "regexp" 7 "regexp"
8 "strconv" 8 "strconv"
9 "strings" 9 "strings"
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 hasBegun = true 147 hasBegun = true
148 continue 148 continue
149 } 149 }
150 if hasBegun && line == "" { 150 if hasBegun && line == "" {
151 break 151 break
152 } 152 }
153 if !hasBegun { 153 if !hasBegun {
154 continue 154 continue
155 } 155 }
156 156
157 line = strings.Replace(line, "(anonymous namespace)::", "", -1)
158
157 if match := asanStackTraceLine.FindStringSubmatch(line); match ! = nil { 159 if match := asanStackTraceLine.FindStringSubmatch(line); match ! = nil {
158 // match[0] is the entire matched portion, [1] is the fu nction name [2] is the 160 // match[0] is the entire matched portion, [1] is the fu nction name [2] is the
159 // "package", [3] is the file name, [4] is the line numb er 161 // "package", [3] is the file name, [4] is the line numb er
160 newFrame := FullStackFrame(match[2], match[3], match[1], safeParseInt(match[4])) 162 newFrame := FullStackFrame(match[2], match[3], match[1], safeParseInt(match[4]))
161 frames = append(frames, newFrame) 163 frames = append(frames, newFrame)
162 } 164 }
163 } 165 }
164 return StackTrace{Frames: frames} 166 return StackTrace{Frames: frames}
165 } 167 }
166 168
(...skipping 15 matching lines...) Expand all
182 s := fmt.Sprintf("StackTrace with %d frames:\n", len(st.Frames)) 184 s := fmt.Sprintf("StackTrace with %d frames:\n", len(st.Frames))
183 for _, f := range st.Frames { 185 for _, f := range st.Frames {
184 s += fmt.Sprintf("\t%s\n", f.String()) 186 s += fmt.Sprintf("\t%s\n", f.String())
185 } 187 }
186 return s 188 return s
187 } 189 }
188 190
189 func (st *StackTrace) IsEmpty() bool { 191 func (st *StackTrace) IsEmpty() bool {
190 return len(st.Frames) == 0 192 return len(st.Frames) == 0
191 } 193 }
OLDNEW
« no previous file with comments | « fuzzer/go/frontend/data/report_test.go ('k') | fuzzer/go/frontend/data/stacktrace_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698