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

Issue 7301062: code review 7301062: runtime: restrict stack root scan to locals and arguments (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 2 months ago by cshapiro
Modified:
11 years, 1 month ago
Reviewers:
minux1, dho, rsc
CC:
golang-dev
Visibility:
Public.

Description

runtime: restrict stack root scan to locals and arguments

Patch Set 1 #

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

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

Total comments: 13

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

Total comments: 12

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

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

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

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

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -57 lines) Patch
M src/pkg/runtime/mgc0.c View 1 2 3 4 5 6 7 1 chunk +30 lines, -29 lines 3 comments Download
M src/pkg/runtime/mprof.goc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/proc.c View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/runtime.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/sigqueue.goc View 1 1 chunk +2 lines, -1 line 0 comments Download
M src/pkg/runtime/traceback_arm.c View 1 2 3 4 5 6 10 chunks +19 lines, -10 lines 0 comments Download
M src/pkg/runtime/traceback_x86.c View 1 2 3 4 5 6 10 chunks +23 lines, -14 lines 0 comments Download

Messages

Total messages: 32
cshapiro
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
11 years, 2 months ago (2013-02-07 23:01:42 UTC) #1
cshapiro1
This change causes the garbage collector to scan somewhat more of the open frame than ...
11 years, 2 months ago (2013-02-07 23:04:07 UTC) #2
dave_cheney.net
Hello, Thank you for this proposal. How does this change interact with the ongoing work ...
11 years, 2 months ago (2013-02-07 23:19:25 UTC) #3
rsc
For the most part this CL's changes to the stack trace code are trying to ...
11 years, 2 months ago (2013-02-07 23:53:00 UTC) #4
dave_cheney.net
That is excellent news. Welcome Carl! On Fri, Feb 8, 2013 at 10:52 AM, Russ ...
11 years, 2 months ago (2013-02-07 23:56:46 UTC) #5
rsc
https://codereview.appspot.com/7301062/diff/5001/src/pkg/runtime/proc.c File src/pkg/runtime/proc.c (right): https://codereview.appspot.com/7301062/diff/5001/src/pkg/runtime/proc.c#newcode1006 src/pkg/runtime/proc.c:1006: entersyscall(int32 dummy) Name this void ·entersyscall(int32 dummy) This takes ...
11 years, 2 months ago (2013-02-14 20:59:59 UTC) #6
cshapiro
https://codereview.appspot.com/7301062/diff/5001/src/pkg/runtime/traceback_arm.c File src/pkg/runtime/traceback_arm.c (right): https://codereview.appspot.com/7301062/diff/5001/src/pkg/runtime/traceback_arm.c#newcode209 src/pkg/runtime/traceback_arm.c:209: runtime·walkstack(byte *pc0, byte *sp, byte *lr0, G *gp, void ...
11 years, 2 months ago (2013-02-15 19:35:01 UTC) #7
rsc
I agree that walkstack needs to not crash during a crash just because it can't ...
11 years, 2 months ago (2013-02-15 19:41:54 UTC) #8
cshapiro
Of course. Is it safe to assume the stack is parse-able during a sigprof handler?
11 years, 2 months ago (2013-02-15 19:55:35 UTC) #9
rsc
On Fri, Feb 15, 2013 at 2:55 PM, <cshapiro@golang.org> wrote: > Of course. Is it ...
11 years, 2 months ago (2013-02-15 20:11:53 UTC) #10
cshapiro
PTAL https://codereview.appspot.com/7301062/diff/5001/src/pkg/runtime/proc.c File src/pkg/runtime/proc.c (right): https://codereview.appspot.com/7301062/diff/5001/src/pkg/runtime/proc.c#newcode1006 src/pkg/runtime/proc.c:1006: entersyscall(int32 dummy) On 2013/02/14 20:59:59, rsc wrote: > ...
11 years, 2 months ago (2013-02-27 00:10:20 UTC) #11
rsc
LGTM after fixes https://codereview.appspot.com/7301062/diff/16001/src/pkg/runtime/asm_amd64.s File src/pkg/runtime/asm_amd64.s (right): https://codereview.appspot.com/7301062/diff/16001/src/pkg/runtime/asm_amd64.s#newcode716 src/pkg/runtime/asm_amd64.s:716: TEXT runtime·abort(SB),7,$0 should be able to ...
11 years, 2 months ago (2013-02-27 16:35:18 UTC) #12
cshapiro
https://codereview.appspot.com/7301062/diff/16001/src/pkg/runtime/asm_amd64.s File src/pkg/runtime/asm_amd64.s (right): https://codereview.appspot.com/7301062/diff/16001/src/pkg/runtime/asm_amd64.s#newcode716 src/pkg/runtime/asm_amd64.s:716: TEXT runtime·abort(SB),7,$0 Okay. I think this is generally useful ...
11 years, 2 months ago (2013-02-27 21:56:20 UTC) #13
rsc
https://codereview.appspot.com/7301062/diff/16001/src/pkg/runtime/asm_amd64.s File src/pkg/runtime/asm_amd64.s (right): https://codereview.appspot.com/7301062/diff/16001/src/pkg/runtime/asm_amd64.s#newcode716 src/pkg/runtime/asm_amd64.s:716: TEXT runtime·abort(SB),7,$0 On 2013/02/27 21:56:20, cshapiro wrote: > Okay. ...
11 years, 2 months ago (2013-02-28 16:23:48 UTC) #14
cshapiro
*** Submitted as https://code.google.com/p/go/source/detail?r=9742f722b558 *** runtime: restrict stack root scan to locals and arguments R=rsc ...
11 years, 1 month ago (2013-03-05 03:50:59 UTC) #15
rsc
On Mon, Mar 4, 2013 at 7:50 PM, <cshapiro@golang.org> wrote: > *** Submitted as > ...
11 years, 1 month ago (2013-03-05 04:52:16 UTC) #16
rsc
Seems to break arm: fatal error: unknown pc goroutine 1 [running]: [fp=0x1045d1f8] runtime.throw(0x2ff8a4) /usr/local/go/src/pkg/runtime/panic.c:465 +0x50 ...
11 years, 1 month ago (2013-03-05 05:10:07 UTC) #17
rsc
I found the first problem for this CL with ARM, but that just led to ...
11 years, 1 month ago (2013-03-05 20:33:48 UTC) #18
rsc
https://codereview.appspot.com/7301062/diff/37001/src/pkg/runtime/mgc0.c File src/pkg/runtime/mgc0.c (right): https://codereview.appspot.com/7301062/diff/37001/src/pkg/runtime/mgc0.c#newcode1320 src/pkg/runtime/mgc0.c:1320: sp = (byte*)&gp; This should be sp = runtime.getcallersp(&gp) ...
11 years, 1 month ago (2013-03-05 20:37:40 UTC) #19
cshapiro
On Mon, Mar 4, 2013 at 8:52 PM, Russ Cox <rsc@golang.org> wrote: > Did you ...
11 years, 1 month ago (2013-03-05 21:38:33 UTC) #20
rsc
On Tue, Mar 5, 2013 at 1:38 PM, Carl Shapiro <cshapiro@golang.org> wrote: > On Mon, ...
11 years, 1 month ago (2013-03-05 22:04:57 UTC) #21
rsc
After your pointer to the argument calculations, I made the changes below on my ARM ...
11 years, 1 month ago (2013-03-05 22:29:11 UTC) #22
rsc
Another possibility is that this fails because only functions that can split the stack have ...
11 years, 1 month ago (2013-03-05 22:35:42 UTC) #23
cshapiro
On Tue, Mar 5, 2013 at 2:35 PM, Russ Cox <rsc@golang.org> wrote: > Another possibility ...
11 years, 1 month ago (2013-03-05 23:02:25 UTC) #24
rsc
On Tue, Mar 5, 2013 at 3:02 PM, Carl Shapiro <cshapiro@golang.org> wrote: > On Tue, ...
11 years, 1 month ago (2013-03-06 02:53:03 UTC) #25
dho
2013/3/5 Russ Cox <rsc@golang.org>: > On Tue, Mar 5, 2013 at 3:02 PM, Carl Shapiro ...
11 years, 1 month ago (2013-03-06 02:59:39 UTC) #26
rsc
On Tue, Mar 5, 2013 at 6:59 PM, Devon H. O'Dell <devon.odell@gmail.com>wrote: > > I ...
11 years, 1 month ago (2013-03-06 20:13:12 UTC) #27
minux1
On Wed, Mar 6, 2013 at 10:59 AM, Devon H. O'Dell <devon.odell@gmail.com> wrote: > I'm ...
11 years, 1 month ago (2013-03-06 20:26:23 UTC) #28
dho
2013/3/6 minux <minux.ma@gmail.com>: > On Wed, Mar 6, 2013 at 10:59 AM, Devon H. O'Dell ...
11 years, 1 month ago (2013-03-06 20:34:12 UTC) #29
minux1
On Thu, Mar 7, 2013 at 4:34 AM, Devon H. O'Dell <devon.odell@gmail.com> wrote: > 2013/3/6 ...
11 years, 1 month ago (2013-03-06 20:43:30 UTC) #30
rsc
On Wed, Mar 6, 2013 at 3:34 PM, Devon H. O'Dell <devon.odell@gmail.com>wrote: > I think ...
11 years, 1 month ago (2013-03-06 20:45:46 UTC) #31
dho
11 years, 1 month ago (2013-03-06 20:47:26 UTC) #32
2013/3/6 Russ Cox <rsc@golang.org>:
> On Wed, Mar 6, 2013 at 3:34 PM, Devon H. O'Dell <devon.odell@gmail.com>
> wrote:
>>
>> I think we have evidence that it causes problems already. The retry
>> after the kernel-supplied CAS in the linux runtime·cas implementation
>> I think is a bug that would be explained by this.
>
>
> What evidence? What is "it"?
>
> The retry after the kernel-supplied CAS works around a kernel bug that was
> fixed in Linux 2.6.24.
> See the comment at the top of $GOROOT/src/pkg/sync/atomic/asm_linux_arm.s.
>
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/ar...

Sorry, my misunderstanding.

--dho
Sign in to reply to this message.

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