Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Crash with =~ in script, but not interactively
- X-seq: zsh-workers 24353
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: Crash with =~ in script, but not interactively
- Date: Fri, 4 Jan 2008 11:35:39 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=uq4JOB4LWQ5Kdqpi3M/iXe4OxEbvRkwguioPFVA1psU=; b=Fw09o89tF7FcHWRc/IahnirNDivwf3yzoZPGWxMX9pIrNVpC0aF14Td+lFo4GMNX/QqBatmXPDPMGPKjcd43XyyWTJweTmPOAislwQGMaE6D1kAm9sCjywD8i7b0oqLQ7ilnQMc5FlsOCnKzYjJManXBybdeVkGACBdmk8gytUs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NklOZs5t+yZNWzm7QMSDag0uSrrLEaqzQwdx9ViRKDzUy6+Q9Cb+vC7xRmngyvTITk+IXUizTBFi6ec2GKIjB+JSn4ffnT4AnUr+iJhFNktAH6zhP+SId2qtVZ50c1iYgaEW50KezUjZeqnymkWDGaSD3iVhHgQrV08pBi4zCUs=
- In-reply-to: <237967ef0801040127k49e92485rf09ce72c47d076c5@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <237967ef0801040127k49e92485rf09ce72c47d076c5@xxxxxxxxxxxxxx>
On 04/01/2008, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> I was going to make a wrapper script that replaces the :43: in gcc
> warnings with +43 so i can open in vim easierly, but ran into some
> problems.
>
> #!/bin/zsh
> #this makes zsh segfault
> if [[ $#@ = 1 ]]; then
> if [[ $1 =~ /?[^/]+:[0-9]+:$ ]]; then
> echo hello
> fi
> fi
>
> If i save that in a file and run 'zsh file' it crashes, but if i run
> 'source file' in an open shell it works as expected. Here's a
> backtrace with -g3 -O0
Just checked, this happens directly on the commit "23375: Phil
Pennock: =~, zsh/regex etc. etc.", so the bug wasn't introduced after
that. Likely the bug is somewhere else, but I can't reproduce it with
just a = instead of the =~.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author