runtime: weird panic while dumping non-pointer struct with wrapped error #38601
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I was running
go test
on my package, which in turn called https://godoc.org/github.com/powerman/check#C.Nil at value returned by https://godoc.org/github.com/powerman/rpc-codec/jsonrpc2#WrapError.The value itself was implemented this way https://github.com/powerman/rpc-codec/blob/v1.2.0/jsonrpc2/errors.go#L96-L116 and contains valid non-nil wrapped error inside.
Line https://github.com/powerman/rpc-codec/blob/v1.2.0/jsonrpc2/errors.go#L111 generates different panics at different
go test
runs, like these:Complete panic one
Complete panic two
What did you expect to see?
No panic. :)
What did you see instead?
Panic. :(
THE WORKAROUND
I was able to work around this issue by changing wrapped error to become a reference: powerman/rpc-codec@c2902e8
But I don't think something was wrong with my code before that commit, so probably it's a Go bug.
The text was updated successfully, but these errors were encountered: