Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] sigsegv
- X-seq: zsh-workers 51672
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [BUG] sigsegv
- Date: Tue, 25 Apr 2023 14:56:25 +0100 (BST)
- Archived-at: <https://zsh.org/workers/51672>
- Importance: Normal
- In-reply-to: <CAKc7PVDw98bvTSNWo4q52ZJ=i8vhRooKZHb-mOzenJVMoe1MFg@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAKc7PVDw98bvTSNWo4q52ZJ=i8vhRooKZHb-mOzenJVMoe1MFg@mail.gmail.com>
> On 25/04/2023 14:48 Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> wrote:
> I have to say that current HEAD has many sigsegv errors, at least twp.
> The reported in this email is an older problem with alt-/ history
> complete, I've had it also with 5.8. I'm still waiting for the 5.9
> only problem to occur, it's quite random and hard to reproduce.
> To trigger the error, press alt-/ some times.
>
> #0 0x0000000000457868 in insertlinknode (list=list@entry=0x7ffff7abe368,
> node=0x7ffff55600d8, dat=0x7ffff556e8f0) at linklist.c:137
> #1 0x00007ffff7bed6bf in histwgetfn (pm=<optimized out>) at parameter.c:1241
The linked list management itself looks fairly harmless, but I wonder if there's
something in the immediately surrounding code that could be fishy and messing
up memory?
for (iw = he->nwords - 1; iw >= 0; iw--) {
h = he->node.nam + he->words[iw * 2];
e = he->node.nam + he->words[iw * 2 + 1];
sav = *e;
*e = '\0';
addlinknode(l, dupstring(h));
*e = sav;
}
Some testing of strlen(he->node.nam) might not come amiss?
Of course this is total guesswork.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author