diff options
| author | Tom Tromey <tromey@redhat.com> | 2013-07-06 14:31:16 -0600 |
|---|---|---|
| committer | Tom Tromey <tromey@redhat.com> | 2013-07-06 14:31:16 -0600 |
| commit | 0a6f2ff0c8ceb29703e76cddd46ea3f176dd873a (patch) | |
| tree | 838b6193378e201d1b14d4361a4e8c44b5c7d09e | |
| parent | 32ca162e99da7767a0c1fde6b4aa9fb746680ec4 (diff) | |
| download | emacs-0a6f2ff0c8ceb29703e76cddd46ea3f176dd873a.tar.gz | |
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
| -rw-r--r-- | src/alloc.c | 5 |
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 flush_stack_call_func (void (*func) (void *arg), void *arg) { void *end; + struct thread_state *self = current_thread; #ifdef HAVE___BUILTIN_UNWIND_INIT /* Force callee-saved registers and register windows onto the stack. @@ -4702,8 +4703,10 @@ flush_stack_call_func (void (*func) (void *arg), void *arg) #endif /* not GC_SAVE_REGISTERS_ON_STACK */ #endif /* not HAVE___BUILTIN_UNWIND_INIT */ - current_thread->stack_top = end; + self->stack_top = end; (*func) (arg); + + eassert (current_thread == self); } #endif /* GC_MARK_STACK != 0 */ |
