Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jul 2013 21:23:23 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Michael Sperber <sperber@deinprogramm.de>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Weird regex behavior on 9.1-RELEASE on amd64 in 32-bit mode
Message-ID:  <20130709182323.GT91021@kib.kiev.ua>
In-Reply-To: <y9lppura9nt.fsf@deinprogramm.de>
References:  <y9lppura9nt.fsf@deinprogramm.de>

next in thread | previous in thread | raw e-mail | index | archive | help

--VpUBlsHIhxZRXmtQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jul 09, 2013 at 08:08:22PM +0200, Michael Sperber wrote:
>=20
> I noticed that scsh (which only runs in 32-bit mode) fails on amd64.  I
> narrowed it down to a regex malfunction (I think).  This program:
>=20
> ----snip----
> #include <regex.h>
> #include <stdio.h>
>=20
> int
> main(void)
> {
>   regex_t r;
>   int status =3D regcomp(&r, "/afs", REG_EXTENDED);
>   size_t nmatch   =3D 1 + r.re_nsub;
>   regmatch_t pmatch[32];
>   status =3D regexec(&r, "/afs/informatik", nmatch, pmatch, 0);
>   {
>     int i;
>     for(i =3D 0; i < nmatch; i--) {
>       printf("%d: %d - %d\n", i, (int) pmatch[i].rm_so, (int) pmatch[i].r=
m_eo);
>     }
>   }
>   return 0;
> }
> ----snip----
>=20
> This giveds me:
>=20
> # gcc r.c
> # ./a.out
> 0: 0 - 4
> # gcc -m32 r.c
> # ./a.out
> 0: 0 - 0
>=20
> Is it me or is there a bug?  Help would be much appreciated!

-m32 does not work on stable.  You need HEAD.

--VpUBlsHIhxZRXmtQ
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iQIcBAEBAgAGBQJR3FUbAAoJEJDCuSvBvK1BesIP/1+C2iJGUjRMYRRxiuRAd31H
XomH7+JmKofREDqJqHggIVSe6buMyHrmSPamUgGc1tebTq/5eUnf1DzG5Kn97bN1
QO30joh495h1FK9mSbyv+GGhVlMQMpipTU5DfFpflRcfCzpnW7MRYjKMkJBTba5I
1gTUyx0HBEReF7e/1rOZ54BP2ND25owoHWvIz27uHKdTol6In5gvNbeQOs7E4j1o
bwID21xh3A9YPReVD39zfFzfRIGwnnyITdQcm8r9P3Fp3tA0L4J5By9Vs4Y41ETm
SdscRzfeX+l7kB/GrzDgjWOnOLS6OoNOZHhpPY+gIBIh3Ibe/qITu9Gd0zcvTSpg
LS8IEvRwZjc1qsfYNpSn2W0mBKoNV7TnCL96AcIrfzYsu9xm6o+Q+WckhTDMqZdS
idNES7/hd86Bv7iNQS+jWPO14AHl+FtMFbNFTh3p5POC11jN8cAtmdoz+mMNePuc
ble5YCV84+Vz3Gr0YIbIw40Sl0/HbHjPUkN5U6lAIqPh4bltbBgogBp9fN0vnKNa
SI0yDjD8HdvjA0vQYnrEHtTZRDvTMa/DsDJcT2goI5qI5y9NAirobppjJNPno8HD
uMpeHOOOLoR1fdKs/sg2QiUibW/nfzlGAxPQCX5fMpuZravAO5N+FT1W+WBR9pkA
sUr96oBO7AjZ4NMU9Rcz
=Nn75
-----END PGP SIGNATURE-----

--VpUBlsHIhxZRXmtQ--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130709182323.GT91021>