diff options
Diffstat (limited to 'libgo/runtime/go-recover.c')
-rw-r--r-- | libgo/runtime/go-recover.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libgo/runtime/go-recover.c b/libgo/runtime/go-recover.c index fe6031c100f..7101d518ade 100644 --- a/libgo/runtime/go-recover.c +++ b/libgo/runtime/go-recover.c @@ -18,10 +18,13 @@ _Bool __go_can_recover (const void* retaddr) { + G *g; struct __go_defer_stack *d; const char* ret; const char* dret; + g = runtime_g (); + d = g->defer; if (d == NULL) return 0; @@ -50,8 +53,11 @@ __go_can_recover (const void* retaddr) struct __go_empty_interface __go_recover () { + G *g; struct __go_panic_stack *p; + g = runtime_g (); + if (g->panic == NULL || g->panic->__was_recovered) { struct __go_empty_interface ret; |