diff options
author | Russ Cox <rsc@golang.org> | 2014-05-31 10:10:12 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-05-31 10:10:12 -0400 |
commit | a3c0d39eaf4967f6a4b4132ca71bb0ffe0c43c6b (patch) | |
tree | 77fb5fcff9d75f655f3c84dfffa4f8ab96521fd7 /src/pkg/runtime/proc.c | |
parent | b800dbf4c7cf3e54bf89812a9deae334a7fc289a (diff) | |
download | go-a3c0d39eaf4967f6a4b4132ca71bb0ffe0c43c6b.tar.gz |
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.
LGTM=iant, khr
R=khr, iant, dvyukov
CC=golang-codereviews, r
https://codereview.appspot.com/100870044
Diffstat (limited to 'src/pkg/runtime/proc.c')
-rw-r--r-- | src/pkg/runtime/proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index fc52e0923..665d34a40 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -230,7 +230,7 @@ runtimeĀ·main(void) d.fn = &initDone; d.siz = 0; d.link = g->defer; - d.argp = (void*)-1; + d.argp = NoArgs; d.special = true; g->defer = &d; |