]> git.eshelyaron.com Git - emacs.git/commitdiff
Clear gcprolist etc. after stack overflow
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 14 Jul 2015 13:59:26 +0000 (06:59 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 14 Jul 2015 14:03:06 +0000 (07:03 -0700)
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.

src/alloc.c
src/eval.c

index c9bdcc216c71a0f2f84a9efa6984797240034af1..9ac3ad84131af4ddf81bc85b577305456993368e 100644 (file)
@@ -7255,8 +7255,6 @@ init_alloc_once (void)
 void
 init_alloc (void)
 {
-  gcprolist = 0;
-  byte_stack_list = 0;
 #if GC_MARK_STACK
 #if !defined GC_SAVE_REGISTERS_ON_STACK && !defined GC_SETJMP_WORKS
   setjmp_tested_p = longjmps_done = 0;
index 46550955d440e06ea93da908290d8f11bce645da..4f7f42f1ebea7794c11b1403b7d37680a2998d33 100644 (file)
@@ -220,6 +220,8 @@ static struct handler handlerlist_sentinel;
 void
 init_eval (void)
 {
+  gcprolist = 0;
+  byte_stack_list = 0;
   specpdl_ptr = specpdl;
   { /* Put a dummy catcher at top-level so that handlerlist is never NULL.
        This is important since handlerlist->nextfree holds the freelist