mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-18 18:00:11 +00:00
Avoid crashes when ':eval' deletes our frame
* src/xdisp.c (display_mode_element): Signal an error if ':eval' somehow deletes the frame whose window we are redisplaying. (Bug#29726)
This commit is contained in:
parent
9105c9aa34
commit
720ed0b533
1 changed files with 8 additions and 0 deletions
|
@ -23685,6 +23685,14 @@ display_mode_element (struct it *it, int depth, int field_width, int precision,
|
||||||
{
|
{
|
||||||
Lisp_Object spec;
|
Lisp_Object spec;
|
||||||
spec = safe__eval (true, XCAR (XCDR (elt)));
|
spec = safe__eval (true, XCAR (XCDR (elt)));
|
||||||
|
/* The :eval form could delete the frame stored in the
|
||||||
|
iterator, which will cause a crash if we try to
|
||||||
|
access faces and other fields (e.g., FRAME_KBOARD)
|
||||||
|
on that frame. This is a nonsensical thing to do,
|
||||||
|
and signaling an error from redisplay might be
|
||||||
|
dangerous, but we cannot continue with an invalid frame. */
|
||||||
|
if (!FRAME_LIVE_P (it->f))
|
||||||
|
signal_error (":eval deleted the frame being displayed", elt);
|
||||||
n += display_mode_element (it, depth, field_width - n,
|
n += display_mode_element (it, depth, field_width - n,
|
||||||
precision - n, spec, props,
|
precision - n, spec, props,
|
||||||
risky);
|
risky);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue