summaryrefslogtreecommitdiffstats
path: root/unwind.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-12-20 18:56:14 -0800
committerKaz Kylheku <kaz@kylheku.com>2011-12-20 18:56:14 -0800
commit43b3c4a7879e73ef370e696ee7531175857ae554 (patch)
treec50c970a1b58712146eea4c5b17e92509fa9b483 /unwind.h
parent1c9044fb047cadde7e4efa2b110f6a6a80962d1a (diff)
downloadtxr-43b3c4a7879e73ef370e696ee7531175857ae554.tar.gz
txr-43b3c4a7879e73ef370e696ee7531175857ae554.tar.bz2
txr-43b3c4a7879e73ef370e696ee7531175857ae554.zip
Bug #35137
* unwind.c (uw_unwind_to_exit_point): When jumping to a catch frame, do not mark it invisible. * unwind.h (uw_catch): Flip the matches to nil so that this catch frame can no longer be identified as an unwind point by uw_throw, and thus will not be re-entered for the purposes of handling an exception. It remains visible for the purposes of running the clean up code. (uw_unwind): Prior to executing cleanup forms, flip the visibility to 0. This means that the frame will no longer be re-entered for any reason.
Diffstat (limited to 'unwind.h')
-rw-r--r--unwind.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/unwind.h b/unwind.h
index 98b965e7..03e43982 100644
--- a/unwind.h
+++ b/unwind.h
@@ -155,11 +155,17 @@ noreturn val type_mismatch(val, ...);
break; \
case 2: \
EXCVAR = uw_catch.ca.exception; \
- SYMVAR = uw_catch.ca.sym;
+ SYMVAR = uw_catch.ca.sym; \
+ /* prevent looping */ \
+ uw_catch.ca.matches = nil;
#define uw_unwind \
+ /* suppress unused label warning */ \
+ goto uw_unwind_label; \
uw_unwind_label: \
- case 1:
+ case 1: \
+ /* prevent looping */ \
+ uw_catch.ca.visible = 0;
#define uw_catch_end \
break; \