Fix issue when GC is called while allocating native stack trace
parent
ab4df9d8e6
commit
aa23766df2
|
@ -1,6 +1,5 @@
|
||||||
+ 0.87:
|
+ 0.87:
|
||||||
|
|
||||||
- thrown_* vars are not gc roots
|
|
||||||
- "ker" C+u: for a moment, full vocab list is shown
|
- "ker" C+u: for a moment, full vocab list is shown
|
||||||
- : foo \ each reload foo ; foo eventually crashes
|
- : foo \ each reload foo ; foo eventually crashes
|
||||||
- list usability
|
- list usability
|
||||||
|
|
8
vm/run.c
8
vm/run.c
|
@ -256,7 +256,8 @@ void early_error(CELL error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CELL native_stack_trace(void)
|
/* allocates memory */
|
||||||
|
CELL allot_native_stack_trace(void)
|
||||||
{
|
{
|
||||||
F_STACK_FRAME *frame = native_stack_pointer();
|
F_STACK_FRAME *frame = native_stack_pointer();
|
||||||
GROWABLE_ARRAY(array);
|
GROWABLE_ARRAY(array);
|
||||||
|
@ -285,12 +286,15 @@ void throw_error(CELL error, bool keep_stacks)
|
||||||
{
|
{
|
||||||
early_error(error);
|
early_error(error);
|
||||||
|
|
||||||
|
REGISTER_ROOT(error);
|
||||||
|
thrown_native_stack_trace = allot_native_stack_trace();
|
||||||
|
UNREGISTER_ROOT(error);
|
||||||
|
|
||||||
throwing = true;
|
throwing = true;
|
||||||
thrown_error = error;
|
thrown_error = error;
|
||||||
thrown_keep_stacks = keep_stacks;
|
thrown_keep_stacks = keep_stacks;
|
||||||
thrown_ds = ds;
|
thrown_ds = ds;
|
||||||
thrown_rs = rs;
|
thrown_rs = rs;
|
||||||
thrown_native_stack_trace = native_stack_trace();
|
|
||||||
|
|
||||||
/* Return to interpreter() function */
|
/* Return to interpreter() function */
|
||||||
LONGJMP(stack_chain->toplevel,1);
|
LONGJMP(stack_chain->toplevel,1);
|
||||||
|
|
Loading…
Reference in New Issue