From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18266 invoked by alias); 6 Jan 2011 18:51:44 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28584 Received: (qmail 21026 invoked from network); 6 Jan 2011 18:51:42 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at rzhou.org does not designate permitted sender hosts) Date: Thu, 6 Jan 2011 13:51:35 -0500 From: Ricky Zhou To: zsh-workers@zsh.org Subject: Re: Certain pattern causing shell to crash Message-ID: <20110106185134.GA10630@alpha.rzhou.org> Mail-Followup-To: zsh-workers@zsh.org References: <20110106160802.GA4655@Xye> <20110106182201.27da4de9@pwslap01u.europe.root.pri> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MGYHOYXEY6WxJCY8" Content-Disposition: inline In-Reply-To: <20110106182201.27da4de9@pwslap01u.europe.root.pri> User-Agent: Mutt/1.5.21 (2010-09-15) --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2011-01-06 06:22:01 PM, Peter Stephenson wrote: > Yes, I can get that. The following is about the most simple form that > still causes it to happen: >=20 > crashme() { > if [[ $1 =3D~ ^http:* ]] > then > url=3D${1#*=3D} > fi > } > which crashme >=20 > It appears that the code that decodes the '=3D~' expression (it doesn't > happen if I turn that into '=3D') is causing the state to go awry, so that > the code in the line after the "then" is being read wrongly. It's got > something to do with the regular expression, too; putting that in > parentheses or otherwise quoting the "^" makes it go away, so it maybe > related to how "^" is handled in this case. It shouldn't be too hard to > localise; it's a shame that the the wordcode is completely > impenetrable. For what it's worth, I did a git bisect, and the segfault was introduced in d234059b1c6493e5eefb6c28aa2b8a021d894d51. Hopefully this can be of use to somebody more familiar with how this code works. Thanks, Ricky --MGYHOYXEY6WxJCY8 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCgAGBQJNJg82AAoJEAo9eiREaTF2zvkP/RYT0FVjnRmgaDupMvcsH3S/ xcevKrad14ZAYftQU2+xMxVHTu7eRVwaZZdZej1s3rEW7+0QhK7at/rLaxzsViJm 8fOIDrgPaGq6pRx59F+ErHqOWavzdx29KXu7Yi3acSI8FF/nH/8Ns34Q7dnR92nA TQl3INGzOzxhpKPv6CpNzrl15oZqVppU6Ujg6JI9ODz/5P3YbY3YDxyM4JfjQbrm Jm6H8nLXHBkt5We0Ic846/ioK8wYnMr+qQOZmkF0S59GUU4uIHIlbBk4qim3VjKB +PpgKZ1EsEic1E15k2KBnD1YJRy7Z9WhG2IYp0SErVtcisRKMb2nupsIOypxfcX1 b1i0AHJTWrlx1QZ3XH6Rp/jLwefOA7+r052AqUXTzNgh+ruoBYGNbPsURffB9BNh ONfZdPXx3sE78ixXOzE4mqd7l3bdVm40JNqQBXvYkuO1r7HPJypX8H/hWoL9vYDF 8hqRVHubnec4uvmdDzqDkpQpl9vCg2dBdrjAdWELktzfF/6UkjqRHmRhUAtVVEzg 8WQMIp+8KaT9ogAWpOGI4Xy1l3vLrCrBIxFs9WUHs8W0SLgulNuFHukc8tfntRfM JmJMEOF46vXcqe3aeVjwCRu3PCFNw0H/wmlHI12Za7+18cuqW9aYCA6QQs4/No4V RuHFQ6xIZTT9POxVV/Ju =EYQY -----END PGP SIGNATURE----- --MGYHOYXEY6WxJCY8--