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

Issue 170720043: code review 170720043: runtime: change top-most return PC from goexit to goexi... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
8 years, 3 months ago by rsc
Modified:
8 years, 3 months ago
Reviewers:
r
CC:
r, golang-codereviews
Visibility:
Public.

Description

runtime: change top-most return PC from goexit to goexit+PCQuantum If you get a stack of PCs from Callers, it would be expected that every PC is immediately after a call instruction, so to find the line of the call, you look up the line for PC-1. CL 163550043 now explicitly documents that. The most common exception to this is the top-most return PC on the stack, which is the entry address of the runtime.goexit function. Subtracting 1 from that PC will end up in a different function entirely. To remove this special case, make the top-most return PC goexit+PCQuantum and then implement goexit in assembly so that the first instruction can be skipped. Fixes issue 7690.

Patch Set 1 #

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

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -5 lines) Patch
M src/runtime/asm_386.s View 1 1 chunk +6 lines, -0 lines 0 comments Download
M src/runtime/asm_amd64.s View 1 1 chunk +6 lines, -0 lines 0 comments Download
M src/runtime/asm_amd64p32.s View 1 1 chunk +6 lines, -0 lines 0 comments Download
M src/runtime/asm_arm.s View 1 1 chunk +6 lines, -0 lines 0 comments Download
M src/runtime/proc.c View 1 2 chunks +3 lines, -5 lines 0 comments Download

Messages

Total messages: 3
rsc
Hello r (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
8 years, 3 months ago (2014-10-29 22:07:46 UTC) #1
r
LGTM cute
8 years, 3 months ago (2014-10-29 23:06:28 UTC) #2
rsc
8 years, 3 months ago (2014-10-30 00:37:50 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=6e069930edab ***

runtime: change top-most return PC from goexit to goexit+PCQuantum

If you get a stack of PCs from Callers, it would be expected
that every PC is immediately after a call instruction, so to find
the line of the call, you look up the line for PC-1.
CL 163550043 now explicitly documents that.

The most common exception to this is the top-most return PC
on the stack, which is the entry address of the runtime.goexit
function. Subtracting 1 from that PC will end up in a different
function entirely.

To remove this special case, make the top-most return PC
goexit+PCQuantum and then implement goexit in assembly
so that the first instruction can be skipped.

Fixes issue 7690.

LGTM=r
R=r
CC=golang-codereviews
https://codereview.appspot.com/170720043
Sign in to reply to this message.

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