[CM] Possible bug in call-with-exit
bil at ccrma.Stanford.EDU
bil at ccrma.Stanford.EDU
Wed Mar 1 15:42:58 PST 2023
I think s7_call_with_catch needs to set a jump point for the
sc->longjmp_ok case, but I haven't figured out yet how to
capture the error handler result in all cases.
Here's what I have now:
(ca line 51216)
else
{
declare_jump_info();
TRACK(sc);
store_jump_info(sc);
set_jump_info(sc, S7_CALL_SET_JUMP); /* ?? */
catch_cstack(p) = &new_goto_start;
if (jump_loc == NO_JUMP)
{
push_stack(sc, OP_CATCH, error_handler, p);
result = s7_call(sc, body, sc->nil);
if (((opcode_t)sc->stack_end[-1]) == OP_CATCH) sc->stack_end -= 4;
}
else result = sc->nil; /* wrong: should be the error handler
result I think */
restore_jump_info(sc);
}
ffitest.c has test cases that break this code.
I'll poke at it tomorrow -- thanks for the bug report!
More information about the Cmdist
mailing list