aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorTom Tromey2013-07-06 14:31:16 -0600
committerTom Tromey2013-07-06 14:31:16 -0600
commit0a6f2ff0c8ceb29703e76cddd46ea3f176dd873a (patch)
tree838b6193378e201d1b14d4361a4e8c44b5c7d09e /src/alloc.c
parent32ca162e99da7767a0c1fde6b4aa9fb746680ec4 (diff)
downloademacs-0a6f2ff0c8ceb29703e76cddd46ea3f176dd873a.tar.gz
emacs-0a6f2ff0c8ceb29703e76cddd46ea3f176dd873a.zip
add assertion to flush_stack_call_func
functions called via flush_stack_call_func are assumed to return with the global lock held again, and with current_thread reset. this assertion verifies part of this
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c
index b5885bdb283..d62b671d440 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4649,6 +4649,7 @@ void
4649flush_stack_call_func (void (*func) (void *arg), void *arg) 4649flush_stack_call_func (void (*func) (void *arg), void *arg)
4650{ 4650{
4651 void *end; 4651 void *end;
4652 struct thread_state *self = current_thread;
4652 4653
4653#ifdef HAVE___BUILTIN_UNWIND_INIT 4654#ifdef HAVE___BUILTIN_UNWIND_INIT
4654 /* Force callee-saved registers and register windows onto the stack. 4655 /* Force callee-saved registers and register windows onto the stack.
@@ -4702,8 +4703,10 @@ flush_stack_call_func (void (*func) (void *arg), void *arg)
4702#endif /* not GC_SAVE_REGISTERS_ON_STACK */ 4703#endif /* not GC_SAVE_REGISTERS_ON_STACK */
4703#endif /* not HAVE___BUILTIN_UNWIND_INIT */ 4704#endif /* not HAVE___BUILTIN_UNWIND_INIT */
4704 4705
4705 current_thread->stack_top = end; 4706 self->stack_top = end;
4706 (*func) (arg); 4707 (*func) (arg);
4708
4709 eassert (current_thread == self);
4707} 4710}
4708 4711
4709#endif /* GC_MARK_STACK != 0 */ 4712#endif /* GC_MARK_STACK != 0 */