runtime: SIGBUS in initItab (write to readonly ITab.Fun) on unchecked type assertion with generics #65962
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
Milestone
Go version
from go1.18 to gotip(go1.23-ccbc725f)
Output of
go env
in your module/workspace:What did you do?
This came up during an internal code review on a convoluted dynamodb unmarshaler implementation, the crash could be striped down to this:
https://go.dev/play/p/buw65E2QFzU
The crash only occurs if the
v.(T)
is present, even though the condition evaluates to false (shown by not reaching the unreachable panic). Checking any of the 2 assertions also prevents the crash.What did you see happen?
What did you expect to see?
We expected to recover from a common type assertion panic, as is the case without the unreachable if branch.
The text was updated successfully, but these errors were encountered: