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
panic: runtime error: index out of range
goroutine 1 [running]:
panic(0x10c0be0, 0x11468b0)
/Users/rsc/go/src/runtime/panic.go:531 +0x1cf
main.do(0xc42013f800, 0x4b, 0x80)
/Users/rsc/src/rsc.io/tmp/diffguess/main.go:76 +0xa66
main.main()
/Users/rsc/src/rsc.io/tmp/diffguess/main.go:32 +0x203
The first line number is useless. I instinctively clicked on it only to find myself in package runtime instead of my own code.
The crash output is supposed to show only non-runtime code by default. The first frame should be the line that panicked: the panic frame itself should not be shown.
This is a regression introduced when we added panic frames to show executing defers. That's fine to keep, but we don't need and shouldn't show the panic frame when it is the first thing we're going to print in the stack trace.
The text was updated successfully, but these errors were encountered:
Confused me again immediately after filing this bug. Fixed locally and sent CL to stop anyone from duplicating effort. Not sure if there are tests to update or write. Will return to this later.
Here's a trivial crash output:
The first line number is useless. I instinctively clicked on it only to find myself in package runtime instead of my own code.
The crash output is supposed to show only non-runtime code by default. The first frame should be the line that panicked: the panic frame itself should not be shown.
This is a regression introduced when we added panic frames to show executing defers. That's fine to keep, but we don't need and shouldn't show the panic frame when it is the first thing we're going to print in the stack trace.
The text was updated successfully, but these errors were encountered: