You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running go tool trace -d=1 on the attached file, which contains []byte("go 1.22 trace\x00\x00\x00\x01000\x85\x00\b0001"), panics. The same is true for using x/exp/trace.
$ go tool trace -d=1 crash.trace
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
internal/trace/v2.(*Reader).ReadEvent(0xc000206000)
/home/dominikh/prj/go/src/internal/trace/v2/reader.go:160 +0xc38
cmd/trace/v2.debugProcessedEvents({0xc20aa0?, 0xc0000b2960?})
/home/dominikh/prj/go/src/cmd/trace/v2/main.go:166 +0xf8
cmd/trace/v2.Main({0x7fffc2753a9a?, 0xc0000222b0?}, {0x8c5dcb, 0xb}, {0xc00010fe10?, 0x7fa1ac?}, 0x1)
/home/dominikh/prj/go/src/cmd/trace/v2/main.go:34 +0x11f8
main.main()
/home/dominikh/prj/go/src/cmd/trace/main.go:87 +0xa4e
Change https://go.dev/cl/552995 mentions this issue: internal/trace/v2: avoid several panics for malformed traces
thanm
added
the
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
label
Dec 27, 2023
dmitshur
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Jan 12, 2024
This addresses some panics (out of bounds slice accesses and nil pointer
dereferences) when parsing malformed data. These were found via light
fuzzing, not by any rigorous means, and more potential panics probably
exist.
Fixesgolang#64878.
Fixesgolang#64879.
Change-Id: I4085788ba7dc91fec62e4abd88f50777577db42f
Reviewed-on: https://go-review.googlesource.com/c/go/+/552995
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Running
go tool trace -d=1
on the attached file, which contains[]byte("go 1.22 trace\x00\x00\x00\x01000\x85\x00\b0001")
, panics. The same is true for using x/exp/trace.crash.trace.gz
/cc @mknyszek
The text was updated successfully, but these errors were encountered: