diff options
| author | Andrea Corallo | 2020-05-17 13:23:59 +0100 |
|---|---|---|
| committer | Andrea Corallo | 2020-05-17 22:37:28 +0100 |
| commit | abec255c024938a40fa3c9730f602c0351e5877d (patch) | |
| tree | 223b70e57e9571beb0975ed8565e4ab4a949e320 /src/alloc.c | |
| parent | 5daa7a5fd4aced33a2ae016bde5bb37d1d95edf6 (diff) | |
| download | emacs-abec255c024938a40fa3c9730f602c0351e5877d.tar.gz emacs-abec255c024938a40fa3c9730f602c0351e5877d.zip | |
* Fix Garbage Collector for missing calle-saved regs content (Bug#41357)
* src/alloc.c (SET_STACK_TOP_ADDRESS): Do not call
__builtin_unwind_init.
(flush_stack_call_func1): Rename from 'flush_stack_call_func'.
(flush_stack_call_func): New function to spill all registers
before calling 'flush_stack_call_func1'. This to make sure the
top of the stack identified includes those registers.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c index cc9ba8dbf50..ebc55857ea0 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -4944,12 +4944,10 @@ typedef union | |||
| 4944 | #ifdef HAVE___BUILTIN_UNWIND_INIT | 4944 | #ifdef HAVE___BUILTIN_UNWIND_INIT |
| 4945 | # define SET_STACK_TOP_ADDRESS(p) \ | 4945 | # define SET_STACK_TOP_ADDRESS(p) \ |
| 4946 | stacktop_sentry sentry; \ | 4946 | stacktop_sentry sentry; \ |
| 4947 | __builtin_unwind_init (); \ | ||
| 4948 | *(p) = NEAR_STACK_TOP (&sentry) | 4947 | *(p) = NEAR_STACK_TOP (&sentry) |
| 4949 | #else | 4948 | #else |
| 4950 | # define SET_STACK_TOP_ADDRESS(p) \ | 4949 | # define SET_STACK_TOP_ADDRESS(p) \ |
| 4951 | stacktop_sentry sentry; \ | 4950 | stacktop_sentry sentry; \ |
| 4952 | __builtin_unwind_init (); \ | ||
| 4953 | test_setjmp (); \ | 4951 | test_setjmp (); \ |
| 4954 | sys_setjmp (sentry.j); \ | 4952 | sys_setjmp (sentry.j); \ |
| 4955 | *(p) = NEAR_STACK_TOP (&sentry + (stack_bottom < &sentry.c)) | 4953 | *(p) = NEAR_STACK_TOP (&sentry + (stack_bottom < &sentry.c)) |
| @@ -5025,7 +5023,7 @@ mark_stack (char const *bottom, char const *end) | |||
| 5025 | from FUNC. */ | 5023 | from FUNC. */ |
| 5026 | 5024 | ||
| 5027 | NO_INLINE void | 5025 | NO_INLINE void |
| 5028 | flush_stack_call_func (void (*func) (void *arg), void *arg) | 5026 | flush_stack_call_func1 (void (*func) (void *arg), void *arg) |
| 5029 | { | 5027 | { |
| 5030 | void *end; | 5028 | void *end; |
| 5031 | struct thread_state *self = current_thread; | 5029 | struct thread_state *self = current_thread; |