Problem: Crash when there is an error in a timer callback. (Aron Griffis,
Ozaki Kiichi)
Solution: Check did_throw before discarding an exception. NULLify
current_exception when no longer valid.
if (called_emsg)
{
++timer->tr_emsg_count;
- if (!did_throw_save && current_exception != NULL)
+ if (!did_throw_save && did_throw && current_exception != NULL)
discard_current_exception();
}
did_emsg = did_emsg_save;
void
discard_current_exception(void)
{
- discard_exception(current_exception, FALSE);
- current_exception = NULL;
+ if (current_exception != NULL)
+ {
+ discard_exception(current_exception, FALSE);
+ current_exception = NULL;
+ }
did_throw = FALSE;
need_rethrow = FALSE;
}
* there is an extra instance for every call of do_cmdline(), anyway.
*/
if (did_throw || need_rethrow)
+ {
csp->exception = current_exception;
+ current_exception = NULL;
+ }
else
{
csp->exception = NULL;
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 705,
/**/
704,
/**/