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

Issue 5684060: code review 5684060: runtime: fix FreeBSD signal handling around thread creation (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 3 months ago by dho
Modified:
13 years, 3 months ago
Reviewers:
CC:
rsc, mikio, minux1, adg, golang-dev
Visibility:
Public.

Description

runtime: fix FreeBSD signal handling around thread creation Ignore signals while we are spawning a new thread. Previously, a signal arriving just before runtime.minit setting up the signal handler triggers a "double fault" in signal trampolining. Fixes issue 3017.

Patch Set 1 #

Patch Set 2 : diff -r ba4f5ef37b6d https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r ba4f5ef37b6d https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r ba4f5ef37b6d https://go.googlecode.com/hg/ #

Total comments: 3

Patch Set 5 : diff -r ba4f5ef37b6d https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -1 line) Patch
M src/pkg/runtime/cgo/gcc_freebsd_386.c View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_freebsd_amd64.c View 1 2 chunks +11 lines, -0 lines 0 comments Download
M src/pkg/runtime/os_freebsd.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/runtime/sys_freebsd_386.s View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
M src/pkg/runtime/sys_freebsd_amd64.s View 1 2 3 4 2 chunks +11 lines, -1 line 0 comments Download
M src/pkg/runtime/thread_freebsd.c View 1 2 3 4 5 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 14
dho
Hello rsc@golang.org, mikioh.mikioh@gmail.com, minux <minux.ma@gmail.com>, adg@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change ...
13 years, 3 months ago (2012-02-22 02:26:23 UTC) #1
dho
On 2012/02/22 02:26:23, dho wrote: > Hello mailto:rsc@golang.org, mailto:mikioh.mikioh@gmail.com, minux <mailto:minux.ma@gmail.com>, > mailto:adg@golang.org (cc: mailto:golang-dev@googlegroups.com), ...
13 years, 3 months ago (2012-02-22 02:28:50 UTC) #2
adg
On it. On 22 February 2012 13:28, <devon.odell@gmail.com> wrote: > On 2012/02/22 02:26:23, dho wrote: ...
13 years, 3 months ago (2012-02-22 02:30:09 UTC) #3
adg
Fun. freebsd-386: $ ./all.bash # Building C bootstrap tool. cmd/dist # Building compilers and Go ...
13 years, 3 months ago (2012-02-22 02:37:27 UTC) #4
dho
Op 21 februari 2012 21:36 heeft Andrew Gerrand <adg@golang.org> het volgende geschreven: > Fun. freebsd-386: ...
13 years, 3 months ago (2012-02-22 02:51:00 UTC) #5
dho
Hello rsc@golang.org, mikioh.mikioh@gmail.com, minux <minux.ma@gmail.com>, adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 3 months ago (2012-02-22 04:09:23 UTC) #6
dho
This seems to do the trick. PTAL!
13 years, 3 months ago (2012-02-22 04:09:42 UTC) #7
adg
LGTM Thanks. Although for the assembly I'll have to take your word for it. (Russ?)
13 years, 3 months ago (2012-02-22 04:15:45 UTC) #8
rsc
http://codereview.appspot.com/5684060/diff/6/src/pkg/runtime/sys_freebsd_amd64.s File src/pkg/runtime/sys_freebsd_amd64.s (right): http://codereview.appspot.com/5684060/diff/6/src/pkg/runtime/sys_freebsd_amd64.s#newcode239 src/pkg/runtime/sys_freebsd_amd64.s:239: LEAQ 8(SP), SI // arg 2 - set MOVQ ...
13 years, 3 months ago (2012-02-22 04:22:29 UTC) #9
rsc
fixing reviewer list
13 years, 3 months ago (2012-02-22 04:22:57 UTC) #10
dho
Hello rsc@golang.org, mikioh.mikioh@gmail.com, minux.ma@gmail.com, adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 3 months ago (2012-02-22 04:34:46 UTC) #11
rsc
LGTM I also double-checked that FreeBSD sigprocmask is per-thread, not per-process.
13 years, 3 months ago (2012-02-22 04:38:07 UTC) #12
dho
On 2012/02/22 04:22:29, rsc wrote: > http://codereview.appspot.com/5684060/diff/6/src/pkg/runtime/sys_freebsd_amd64.s > File src/pkg/runtime/sys_freebsd_amd64.s (right): > > http://codereview.appspot.com/5684060/diff/6/src/pkg/runtime/sys_freebsd_amd64.s#newcode239 > ...
13 years, 3 months ago (2012-02-22 04:41:59 UTC) #13
adg
13 years, 3 months ago (2012-02-22 04:44:16 UTC) #14
*** Submitted as http://code.google.com/p/go/source/detail?r=d1c35c41fb2a ***

runtime: fix FreeBSD signal handling around thread creation
Ignore signals while we are spawning a new thread. Previously, a
signal arriving just before runtime.minit setting up the signal
handler triggers a "double fault" in signal trampolining.
Fixes issue 3017.

R=rsc, mikioh.mikioh, minux.ma, adg
CC=golang-dev
http://codereview.appspot.com/5684060

Committer: Andrew Gerrand <adg@golang.org>
Sign in to reply to this message.

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