GNU bug report logs - #72765
Eglot + Clangd + Company + non-empty suffix = duplicate text

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dmitry <at> gutov.dev>

Date: Thu, 22 Aug 2024 23:09:01 UTC

Severity: normal

Full log


Message #44 received at 72765 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 72765 <at> debbugs.gnu.org, joaotavora <at> gmail.com
Subject: Re: bug#72765: Eglot + Clangd + Company + non-empty suffix =
 duplicate text
Date: Mon, 09 Sep 2024 14:46:09 +0300
> Date: Mon, 9 Sep 2024 03:20:01 +0300
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 72765 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry <at> gutov.dev>
> 
> > This now aborts (segfault?).  At least something different.
> > 
> > So, for the record, before this patch with the latest emacs-30, I get the
> > results in failure1.txt and with your last redisplay-skip-initial-frame patch
> > I get failure2.txt.
> > 
> > I've produced these files with
> > 
> > make -C test eglot-tests SELECTOR=\"rust-completion\" 2>&1 | tee failure1.txt
> 
> So it's reproducible. Great!
> 
> Could someone look into the segfault? The repro steps are simple:
> 
> 1) apply the patch above,
> 2) run 'make -C test eglot-tests' or the longer command above which 
> executes just one test from that file.
> 
> The backtrace that I managed to generate is attached.

Thanks.  Please try the patch below.

P.S. I'm not at all sure this is the last segfault you will see
because you are playing with fire: you are not supposed to reset
redisplay-skip-initial-frame to nil in batch-mode tests that test
redisplay-related features!

diff --git a/src/xdisp.c b/src/xdisp.c
index bf7d84c..a1319e7 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -22089,7 +22089,8 @@ #define GIVE_UP(X) return 0
 
   /* Window must either use window-based redisplay or be full width.  */
   if (!FRAME_WINDOW_P (f)
-      && (!FRAME_LINE_INS_DEL_OK (f)
+      && (FRAME_INITIAL_P (f)
+	  || !FRAME_LINE_INS_DEL_OK (f)
 	  || !WINDOW_FULL_WIDTH_P (w)))
     GIVE_UP (4);
 




This bug report was last modified 282 days ago.

Previous Next


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