From: Bob Rogers <[EMAIL PROTECTED]>
Date: Sat, 23 Sep 2006 17:43:28 -0400
From: "Matt Diephouse" <[EMAIL PROTECTED]>
Date: Sat, 23 Sep 2006 16:56:44 -0400
Unfortunately, this patch breaks Tcl. There seems to be some bug with
exceptions.
Here's the Tcl used for this example:
proc test {} {uplevel #0 {append}}
test
Hmm. I seem to have broken rethrow . . . or maybe not.
Try the attached patch. If it works, then we have a problem, because
here's the original comment (which I deleted) that went with this line
of code:
/*
* During interpreter creation there is an initial context
* and the context of :main, created by runops_fromc_args
* Therefore, it seems, we have the main context twice
* and an exception handler in main can catch the same
* exception twich e.g. after rethrow
*
* The same problem can arise after a tailcall.
*
* So invalidate entry_type.
*/
But I can't see that either of these conditions could possibly apply
here. So we have a mystery. Possibly this was hiding some other bug,
which it would be better to identify and fix instead.
Leo?
-- Bob
Index: src/exceptions.c
===================================================================
--- src/exceptions.c (revision 14695)
+++ src/exceptions.c (working copy)
@@ -242,6 +242,8 @@
handler = UVal_pmc(e->entry);
if (handler && handler->vtable->base_type ==
enum_class_Exception_Handler) {
+ /* [kludge. -- rgr, 23-Sep-06.] */
+ e->entry_type = NO_STACK_ENTRY_TYPE;
return handler;
}
}