runtime: Plan 9: add support for recover() and panic() in note handler
This change also resolves some issues with note handling: we now make sure that there is enough room at the bottom of every goroutine to execute the note handler, and the `exitstatus' is no longer a global entity, which resolves some race conditions.
Hello rminnich@gmail.com, npe@plan9.bell-labs.com, john@jfloren.net, david.jakob.fritz@gmail.com, rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change ...
12 years, 5 months ago
(2012-09-28 23:26:41 UTC)
#1
Thanks for the review! On 10 January 2013 03:19, <ality@pbrane.org> wrote: https://codereview.appspot.com/6569068/diff/43003/src/pkg/runtime/signal_plan9_386.c#newcode29 > src/pkg/runtime/signal_plan9_386.c:29: runtime·sighandler(void ...
12 years, 2 months ago
(2013-01-10 03:33:04 UTC)
#5
Thanks for the review!
On 10 January 2013 03:19, <ality@pbrane.org> wrote:
https://codereview.appspot.com/6569068/diff/43003/src/pkg/runtime/signal_plan...
> src/pkg/runtime/signal_plan9_386.c:29: runtime·sighandler(void *v, int8
> *s, G *gp)
> I think this is mostly fine for now but we're going to have
> to change the logic in this function once we add support
> for os/signal.
Yes, but one thing at a time. I have some code for the rest,
but it builds upon this stuff and this is already quite a bit to
review and get right, for now. A subsequent CL will add to
this, in order to properly handle asynchronous signals.
I'll fix up the rest soon.
Best,
Akshat
Very close. https://codereview.appspot.com/6569068/diff/52001/src/pkg/runtime/signal_plan9_386.c File src/pkg/runtime/signal_plan9_386.c (right): https://codereview.appspot.com/6569068/diff/52001/src/pkg/runtime/signal_plan9_386.c#newcode69 src/pkg/runtime/signal_plan9_386.c:69: You need to push the PC onto ...
12 years, 1 month ago
(2013-01-20 08:44:46 UTC)
#8
After some testing, I realized that storing the note-string at m->gsignal->sigcode0 causes stack corruption after ...
12 years, 1 month ago
(2013-01-24 13:16:21 UTC)
#11
After some testing, I realized that storing the note-string at
m->gsignal->sigcode0 causes stack corruption after sufficiently many
panic-recover sequences that come from synchronous traps. To address this, I've
updated the code by adding a Plan 9-specific field to M where I now store the
note-string. Now, arbitrarily many panic-recover sequences can run without
causing GP faults.
PTAL.
*** Submitted as https://code.google.com/p/go/source/detail?r=f6172d444cc0 *** runtime: add support for panic/recover in Plan 9 note handler ...
12 years, 1 month ago
(2013-01-30 10:54:09 UTC)
#13
*** Submitted as https://code.google.com/p/go/source/detail?r=f6172d444cc0 ***
runtime: add support for panic/recover in Plan 9 note handler
This change also resolves some issues with note handling: we now make
sure that there is enough room at the bottom of every goroutine to
execute the note handler, and the `exitstatus' is no longer a global
entity, which resolves some race conditions.
R=rminnich, npe, rsc, ality
CC=golang-dev
https://codereview.appspot.com/6569068
Committer: Anthony Martin <ality@pbrane.org>
Issue 6569068: code review 6569068: pkg/runtime: Plan 9: add support for recover() and pani...
(Closed)
Created 12 years, 5 months ago by akumar
Modified 12 years, 1 month ago
Reviewers:
Base URL:
Comments: 49