From owner-freebsd-current@FreeBSD.ORG Wed Apr 17 05:34:22 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5CC8364E; Wed, 17 Apr 2013 05:34:22 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) by mx1.freebsd.org (Postfix) with ESMTP id 1B98DB44; Wed, 17 Apr 2013 05:34:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1USL0d-0005yd-Cc; Wed, 17 Apr 2013 09:34:19 +0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:Subject:Cc:To:From; bh=wS62jRt1HduYuzj4bJZYyfrsnQkNMRDP9JwZCM3ftHw=; b=pq0My69ibiQZFAQMgsiwinnOh0CC8Xc0Z8Vn6/TRHWDhVH8fjhQf+UjlXaMdS6Iv9x85CLbAOk8IfDKLbu4cCfiu4uYD4a3SlZ20rqH4sWGVaUKctNWwU0ru3yCoz/ESsEhtUw8eeKaR/o1gnpHmCpfdVepRCDY2peVxrXQBwxg=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1USKxR-00025i-Tt; Wed, 17 Apr 2013 05:31:03 +0000 From: Jan Beich To: Dimitry Andric Subject: Re: CURRENT (r249438): (devel/libiconv)./unistd.h:686:5: error: invalid token at start of a preprocessor expression : #if @GNULIB_EUIDACCESS@ Date: Tue, 16 Apr 2013 22:31:36 -0700 References: <1365877246.2093.20.camel@thor.walstatt.dyndns.org> <1URs5b-000B9U-A2@internal.tormail.org> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1USKxR-00025i-Tt@internal.tormail.org> Cc: FreeBSD Current , "O. Hartmann" , FreeBSD ports 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, 17 Apr 2013 05:34:22 -0000 Dimitry Andric writes: > On Apr 16, 2013, at 00:42, Jan Beich wrote: > >> "O. Hartmann" writes: >>> ./unistd.h:694:5: error: invalid token at start of a preprocessor >>> expression >>> #if @GNULIB_EUIDACCESS@ >>> ^ >>> 1 error generated. >> >> Maybe -O3 overoptimizes regex in libc e.g., >> >> $ echo '#if @GNULIB_EUIDACCESS@' | sed 's/@GNULIB_EUIDACCESS@/0/' >> #if @GNULIB_EUIDACCESS@ >> >> $ echo 'aaaaaaaaaaaaaaaaxxxaaaa' | sed 's/aaaaaaaaaaaaxxxaaaa//' >> aaaaaaaaaaaaaaaaxxxaaaa > > How did you arrive at this result? 1/ chroot into poudriere jail for /head amd64 2/ echo CFLAGS+=-O3 >> /etc/make.conf 3/ make -j2 (in /usr/src/lib/libc) 4/ prepend LD_LIBRARY_PATH=. before sed(1) 5/ rebuild regcomp.o, regcomp.So with -O2 to confirm > I have recompiled both libc and sed > with -O3, but it works just fine here. > Maybe -march=native is the clue, so which kind of CPU do you have? sse2 is available on amd64 even without -march=. But I can't reproduce the issue on i386 even with -march=native. > To see what CPU llvm detects, try: > > tblgen -version | grep CPU Host CPU: penryn > > Note that -O3 turns on clang's vectorizer, so you might have run into an > optimizer bug, or some kind of undefined behavior which now falls over. My luck is poor even with -O2 e.g., firefox20 crash on stackoverflow.com [New LWP 101222] [New Thread 801b02400 (LWP 101222)] [New Thread 81060e800 (LWP 101372 StreamTrans #1)] [New Thread 810ee8800 (LWP 101373 DOM Worker)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 801b02400 (LWP 101222)] PodCopy (dst=, nelem=, src=, dst=, src=, nelem=) at ../../../js/src/jsutil.h:238 238 PodAssign(dst, src); (gdb) bt #0 PodCopy (dst=, nelem=, src=, dst=, src=, nelem=) at ../../../js/src/jsutil.h:238 #1 getCallFrame (cx=, flags=, fun=, report=(unknown: 2266652928), this=, args=..., script=...) at ../../../js/src/vm/Stack-inl.h:454 #2 getFixupFrame (cx=, initial=, fun=, ncode=, dummy=0, report=, this=, cx=, report=, args=..., fun=, script=..., ncode=, initial=, stackLimit=) at ../../../js/src/vm/Stack-inl.h:513 #3 js::mjit::stubs::FixupArity (f=..., nactual=4294945312) at /wrkdirs/usr/ports/www/firefox/work/mozilla-release/js/src/methodjit/InvokeHelpers.cpp:213 #4 0x00000008019c48c2 in ?? () #5 0x00000008019b56b8 in ?? () #6 0x0000000000000001 in ?? () #7 0x0000000000000000 in ?? () > > -Dimitry