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

Issue 4832060: code review 4832060: runtime: correct seh installation during callbacks (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 7 months ago by brainman
Modified:
13 years, 7 months ago
Reviewers:
CC:
golang-dev, r, hector
Visibility:
Public.

Description

runtime: correct seh installation during callbacks Every time we enter callback from Windows, it is possible that go exception handler is not at the top of per-thread exception handlers chain. So it needs to be installed again. At this moment this is done by replacing top SEH frame with SEH frame as at time of syscall for the time of callback. This is incorrect, because, if exception strike, we won't be able to call any exception handlers installed inside syscall, because they are not in the chain. This changes procedure to add new SEH frame on top of existing chain instead. I also removed m sehframe field, because I don't think it is needed. We use single global exception handler everywhere.

Patch Set 1 #

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

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

Total comments: 4

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -14 lines) Patch
M src/pkg/runtime/runtime.h View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M src/pkg/runtime/windows/386/sys.s View 1 3 chunks +15 lines, -11 lines 0 comments Download

Messages

Total messages: 3
brainman
Hello golang-dev@googlegroups.com (cc: hectorchu@gmail.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 7 months ago (2011-08-09 06:18:42 UTC) #1
r
LGTM http://codereview.appspot.com/4832060/diff/3001/src/pkg/runtime/runtime.h File src/pkg/runtime/runtime.h (right): http://codereview.appspot.com/4832060/diff/3001/src/pkg/runtime/runtime.h#newcode251 src/pkg/runtime/runtime.h:251: d http://codereview.appspot.com/4832060/diff/3001/src/pkg/runtime/runtime.h#newcode255 src/pkg/runtime/runtime.h:255: d
13 years, 7 months ago (2011-08-10 06:06:23 UTC) #2
brainman
13 years, 7 months ago (2011-08-10 07:17:37 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=4ebeab48e11a ***

runtime: correct seh installation during callbacks

Every time we enter callback from Windows, it is
possible that go exception handler is not at the top
of per-thread exception handlers chain. So it needs
to be installed again. At this moment this is done
by replacing top SEH frame with SEH frame as at time
of syscall for the time of callback. This is incorrect,
because, if exception strike, we won't be able to call
any exception handlers installed inside syscall,
because they are not in the chain. This changes
procedure to add new SEH frame on top of existing
chain instead.

I also removed m sehframe field, because I don't
think it is needed. We use single global exception
handler everywhere.

R=golang-dev, r
CC=golang-dev, hectorchu
http://codereview.appspot.com/4832060

http://codereview.appspot.com/4832060/diff/3001/src/pkg/runtime/runtime.h
File src/pkg/runtime/runtime.h (right):

http://codereview.appspot.com/4832060/diff/3001/src/pkg/runtime/runtime.h#new...
src/pkg/runtime/runtime.h:251: 
On 2011/08/10 06:06:23, r wrote:
> d

Done.

http://codereview.appspot.com/4832060/diff/3001/src/pkg/runtime/runtime.h#new...
src/pkg/runtime/runtime.h:255: 
On 2011/08/10 06:06:23, r wrote:
> d

Done.
Sign in to reply to this message.

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