Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(410)

Issue 13302051: code review 13302051: runtime: show runtime.panic frame in traceback (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by rsc
Modified:
11 years, 6 months ago
Reviewers:
iant
CC:
golang-dev, iant
Visibility:
Public.

Description

runtime: show runtime.panic frame in traceback Otherwise, if panic starts running deferred functions, the code that panicked appears to be calling those functions directly, which is not the case and can be confusing. For example: main.Two() /Users/rsc/x.go:12 +0x2a runtime.panic(0x20dc0, 0x2100cc010) /Users/rsc/g/go/src/pkg/runtime/panic.c:248 +0x106 main.One() /Users/rsc/x.go:8 +0x55 This makes clear(er) that main.Two is being called during a panic, not as a direct call from main.One. Fixes issue 5832.

Patch Set 1 #

Patch Set 2 : diff -r 46fd4ef6c0de https://code.google.com/p/go/ #

Patch Set 3 : diff -r 46fd4ef6c0de https://code.google.com/p/go/ #

Patch Set 4 : diff -r 8d19586af772 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -1 line) Patch
M src/pkg/runtime/symtab.c View 1 2 3 1 chunk +8 lines, -1 line 0 comments Download

Messages

Total messages: 3
rsc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
11 years, 6 months ago (2013-09-11 15:38:27 UTC) #1
iant
LGTM
11 years, 6 months ago (2013-09-11 15:51:54 UTC) #2
rsc
11 years, 6 months ago (2013-09-11 15:59:24 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=92c59a2550bb ***

runtime: show runtime.panic frame in traceback

Otherwise, if panic starts running deferred functions,
the code that panicked appears to be calling those
functions directly, which is not the case and can be
confusing.

For example:

main.Two()
        /Users/rsc/x.go:12 +0x2a
runtime.panic(0x20dc0, 0x2100cc010)
        /Users/rsc/g/go/src/pkg/runtime/panic.c:248 +0x106
main.One()
        /Users/rsc/x.go:8 +0x55

This makes clear(er) that main.Two is being called during
a panic, not as a direct call from main.One.

Fixes issue 5832.

R=golang-dev, iant
CC=golang-dev
https://codereview.appspot.com/13302051
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b