From a37290a6f965d0e0c13a734e6be973e1bd43bb7f Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 13 May 2020 10:31:50 +0200 Subject: In x_hide_tip reset tip_last_frame for GTK+ tooltips only (Bug#41200) * src/xfns.c (x_hide_tip): Reset tip_last_frame only when using GTK+ system tooltips (Bug#41200). --- src/xfns.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/xfns.c b/src/xfns.c index a5431aa8909..b89fac1cdac 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -6746,9 +6746,11 @@ x_hide_tip (bool delete) } } - /* Reset tip_last_frame, it will be reassigned when showing the - next GTK+ system tooltip. */ - tip_last_frame = Qnil; + /* When using GTK+ system tooltips (compare Bug#41200) reset + tip_last_frame. It will be reassigned when showing the next + GTK+ system tooltip. */ + if (x_gtk_use_system_tooltips) + tip_last_frame = Qnil; /* Now look whether there's an Emacs tip around. */ if (FRAMEP (tip_frame)) -- cgit v1.3 From 48830c73e77255985685bd2df65f031cd115e069 Mon Sep 17 00:00:00 2001 From: Clément Pit-Claudel Date: Wed, 13 May 2020 10:37:05 -0400 Subject: Fix a crash in handle_display_spec * src/xdisp.c (handle_display_spec): Check that the cdr of the disable-eval spec is a cons before taking its car. (Bug#41232) --- src/xdisp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/xdisp.c b/src/xdisp.c index b0fbc9936fb..1e865898e37 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -5104,7 +5104,7 @@ handle_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object, if (CONSP (spec) && EQ (XCAR (spec), Qdisable_eval)) { enable_eval = false; - spec = XCAR (XCDR (spec)); + spec = CONSP (XCDR (spec)) ? XCAR (XCDR (spec)) : Qnil; } if (CONSP (spec) -- cgit v1.3 From abec255c024938a40fa3c9730f602c0351e5877d Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 17 May 2020 13:23:59 +0100 Subject: * 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. --- src/alloc.c | 4 +--- src/lisp.h | 10 +++++++++- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src') 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 #ifdef HAVE___BUILTIN_UNWIND_INIT # define SET_STACK_TOP_ADDRESS(p) \ stacktop_sentry sentry; \ - __builtin_unwind_init (); \ *(p) = NEAR_STACK_TOP (&sentry) #else # define SET_STACK_TOP_ADDRESS(p) \ stacktop_sentry sentry; \ - __builtin_unwind_init (); \ test_setjmp (); \ sys_setjmp (sentry.j); \ *(p) = NEAR_STACK_TOP (&sentry + (stack_bottom < &sentry.c)) @@ -5025,7 +5023,7 @@ mark_stack (char const *bottom, char const *end) from FUNC. */ NO_INLINE void -flush_stack_call_func (void (*func) (void *arg), void *arg) +flush_stack_call_func1 (void (*func) (void *arg), void *arg) { void *end; struct thread_state *self = current_thread; diff --git a/src/lisp.h b/src/lisp.h index a55fa32950d..ad7d67ae695 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3811,7 +3811,15 @@ extern void alloc_unexec_pre (void); extern void alloc_unexec_post (void); extern void mark_maybe_objects (Lisp_Object const *, ptrdiff_t); extern void mark_stack (char const *, char const *); -extern void flush_stack_call_func (void (*func) (void *arg), void *arg); +extern void flush_stack_call_func1 (void (*func) (void *arg), void *arg); + +INLINE void +flush_stack_call_func (void (*func) (void *arg), void *arg) +{ + __builtin_unwind_init (); + flush_stack_call_func1 (func, arg); +} + extern void garbage_collect (void); extern void maybe_garbage_collect (void); extern const char *pending_malloc_warning; -- cgit v1.3