Skip to content

Commit

Permalink
internal/loganal: accept inlined frames when parsing tracebacks
Browse files Browse the repository at this point in the history
This fixes a hang in 'greplogs -E .' when parsing
https://build.golang.org/log/7d2fead21f578d17f75e3d0523c53e7a86411dbb,
which contains an inlined entry for 'runtime.(*_type).nameOff':

	runtime.(*_type).nameOff(...)
		/workdir/go/src/runtime/type.go:219
  • Loading branch information
Bryan C. Mills authored and aclements committed Apr 21, 2022
1 parent 436f9ee commit 4e3ee15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/loganal/failure.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ var (
// function/line number entry in a traceback. Group 1 matches
// the fully qualified function name. Groups 2 and 3 match the
// file name and line number.
tbEntry = `(\S+)\(.*\)\n\t(.*):([0-9]+) .*\n`
// Most entries have trailing stack metadata for each frame,
// but inlined calls, lacking a frame, may omit that metadata.
tbEntry = `(\S+)\(.*\)\n\t(.*):([0-9]+)(?: .*)?\n`

// runtimeFailed matches a runtime throw or testing package
// panic. Matching the panic is fairly loose because in some
Expand Down

0 comments on commit 4e3ee15

Please sign in to comment.