Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Segfault upon interrupt of completion - opinions?
- X-seq: zsh-workers 53360
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Segfault upon interrupt of completion - opinions?
- Date: Tue, 11 Feb 2025 15:01:30 -0800
- Archived-at: <https://zsh.org/workers/53360>
- In-reply-to: <CAH+w=7Zu1hKLycc3wdCRvR=SsHKFMvP5r7R24t3SJV3spqsJJw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7ZKqb-iy6AAeiU4viaX-5ho=zRTZ7Zfu+KOrRW_zKOUfw@mail.gmail.com> <CAH+w=7Y3HU12kKJC=9=cUUbeUCRpjT6zdvoAgDUcHfL0LKf1KA@mail.gmail.com> <CAH+w=7Zu1hKLycc3wdCRvR=SsHKFMvP5r7R24t3SJV3spqsJJw@mail.gmail.com>
On Tue, Feb 11, 2025 at 10:02 AM Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> > Option 4: domenuselect() can be a no-op following interrupt.
>
> As long as I'm soliciting advice -- what other ZLE state could/should
> be checked here? Possibly "resetneeded"? Anything else?
Having dug a bit further, I think the below will probably solve the
crash -- domenuselect() needs an existing completion list from which
to build the display.
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 5619160a9..a84f34572 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -2391,6 +2391,9 @@ domenuselect(Hookdef dummy, Chdata dat)
char *s;
char status[MAX_STATUS], *modeline = NULL;
+ if (! hasoldlist)
+ return 2;
+
msearchstack = NULL;
msearchstr = "";
msearchstate = MS_OK;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author