mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-11 19:53:52 -08:00
Stack overflows now jump to the outermost toplevel.
This commit is contained in:
parent
5f2e473d36
commit
c36eb22e73
4 changed files with 15 additions and 4 deletions
|
|
@ -536,6 +536,9 @@ cl_boot(int argc, char **argv)
|
|||
#endif
|
||||
GC_enable();
|
||||
|
||||
/* Create tag to jump to when aborting */
|
||||
ECL_SET(env, @'si::*quit-tag*', @'si::*quit-tag*');
|
||||
|
||||
/*
|
||||
* Initialize default pathnames
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1835,5 +1835,7 @@ cl_symbols[] = {
|
|||
{EXT_ "WITH-LOCAL-INTERRUPTS", MP_CONSTANT, NULL, -1, OBJNULL},
|
||||
{EXT_ "ALLOW-WITH-INTERRUPTS", MP_CONSTANT, NULL, -1, OBJNULL},
|
||||
|
||||
{SYS_ "*QUIT-TAG*", SI_SPECIAL, NULL, -1, OBJNULL},
|
||||
|
||||
/* Tag for end of list */
|
||||
{NULL, CL_ORDINARY, NULL, -1, OBJNULL}};
|
||||
|
|
|
|||
|
|
@ -254,8 +254,16 @@ jump_to_sigsegv_handler(cl_env_ptr the_env)
|
|||
* frame, which is equivalent to quitting, and wait for
|
||||
* someone to intercept this jump.
|
||||
*/
|
||||
ecl_frame_ptr destination = ecl_process_env()->frs_org;
|
||||
the_env->nvalues = 0;
|
||||
ecl_frame_ptr destination;
|
||||
cl_object tag = SYM_VAL(@'si::*quit-tag*');
|
||||
the_env->nvalues = 0;
|
||||
if (tag) {
|
||||
destination = ecl_frs_sch(SYM_VAL(@'si::*quit-tag*'));
|
||||
if (destination) {
|
||||
ecl_unwind(the_env, destination);
|
||||
}
|
||||
}
|
||||
destination = ecl_process_env()->frs_org;
|
||||
ecl_unwind(the_env, destination);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4328,5 +4328,3 @@ void GC_print_address_map(void)
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue