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

Issue 9226043: code review 9226043: runtime: fix crash in badsignal() (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 11 months ago by dvyukov
Modified:
10 years, 11 months ago
Reviewers:
minux1, r, adg, iant, bradfitz
CC:
bradfitz, dfc, adg, iant, r, adonovan, golang-dev
Visibility:
Public.

Description

runtime: fix crash in badsignal() The linker can generate split stack prolog when a textflag 7 function makes an indirect function call. If it happens, badsignal() crashes trying to dereference g. Fixes issue 5337.

Patch Set 1 #

Patch Set 2 : diff -r 8cca28e940ea https://dvyukov%40google.com@code.google.com/p/go/ #

Total comments: 1

Patch Set 3 : diff -r 8cca28e940ea https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 4 : diff -r 8cca28e940ea https://dvyukov%40google.com@code.google.com/p/go/ #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -15 lines) Patch
M src/pkg/runtime/os_darwin.c View 1 2 1 chunk +5 lines, -3 lines 1 comment Download
M src/pkg/runtime/os_freebsd.c View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M src/pkg/runtime/os_linux.c View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M src/pkg/runtime/os_netbsd.c View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M src/pkg/runtime/os_openbsd.c View 1 2 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 25
bradfitz
https://codereview.appspot.com/9226043/diff/2001/src/pkg/runtime/os_linux.c File src/pkg/runtime/os_linux.c (right): https://codereview.appspot.com/9226043/diff/2001/src/pkg/runtime/os_linux.c#newcode310 src/pkg/runtime/os_linux.c:310: for(i = 0; runtime·sigtab[sig].name[i]; i++) {} If this fixes ...
10 years, 11 months ago (2013-05-06 16:29:13 UTC) #1
dvyukov
On 2013/05/06 16:29:13, bradfitz wrote: > https://codereview.appspot.com/9226043/diff/2001/src/pkg/runtime/os_linux.c > File src/pkg/runtime/os_linux.c (right): > > https://codereview.appspot.com/9226043/diff/2001/src/pkg/runtime/os_linux.c#newcode310 > ...
10 years, 11 months ago (2013-05-06 17:14:57 UTC) #2
dvyukov
Hello bradfitz@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
10 years, 11 months ago (2013-05-06 17:30:37 UTC) #3
dfc
Very nice, thank you for getting to the bottom of this.
10 years, 11 months ago (2013-05-06 17:32:57 UTC) #4
bradfitz
LGTM On Mon, May 6, 2013 at 10:30 AM, <dvyukov@google.com> wrote: > Hello bradfitz@golang.org (cc: ...
10 years, 11 months ago (2013-05-06 17:33:41 UTC) #5
adg
LGTM
10 years, 11 months ago (2013-05-06 17:34:30 UTC) #6
dfc
On 2013/05/06 17:32:57, dfc wrote: > Very nice, thank you for getting to the bottom ...
10 years, 11 months ago (2013-05-06 17:35:01 UTC) #7
iant
See the comment #9 in issue 4048, where adonovan says that inlining findnull does not ...
10 years, 11 months ago (2013-05-06 17:50:13 UTC) #8
iant
On 2013/05/06 17:35:01, dfc wrote: > > Also, this was very subtle and tricky to ...
10 years, 11 months ago (2013-05-06 17:52:50 UTC) #9
r
https://codereview.appspot.com/9226043/diff/9001/src/pkg/runtime/os_darwin.c File src/pkg/runtime/os_darwin.c (right): https://codereview.appspot.com/9226043/diff/9001/src/pkg/runtime/os_darwin.c#newcode551 src/pkg/runtime/os_darwin.c:551: for(len = 0; runtime·sigtab[sig].name[len]; len++) {} please put this ...
10 years, 11 months ago (2013-05-06 18:28:46 UTC) #10
bradfitz
On Mon, May 6, 2013 at 10:50 AM, <iant@golang.org> wrote: > See the comment #9 ...
10 years, 11 months ago (2013-05-06 18:36:01 UTC) #11
iant
On Mon, May 6, 2013 at 11:35 AM, Brad Fitzpatrick <bradfitz@golang.org> wrote: > On Mon, ...
10 years, 11 months ago (2013-05-06 20:10:21 UTC) #12
iant
LGTM I've confirmed that the previous attempt to use a local loop caused build failures. ...
10 years, 11 months ago (2013-05-06 21:20:55 UTC) #13
minux1
On Tue, May 7, 2013 at 5:20 AM, <iant@golang.org> wrote: > Looking at the code ...
10 years, 11 months ago (2013-05-06 21:28:02 UTC) #14
bradfitz
On Mon, May 6, 2013 at 2:27 PM, minux <minux.ma@gmail.com> wrote: > > On Tue, ...
10 years, 11 months ago (2013-05-06 21:39:38 UTC) #15
minux1
we need a test in runtime for signal happening on foreign threads.
10 years, 11 months ago (2013-05-06 23:01:08 UTC) #16
r
LGTM
10 years, 11 months ago (2013-05-06 23:09:43 UTC) #17
iant
*** Submitted as https://code.google.com/p/go/source/detail?r=3aed68ee68dc *** runtime: fix crash in badsignal() The linker can generate split ...
10 years, 11 months ago (2013-05-06 23:15:08 UTC) #18
minux1
The root cause is cmd/cc failed to annotate runtime.badsignal as textflag 7. (pkg/runtime/os_linux.c:301) TEXT runtime.badsignal+0(SB),$32-8 ...
10 years, 11 months ago (2013-05-06 23:19:48 UTC) #19
dfc
Could you please raise a bug for this failure. Thanks Dave On 06/05/2013, at 4:19 ...
10 years, 11 months ago (2013-05-06 23:21:11 UTC) #20
iant
On Mon, May 6, 2013 at 4:01 PM, <minux.ma@gmail.com> wrote: > we need a test ...
10 years, 11 months ago (2013-05-06 23:25:08 UTC) #21
minux1
On 2013/05/06 23:19:48, minux wrote: > The root cause is cmd/cc failed to annotate runtime.badsignal ...
10 years, 11 months ago (2013-05-06 23:29:30 UTC) #22
minux1
On Tue, May 7, 2013 at 7:25 AM, Ian Lance Taylor <iant@golang.org> wrote: > On ...
10 years, 11 months ago (2013-05-06 23:53:58 UTC) #23
minux1
On Tue, May 7, 2013 at 7:21 AM, Dave Cheney <dave@cheney.net> wrote: > Could you ...
10 years, 11 months ago (2013-05-07 02:20:22 UTC) #24
dfc
10 years, 11 months ago (2013-05-07 05:37:30 UTC) #25
Thank you.

On Tue, May 7, 2013 at 12:20 PM, minux <minux.ma@gmail.com> wrote:
>
> On Tue, May 7, 2013 at 7:21 AM, Dave Cheney <dave@cheney.net> wrote:
>>
>> Could you please raise a bug for this failure
>
> filed https://code.google.com/p/go/issues/detail?id=5419
Sign in to reply to this message.

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