From owner-freebsd-current@FreeBSD.ORG Wed Apr 24 18:12:05 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9D438FB1; Wed, 24 Apr 2013 18:12:05 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id 59D261469; Wed, 24 Apr 2013 18:12:05 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.80.1) with esmtp (envelope-from ) id <1UV4Af-003ITn-9Q>; Wed, 24 Apr 2013 20:11:57 +0200 Received: from g229090146.adsl.alicedsl.de ([92.229.90.146] helo=[192.168.0.128]) by inpost2.zedat.fu-berlin.de (Exim 4.80.1) with esmtpsa (envelope-from ) id <1UV4Af-003HTK-5R>; Wed, 24 Apr 2013 20:11:57 +0200 Subject: Re: CURRENT (r249438): (devel/libiconv)./unistd.h:686:5: error: invalid token at start of a preprocessor expression : #if @GNULIB_EUIDACCESS@ From: "O. Hartmann" To: Dimitry Andric In-Reply-To: <532C5501-DA3C-4098-AAB4-D6C6BE6BB7FB@freebsd.org> References: <1365877246.2093.20.camel@thor.walstatt.dyndns.org> <1URs5b-000B9U-A2@internal.tormail.org> <1USKxR-00025i-Tt@internal.tormail.org> <516EF507.6040309@FreeBSD.org> <532C5501-DA3C-4098-AAB4-D6C6BE6BB7FB@freebsd.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-3Don2O7NaYw/83uy6UYc" Date: Wed, 24 Apr 2013 20:11:56 +0200 Message-ID: <1366827116.1454.1.camel@thor.walstatt.dyndns.org> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port X-Originating-IP: 92.229.90.146 Cc: FreeBSD Current , FreeBSD ports , Jung-uk Kim , Jan Beich X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Apr 2013 18:12:05 -0000 --=-3Don2O7NaYw/83uy6UYc Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Tue, 2013-04-23 at 21:03 +0200, Dimitry Andric wrote: > On Apr 17, 2013, at 21:16, Jung-uk Kim wrote: > > On 2013-04-17 06:07:47 -0400, Dimitry Andric wrote: > >> On Apr 17, 2013, at 07:31, Jan Beich wrote: > >>> Dimitry Andric writes: On Apr 16, 2013, at > >>> 00:42, Jan Beich wrote: > >> ... > >>>>> Maybe -O3 overoptimizes regex in libc e.g., > >>>>>=20 > >>>>> $ echo '#if @GNULIB_EUIDACCESS@' | sed > >>>>> 's/@GNULIB_EUIDACCESS@/0/' #if @GNULIB_EUIDACCESS@ > >>>>>=20 > >>>>> $ echo 'aaaaaaaaaaaaaaaaxxxaaaa' | sed > >>>>> 's/aaaaaaaaaaaaxxxaaaa//' aaaaaaaaaaaaaaaaxxxaaaa > >>>>=20 > >>>> How did you arrive at this result? > >>>=20 > >>> 1/ chroot into poudriere jail for /head amd64 2/ echo CFLAGS+=3D-O3 > >>>>> /etc/make.conf 3/ make -j2 (in /usr/src/lib/libc) 4/ prepend > >>> LD_LIBRARY_PATH=3D. before sed(1) 5/ rebuild regcomp.o, regcomp.So > >>> with -O2 to confirm > >>=20 > >> I have been able to reproduce this on amd64, with -O3, but not on > >> i386. It seems regcomp() is either miscompiled at -O3, or it > >> contains some bug triggered only by the vectorizer. I am still > >> investigating. > > ... > >=20 > > With "-fno-vectorize", this problem doesn't seem to happen. >=20 > After some more investigation, I submitted LLVM PR 15830, with a test > case reduced from our regcomp.c. It got diagnosed and fixed pretty > quickly, and I have pulled in the fix in r249817. Please verify it, by > rebuilding libc with your original -O3 settings; the sed commands listed > above should now work correctly. Both the ports devel/libiconv and graphics/jasper do not show the reported error anymore after this patch! Thanks for helping fixing this that fast! With regards, Oliver --=-3Don2O7NaYw/83uy6UYc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAABAgAGBQJReCBsAAoJEOgBcD7A/5N8QE4H/jiT/sd1DwfkY0E5osnpiiWO ylLCC1Y/72wHxc/Z4kv5sTo8fRyvwL89CZVTiQVtadOnnXsduxptg1R2wJ+v9OS7 AHSnjF5HqOzOqPoJwGHJOFwqOqyQ/spx6PlQWP/MFk8g7NbdhpysFeCtEZNMWmxH Z+bUtA19iueXBIc4wHZ4tS1IVBxES+PqTnDgeJbwqqKfCHovz9d5qdd5Y+/fVZiP 0nkRS6WUVt9ZDks0dFgbtPSl5Nod+cDjNMks+PTwEwYuVfVmEBt9yrc/de24fjLF OqprLVck12Yj8GNdLQMN1tEwkjoabqyEMno0fA7RifZlGtDrtWytt3Y/ZV8CLtI= =mA+C -----END PGP SIGNATURE----- --=-3Don2O7NaYw/83uy6UYc--