Commit 2254b6c0 authored by Paul Eggert's avatar Paul Eggert
Browse files

Clear gcprolist etc. after stack overflow

After stack overflow, command_loop calls init_eval, and this needs to
clear gcprolist and byte_stack_list (Bug#20996).
* src/alloc.c (init_alloc):
Move gcprolist and byte_stack_list initialization from here ...
* src/eval.c (init_eval): ... to here.
parent 6a7e7189
...@@ -7255,8 +7255,6 @@ init_alloc_once (void) ...@@ -7255,8 +7255,6 @@ init_alloc_once (void)
void void
init_alloc (void) init_alloc (void)
{ {
gcprolist = 0;
byte_stack_list = 0;
#if GC_MARK_STACK #if GC_MARK_STACK
#if !defined GC_SAVE_REGISTERS_ON_STACK && !defined GC_SETJMP_WORKS #if !defined GC_SAVE_REGISTERS_ON_STACK && !defined GC_SETJMP_WORKS
setjmp_tested_p = longjmps_done = 0; setjmp_tested_p = longjmps_done = 0;
......
...@@ -220,6 +220,8 @@ static struct handler handlerlist_sentinel; ...@@ -220,6 +220,8 @@ static struct handler handlerlist_sentinel;
void void
init_eval (void) init_eval (void)
{ {
gcprolist = 0;
byte_stack_list = 0;
specpdl_ptr = specpdl; specpdl_ptr = specpdl;
{ /* Put a dummy catcher at top-level so that handlerlist is never NULL. { /* Put a dummy catcher at top-level so that handlerlist is never NULL.
This is important since handlerlist->nextfree holds the freelist This is important since handlerlist->nextfree holds the freelist
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment