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

Issue 100870044: code review 100870044: runtime: make continuation pc available to stack walk (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by rsc
Modified:
10 years, 9 months ago
Reviewers:
gobot, khr, iant, bradfitz
CC:
khr, iant, dvyukov, golang-codereviews, r
Visibility:
Public.

Description

runtime: make continuation pc available to stack walk The 'continuation pc' is where the frame will continue execution, if anywhere. For a frame that stopped execution due to a CALL instruction, the continuation pc is immediately after the CALL. But for a frame that stopped execution due to a fault, the continuation pc is the pc after the most recent CALL to deferproc in that frame, or else 0. That is where execution will continue, if anywhere. The liveness information is only recorded for CALL instructions. This change makes sure that we never look for liveness information except for CALL instructions. Using a valid PC fixes crashes when a garbage collection or stack copying tries to process a stack frame that has faulted. Record continuation pc in heapdump (format change). Fixes issue 8048.

Patch Set 1 #

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

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

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

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

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

Total comments: 4

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

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

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

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

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

Total comments: 12

Patch Set 12 : diff -r 95cc2b2ebec5 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+257 lines, -16 lines) Patch
M src/pkg/runtime/cgocall.c View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/heapdump.c View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/runtime/mgc0.c View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download
M src/pkg/runtime/panic.c View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/proc.c View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/runtime.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -0 lines 0 comments Download
M src/pkg/runtime/stack.c View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -2 lines 0 comments Download
M src/pkg/runtime/traceback_arm.c View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +67 lines, -4 lines 0 comments Download
M src/pkg/runtime/traceback_x86.c View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +61 lines, -5 lines 0 comments Download
A test/fixedbugs/issue8048.go View 1 2 3 4 5 6 7 8 9 10 1 chunk +107 lines, -0 lines 0 comments Download

Messages

Total messages: 12
rsc
Hello khr (cc: golang-codereviews@googlegroups.com, iant, r), I'd like you to review this change to https://code.google.com/p/go/
10 years, 9 months ago (2014-05-30 20:42:26 UTC) #1
rsc
This is x86-only right now, but I wanted to get the review going. I will ...
10 years, 9 months ago (2014-05-30 20:43:58 UTC) #2
iant
LGTM though I'm not sure I see all the ramifications. https://codereview.appspot.com/100870044/diff/100001/src/pkg/runtime/heapdump.c File src/pkg/runtime/heapdump.c (right): https://codereview.appspot.com/100870044/diff/100001/src/pkg/runtime/heapdump.c#newcode349 ...
10 years, 9 months ago (2014-05-30 21:50:09 UTC) #3
rsc
https://codereview.appspot.com/100870044/diff/100001/src/pkg/runtime/heapdump.c File src/pkg/runtime/heapdump.c (right): https://codereview.appspot.com/100870044/diff/100001/src/pkg/runtime/heapdump.c#newcode349 src/pkg/runtime/heapdump.c:349: dumpint(s->continpc); On 2014/05/30 21:50:09, iant wrote: > Somebody needs ...
10 years, 9 months ago (2014-05-30 22:36:40 UTC) #4
rsc
PTAL linux/arm, linux/amd64, linux/386, darwin/amd64, darwin/386 all tested and pass
10 years, 9 months ago (2014-05-31 01:17:28 UTC) #5
khr
LGTM. https://codereview.appspot.com/100870044/diff/80002/src/pkg/runtime/traceback_arm.c File src/pkg/runtime/traceback_arm.c (right): https://codereview.appspot.com/100870044/diff/80002/src/pkg/runtime/traceback_arm.c#newcode21 src/pkg/runtime/traceback_arm.c:21: Stkframe frame, last; last is unused, remove it. ...
10 years, 9 months ago (2014-05-31 04:36:33 UTC) #6
dvyukov
I think this approach is more promising than altering codegen and live maps, we indeed ...
10 years, 9 months ago (2014-05-31 12:05:26 UTC) #7
rsc
Retesting and will submit. Will also update wiki page. https://codereview.appspot.com/100870044/diff/80002/src/pkg/runtime/stack.c File src/pkg/runtime/stack.c (right): https://codereview.appspot.com/100870044/diff/80002/src/pkg/runtime/stack.c#newcode495 src/pkg/runtime/stack.c:495: ...
10 years, 9 months ago (2014-05-31 13:58:31 UTC) #8
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=ae4861ef1935 *** runtime: make continuation pc available to stack walk The 'continuation ...
10 years, 9 months ago (2014-05-31 14:09:46 UTC) #9
gobot
This CL appears to have broken the windows-amd64-race builder. See http://build.golang.org/log/ef44b289a4baabbd51acbfb4fdd2a64bc837ac58
10 years, 9 months ago (2014-05-31 14:27:29 UTC) #10
bradfitz
Real? On May 31, 2014 11:27 PM, <gobot@golang.org> wrote: > This CL appears to have ...
10 years, 9 months ago (2014-05-31 21:54:32 UTC) #11
rsc
10 years, 9 months ago (2014-05-31 23:00:29 UTC) #12
Yes, looks like a real breakage. Will look into it.


On Sat, May 31, 2014 at 5:54 PM, Brad Fitzpatrick <bradfitz@golang.org>
wrote:

> Real?
>  On May 31, 2014 11:27 PM, <gobot@golang.org> wrote:
>
>> This CL appears to have broken the windows-amd64-race builder.
>> See http://build.golang.org/log/ef44b289a4baabbd51acbfb4fdd2a64bc837ac58
>>
>> https://codereview.appspot.com/100870044/
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "golang-codereviews" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to golang-codereviews+unsubscribe@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
Sign in to reply to this message.

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