Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: panic(x) prints garbage if x is an integer other than 'int' #19658

alandonovan opened this issue Mar 22, 2017 · 2 comments


None yet
4 participants
Copy link

commented Mar 22, 2017

The statement panic(int(8)) causes a panic whose message starts with panic: 8. However, a panic operand of any other integer type causes output of the form panic: (uint) (0x999a0,0x1040a040), which suppresses the most crucial piece of information, the numeric value 8.

It would be more helpful it if printed panic: uint: 8.


This comment has been minimized.

Copy link

commented Mar 22, 2017

@bradfitz bradfitz added this to the Go1.9Maybe milestone Mar 22, 2017


This comment has been minimized.

Copy link

commented Apr 6, 2017

CL mentions this issue.

@bradfitz bradfitz added the NeedsFix label Apr 9, 2017

@gopherbot gopherbot closed this in 0d33dc3 Apr 9, 2017

lparth added a commit to lparth/go that referenced this issue Apr 13, 2017

runtime: improve output of panic(x) where x is numeric
Fixes golang#19658

Change-Id: I41e46073b75c7674e2ed9d6a90ece367ce92166b
Run-TryBot: Todd Neal <>
TryBot-Result: Gobot Gobot <>
Reviewed-by: Brad Fitzpatrick <>

@golang golang locked and limited conversation to collaborators Apr 9, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.