Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: A repeating core, just sharing backtrace



On 10 July 2018 at 15:38, Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> On Tue, 10 Jul 2018 14:33:19 +0100
> Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
>> diff --git a/Src/exec.c b/Src/exec.c
>> index 5864020..47a4567 100644
>> --- a/Src/exec.c
>> +++ b/Src/exec.c
>> @@ -4418,7 +4418,9 @@ gethere(char **strp, int typ)
>>       while ((c = hgetc()) == '\t' && strip)
>>           ;
>>       for (;;) {
>> -         if (bptr == buf + bsiz) {
>> +         if (bptr >= buf + bsiz - 1) {
>
> ... make that "-2", because we need to allow for two *more* updates.
> The previous logic just allowed for where we'd already got to, because
> it just needed to check one position.  That doesn't work any more.

I've tested if core still repeats (who knows), then I've updated and
recompiled zsh, then tested 3 times the script invocation that caused
segfault, and there was no such problem anymore. I've also checked if
tests pass.

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin



Messages sorted by: Reverse Date, Date, Thread, Author