GNU bug report logs - #50571
28.0.50; Redisplay segfaults with empty face cache

Previous Next

Package: emacs;

Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Date: Mon, 13 Sep 2021 15:00:02 UTC

Severity: normal

Found in version 28.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 50571 <at> debbugs.gnu.org
Subject: bug#50571: 28.0.50; Redisplay segfaults with empty face cache
Date: Sun, 19 Sep 2021 19:21:12 +0100
Eli Zaretskii [2021-09-19 18:47 +0300] wrote:

>> From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
>> Cc: 50571 <at> debbugs.gnu.org
>> Date: Sun, 19 Sep 2021 14:57:02 +0100
>> 
>> Unfortunately I found another hole that needs plugging, but fortunately
>> I can reliably reproduce it with the following site-specific steps:
>> 
>> 0. emacs
>> 1. C-x p p (project-switch-project)
>> 2. Select a checkout of https://github.com/abo-abo/swiper,
>>    using Ivy completion.
>> 3. f (project-find-file)
>> 4. ivy.el RET
>> 5. C-s (isearch-forward)
>> 6. C-g
>> 7. M-s s (counsel-grep-or-swiper)
>> 8. #[[:digit:]]
>> 
>> This brings a bug-reference-bug-regexp match onto screen, which again
>> triggers a frame creation via bug-reference's call to display-warning.
>> 
>> The attached GDB log shows where the relevant frame's face cache is
>> cleared right before the crash (search for 'New value = 0'), at which
>> point f->inhibit_clear_image_cache is false.
>
> Thanks for the data.  I guess this is a preview of how allowing
> arbitrary Lisp that affects the display in fontification-functions
> will keep shooting in the foot, time and again.

For that there's M-x kevlar-feet-mode of course, though I'm not sure
it's GPL-compatible.

> Please try the patch below.

It seems to relieve the pain in my feet, thank you very much!

-- 
Basil




This bug report was last modified 3 years and 283 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.