Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] SIGSEGV under certain circumstances
- X-seq: zsh-workers 40751
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: [BUG] SIGSEGV under certain circumstances
- Date: Sun, 5 Mar 2017 15:07:36 -0800
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=brasslantern-com.20150623.gappssmtp.com
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=FAZCrtGUEZtoeQm9B4UYHfHjWdqeOvKlF58YLJI16Gw=; b=qlEpZAMVV6r66V1/CtKsXZ9HTUcAKe9Zqeel29yY0k5Vasngll5IPBljP8fPrpHgoX a07njbJQin8m3enrlfI6gx+8eaUXl7oSnZ6N7N/IJQlogev67aDLuiOqZG6ysYKXun/d w2/aziWPwe75hO4mCNLVNmrATKiomQapebtfet1+Xw9oTH9FiynXxMzqWTabV7AhuOpT Y0KjM0/A7uMsdKkxq+IdGB7UHVqo+NSgdNwJfuq9JFiO5e+VcbHgXawgFFnZSDbaC5Y0 rmO2YjQuHwWCnahNEI/Ks0ICucQqeY53NugW2l3ty9iVReCSqOHlEXjroS/QswFif6lx kIow==
- In-reply-to: <CAH+w=7ZNdQ9XsXSD2znAj=cZNR0rLK7+tRiH1XkQNk=61-AUpw@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAMNjDR1CUaw2AXbEDLP94R=4VCNj1yc=d3OcVj=tO6FZXAEqPQ@mail.gmail.com> <170304151137.ZM30694@torch.brasslantern.com> <CAMNjDR0A-c=Q3AD1hCrbas3YRJ1VXp68KbSLcdMDFH7JQYNdng@mail.gmail.com> <170305080054.ZM24832@torch.brasslantern.com> <20170305161720.6f3773d6@ntlworld.com> <170305104239.ZM25231@torch.brasslantern.com> <5096E600-D76C-4F71-BE93-C46F256BA7D7@ntlworld.com> <170305134513.ZM26364@torch.brasslantern.com> <20170305224100.GA18432@fujitsu.shahaf.local2> <CAH+w=7ZNdQ9XsXSD2znAj=cZNR0rLK7+tRiH1XkQNk=61-AUpw@mail.gmail.com>
On Sun, Mar 5, 2017 at 2:51 PM, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Sun, Mar 5, 2017 at 2:41 PM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>>
>> The part that confuses me is why the line says 'mp += cl' rather than
>> simply 'mp++'. The inner loop executes precisely 'zl' times (because
>> the loop variable, 'tl', is initialized to 'al' and skips Meta bytes),
>> and 'mp' points into an array of size 'zl'.
>
> Yes, that's the part that confuses me as well, i.e., why is mb
> incremented once for every byte rather than once for every character?
Also, it seems to me cl needs to be the number of bytes compared by
pattern_match(), which is not always just 1 or 2 with wide characters.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author