Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Another minor =~ glitch
- X-seq: zsh-workers 41288
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Another minor =~ glitch
- Date: Wed, 14 Jun 2017 06:49:09 +0200
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=myuhWCbFZ8l2Wfkmy7CcCiF/cZLMlsMRWLZQMNjoKqA=; b=ke3/g7MYqP2TiAl7agWZHlZ3OAzpSyxCTlhmEgQXMMTBP00aQFanTqZsdcf8vWmTJf HBy1WuDlgl6t4/SitQVxI3Gl6hk78bUQUF1jDmzhuKXeFwXBzlaAYbenvsqctLSZ6Uc9 eR7m/SxzUyhWwEje8dOpgMkfIhuNk/Pnlfyfqc7c7XrpytciMIoYGN7pZSFw73Ltc+0w dRc10PfQkX0KAHWNy8/StczzRmm42SCWL9KOc1x55kmHQrxyfOCbIuBsFW5MEFdZACFL 0FFPwr3/ul6YCNwtumMuEAeX4uAXPda0YB/UmUznudiX9vJGs1zqP+UxaA3V5Ha4cKFz xWjg==
- In-reply-to: <CAHYJk3TgQ6bQUWmsLSSHop9TD0nEXPgNW2=k_c4owWSSsENr1w@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: <170407103320.ZM27783@torch.brasslantern.com> <2017-04-08_03.58.46@mobil.systemanalysen.net> <CAH+w=7Yg2spHiw=vCgTHv3k1caW36qtv6az1th3YCHqUD70i8w@mail.gmail.com> <CAHYJk3TgQ6bQUWmsLSSHop9TD0nEXPgNW2=k_c4owWSSsENr1w@mail.gmail.com>
On Wed, Jun 14, 2017 at 6:45 AM, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> On Sat, Apr 8, 2017 at 7:23 AM, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>> On Fri, Apr 7, 2017 at 6:58 PM, Roland Eggner <edvz2@xxxxxxxxxxxxxxxxxx> wrote:
>>>
>>> Regression observed since my Zsh update
>>> from bb6c08b51a079870 to fc1fedda954e1d10.
>>
>> Thanks, that narrows it down to this:
>>
>> diff --git a/Src/cond.c b/Src/cond.c
>> index 9b739f6..a638412 100644
>> --- a/Src/cond.c
>> +++ b/Src/cond.c
>> @@ -139,9 +139,9 @@ evalcond(Estate state, char *fromtest)
>> l = 2;
>> }
>> if (name && IS_DASH(name[0]))
>> - errname = name;
>> + untokenize(errname = name);
>> else if (strs[0] && IS_DASH(*strs[0]))
>> - errname = strs[0];
>> + untokenize(errname = strs[0]);
>> else
>> errname = "<null>";
>> if (name && IS_DASH(name[0]) &&
>
> This patch causes segfaults for me (in the first hunk at least)
> because name can be a readonly string. Should we ztrdup it?
(I probably meant dupstring)
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author