From: "Mikael Magnusson" <mikachu@gmail.com>
To: zsh-workers <zsh-workers@sunsite.dk>
Subject: Re: Crash with =~ in script, but not interactively
Date: Fri, 4 Jan 2008 11:35:39 +0100 [thread overview]
Message-ID: <237967ef0801040235o5804bb92rd1d8f20edb21f828@mail.gmail.com> (raw)
In-Reply-To: <237967ef0801040127k49e92485rf09ce72c47d076c5@mail.gmail.com>
On 04/01/2008, Mikael Magnusson <mikachu@gmail.com> 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
next prev parent reply other threads:[~2008-01-04 10:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-04 9:27 Mikael Magnusson
2008-01-04 10:35 ` Mikael Magnusson [this message]
2008-01-04 14:42 ` Peter Stephenson
2008-01-04 15:38 ` Mikael Magnusson
2008-01-04 15:47 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=237967ef0801040235o5804bb92rd1d8f20edb21f828@mail.gmail.com \
--to=mikachu@gmail.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).