From owner-freebsd-toolchain@FreeBSD.ORG Sun Sep 14 09:51:27 2014 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20A1ABB6 for ; Sun, 14 Sep 2014 09:51:27 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 079BFEC3 for ; Sun, 14 Sep 2014 09:51:27 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8E9pQoV029411 for ; Sun, 14 Sep 2014 09:51:26 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 187437] Compilation cc Date: Sun, 14 Sep 2014 09:51:26 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: i386 X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: tijl@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-toolchain@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc resolution assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2014 09:51:27 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=187437 Tijl Coosemans changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Issue Resolved |Open CC| |tijl@FreeBSD.org Resolution|FIXED |--- Assignee|linimon@FreeBSD.org |freebsd-toolchain@FreeBSD.o | |rg --- Comment #3 from Tijl Coosemans --- Reopen and assign to toolchain@, although it may be an upstream clang bug. The test program in the report should print 0 twice, but clang doesn't at -O0. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-toolchain@FreeBSD.ORG Sun Sep 14 09:58:42 2014 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 460E3DD4 for ; Sun, 14 Sep 2014 09:58:42 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D3F0EED for ; Sun, 14 Sep 2014 09:58:42 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8E9wgOK053317 for ; Sun, 14 Sep 2014 09:58:42 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 187437] Compilation cc Date: Sun, 14 Sep 2014 09:58:42 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: i386 X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: rdivacky@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-toolchain@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2014 09:58:42 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=187437 Roman Divacky changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rdivacky@FreeBSD.org --- Comment #4 from Roman Divacky --- I cannot reproduce this, it prints two 0s for me with clang3.4 on freebsd9.3. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-toolchain@FreeBSD.ORG Sun Sep 14 10:17:22 2014 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADF245DE for ; Sun, 14 Sep 2014 10:17:22 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9550D239 for ; Sun, 14 Sep 2014 10:17:22 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8EAHMHR029606 for ; Sun, 14 Sep 2014 10:17:22 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 187437] Compilation cc Date: Sun, 14 Sep 2014 10:17:22 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: i386 X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kib@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-toolchain@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2014 10:17:22 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=187437 Konstantin Belousov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kib@FreeBSD.org --- Comment #5 from Konstantin Belousov --- (In reply to Roman Divacky from comment #4) > I cannot reproduce this, it prints two 0s for me with clang3.4 on freebsd9.3. i386 is important detail. clang generates obviously incorrect code even on amd64 with -m32, first storing zero float, then overriding it with some garbage. The test passes if sse math is used, i.e. '-m32 -mfpmath=sse -march=corei7 -O0' works. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-toolchain@FreeBSD.ORG Sun Sep 14 10:21:48 2014 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEFA8795 for ; Sun, 14 Sep 2014 10:21:48 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C650430F for ; Sun, 14 Sep 2014 10:21:48 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8EALmsY036139 for ; Sun, 14 Sep 2014 10:21:48 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 187437] Compilation cc Date: Sun, 14 Sep 2014 10:21:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: i386 X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: rdivacky@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-toolchain@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2014 10:21:49 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=187437 --- Comment #6 from Roman Divacky --- Ah, it reproduces with clang3.4 -m32. It seems to be fixed with clang3.5 though. So I guess the solution for this bug is to import clang3.5 -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-toolchain@FreeBSD.ORG Sun Sep 14 17:27:52 2014 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAF5B7C4; Sun, 14 Sep 2014 17:27:52 +0000 (UTC) Received: from tensor.andric.com (unknown [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "tensor.andric.com", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 832DAEBA; Sun, 14 Sep 2014 17:27:52 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::fc6a:18cc:1cd6:fa7b] (unknown [IPv6:2001:7b8:3a7:0:fc6a:18cc:1cd6:fa7b]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 990A5B803; Sun, 14 Sep 2014 19:27:46 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_1F537256-260A-4987-9296-E2E8D2986F41"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: clang makes segfaulting code with -march=core2 on i386 From: Dimitry Andric In-Reply-To: <54149286.80608@freebsd.org> Date: Sun, 14 Sep 2014 19:27:33 +0200 Message-Id: References: <54130AD0.8090103@freebsd.org> <54133E1E.9030105@freebsd.org> <54135B24.5040905@freebsd.org> <54135D0B.7060701@freebsd.org> <6FDF432B-8245-4BC7-952B-DFFEEA106D6F@FreeBSD.org> <5414865A.6030101@freebsd.org> <54149286.80608@freebsd.org> To: Andrey Chernov X-Mailer: Apple Mail (2.1878.6) Cc: toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2014 17:27:53 -0000 --Apple-Mail=_1F537256-260A-4987-9296-E2E8D2986F41 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=koi8-r On 13 Sep 2014, at 20:52, Andrey Chernov wrote: > On 13.09.2014 22:30, Dimitry Andric wrote: >>> By first glance I see a lots of things. It is known that >>> in edge cases gcc preserves more "unused" values than clang. It can be >>> the possible case. I'll try to lower -O level preserving -march=core2 >>> and see. >> >> It seems to work for me with -O1 -march=core2, and while valgrind does >> complain a little, the warnings are all benign. >> >> I'll see if I can "mix and match" a few -O2 and -O1 compiled objects, to >> zero in on where the problematic area(s) are. > > I can confirm that it works with -march=core2 and without -O at all or > with -O1. So it looks very match like overoptimization in clang. There is no such thing as "over-optimization"; there are only the following possibilities: 1) A bug in gcc's code, which manifests because of (correct) optimizations 2) A bug in one of clang's optimizer passes, which only manifests with -O2 and/or -march=core2 3) Random bit flips because of bad hardware I think we can rule out 3), since that would make it more likely to crash on different files as you retry the build. So that leaves either 1) or 2). In my experience, there definitely are bugs in optimizers, but bugs in the code to be optimized are *much* more common, especially when optimizers get more aggressive about exploiting the possibilities of the C or C++ abstract machine. Therefore, my guess would still be 1). :-) In any case, I have now narrowed it down to gcc/tree.c, which is not a very small file, and which is changed very often upstream, sometimes almost daily. So I will see if I can reproduce it with gcc trunk first, and if that turns out to be good, I will bisect to find the commit that fixes it. If trunk is also not good, the rabbit hole goes a bit deeper... -Dimitry --Apple-Mail=_1F537256-260A-4987-9296-E2E8D2986F41 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlQV0AwACgkQsF6jCi4glqOFbgCfWGJhF83P/JwJHevYh14ATRF9 WokAnA+QMHcBx+f2MIQ9EIq5pRw01RW2 =lem7 -----END PGP SIGNATURE----- --Apple-Mail=_1F537256-260A-4987-9296-E2E8D2986F41-- From owner-freebsd-toolchain@FreeBSD.ORG Sun Sep 14 18:50:17 2014 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71C2A68D for ; Sun, 14 Sep 2014 18:50:17 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 594668DD for ; Sun, 14 Sep 2014 18:50:17 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8EIoHjx018942 for ; Sun, 14 Sep 2014 18:50:17 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 187437] Compilation cc Date: Sun, 14 Sep 2014 18:50:17 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: i386 X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dim@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dim@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2014 18:50:17 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=187437 Dimitry Andric changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dim@FreeBSD.org Assignee|freebsd-toolchain@FreeBSD.o |dim@FreeBSD.org |rg | -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-toolchain@FreeBSD.ORG Mon Sep 15 18:01:15 2014 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA82C43F; Mon, 15 Sep 2014 18:01:15 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "tensor.andric.com", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A1381954; Mon, 15 Sep 2014 18:01:15 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::7c26:cd69:97e3:de28] (unknown [IPv6:2001:7b8:3a7:0:7c26:cd69:97e3:de28]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id A6336B803; Mon, 15 Sep 2014 20:01:02 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_7A3CA41C-290C-40CC-B023-7C84A7B0DB39"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: clang makes segfaulting code with -march=core2 on i386 From: Dimitry Andric In-Reply-To: Date: Mon, 15 Sep 2014 20:00:51 +0200 Message-Id: <59D2D3D8-CE24-4785-8E39-6A07AE1B266D@FreeBSD.org> References: <54130AD0.8090103@freebsd.org> <54133E1E.9030105@freebsd.org> <54135B24.5040905@freebsd.org> <54135D0B.7060701@freebsd.org> <6FDF432B-8245-4BC7-952B-DFFEEA106D6F@FreeBSD.org> <5414865A.6030101@freebsd.org> <54149286.80608@freebsd.org> To: Andrey Chernov X-Mailer: Apple Mail (2.1878.6) Cc: toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2014 18:01:16 -0000 --Apple-Mail=_7A3CA41C-290C-40CC-B023-7C84A7B0DB39 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=koi8-r On 14 Sep 2014, at 19:27, Dimitry Andric wrote: ... > In any case, I have now narrowed it down to gcc/tree.c, which is not a > very small file, and which is changed very often upstream, sometimes > almost daily. > > So I will see if I can reproduce it with gcc trunk first, and if that > turns out to be good, I will bisect to find the commit that fixes it. > > If trunk is also not good, the rabbit hole goes a bit deeper... And deeper it goes: gcc trunk does not crash, *unless* I change the file gcc/DEV-PHASE to contain the string "prerelease" instead of the default "experimental". Then gcc trunk crashes in an identical fashion to the gcc 4.8 branch, or gcc 4.8.2 release! Anybody have an idea what kind of magic in gcc is changed, when this DEV-PHASE file is altered? Some debug code or internal assertion checking might be turned on or off? -Dimitry --Apple-Mail=_7A3CA41C-290C-40CC-B023-7C84A7B0DB39 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlQXKVwACgkQsF6jCi4glqOxUgCghdgMZC0c6fHVR7z6udw79FL1 1B0AniS4Q0zkZubKN44Vtvzgw0G/R23Q =hDrm -----END PGP SIGNATURE----- --Apple-Mail=_7A3CA41C-290C-40CC-B023-7C84A7B0DB39-- From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 16 06:54:08 2014 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CC9F90D for ; Tue, 16 Sep 2014 06:54:08 +0000 (UTC) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 18E9ED24 for ; Tue, 16 Sep 2014 06:54:07 +0000 (UTC) Received: by mail-lb0-f172.google.com with SMTP id w7so5860246lbi.17 for ; Mon, 15 Sep 2014 23:54:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=plH+1lJsIBzGJnXLE5+4DAKerFnTpyWI3xxtapOqsOU=; b=DnWlOAX8yee03f1wSieROyM5z+5wu7xa+rORRB7xaMQOjWWp4UaceDtStHzUTsT0Gh h9E8Wbh4ckaJRzxwnGI8Ic5HMs7/7m0pgVpGqOIleUHlwD42oscuppH4Yf8wWPqSR7D0 BOneSci8KbT07+URArHs2DSEJA6JpHQH/bze4tePhaYTQtw4X4UNOkMOmGeAyWJ+vNAX YMaK9xk3DlfLAkxKyfhPX74ba/qiGE8TAZNMpxVVpRUsW8hEF/4WcjL2dwhaYCSQWRzy wuT5FeyMnex6XE6IMHhnJp5xBP1xUT8k/m3ubMNFpqZO6pMw9cXRyrBQvPu+msjw052l imgw== X-Gm-Message-State: ALoCoQngslMxf/fuuoRw0YjvCjTWaLBHg5U6Qn8EOSKOBp4Q476w84alRJ2ORxAoM+zbx7i8aCHZ X-Received: by 10.152.115.232 with SMTP id jr8mr15229802lab.69.1410850445322; Mon, 15 Sep 2014 23:54:05 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id d6sm2630365lbr.47.2014.09.15.23.54.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Sep 2014 23:54:04 -0700 (PDT) Message-ID: <5417DE84.7020105@freebsd.org> Date: Tue, 16 Sep 2014 10:53:56 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Dimitry Andric Subject: Re: clang makes segfaulting code with -march=core2 on i386 References: <54130AD0.8090103@freebsd.org> <54133E1E.9030105@freebsd.org> <54135B24.5040905@freebsd.org> <54135D0B.7060701@freebsd.org> <6FDF432B-8245-4BC7-952B-DFFEEA106D6F@FreeBSD.org> <5414865A.6030101@freebsd.org> <54149286.80608@freebsd.org> <59D2D3D8-CE24-4785-8E39-6A07AE1B266D@FreeBSD.org> In-Reply-To: <59D2D3D8-CE24-4785-8E39-6A07AE1B266D@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PA7IlscNdd9Of04TWr9xQQUhPuaH3T2Vn" Cc: toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2014 06:54:08 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PA7IlscNdd9Of04TWr9xQQUhPuaH3T2Vn Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable On 15.09.2014 22:00, Dimitry Andric wrote: > On 14 Sep 2014, at 19:27, Dimitry Andric wrote: > ... >> In any case, I have now narrowed it down to gcc/tree.c, which is not a= >> very small file, and which is changed very often upstream, sometimes >> almost daily. >> >> So I will see if I can reproduce it with gcc trunk first, and if that >> turns out to be good, I will bisect to find the commit that fixes it. >> >> If trunk is also not good, the rabbit hole goes a bit deeper... Probably it have sense to track down and look at first post-4.7 gcc/tree.= c change which cause fail (gcc47 works with BOOTSTRAP=3Doff). > And deeper it goes: gcc trunk does not crash, *unless* I change the fil= e > gcc/DEV-PHASE to contain the string "prerelease" instead of the default= > "experimental". Then gcc trunk crashes in an identical fashion to the > gcc 4.8 branch, or gcc 4.8.2 release! Just FYI, gcc49 4.9.2.s20140910 faults the same way but on different file= in the same directory: /usr/ports/lang/gcc49/work/build/./gcc/xgcc -shared-libgcc -B/usr/ports/l= ang/gcc49/work/build/./gcc -nostdinc++ -L/usr/ports/lang/gcc49/work/build= /i386-portbld-freebsd10.1/libstdc++-v3/src -L/usr/ports/lang/gcc49/work/b= uild/i386-portbld-freebsd10.1/libstdc++-v3/src/.libs -L/usr/ports/lang/gc= c49/work/build/i386-portbld-freebsd10.1/libstdc++-v3/libsupc++/.libs -B/u= sr/local/i386-portbld-freebsd10.1/bin/ -B/usr/local/i386-portbld-freebsd1= 0.1/lib/ -isystem /usr/local/i386-portbld-freebsd10.1/include -isystem /u= sr/local/i386-portbld-freebsd10.1/sys-include -x c++-header -nostdinc+= + -g -O2 -pipe -march=3Dcore2 -DLIBICONV_PLUG -fno-strict-aliasing -DLIB= ICONV_PLUG -I/usr/ports/lang/gcc49/work/build/i386-portbld-freebsd10.1/l= ibstdc++-v3/include/i386-portbld-freebsd10.1 -I/usr/ports/lang/gcc49/work= /build/i386-portbld-freebsd10.1/libstdc++-v3/include -I/usr/ports/lang/gc= c49/work/gcc-4.9-20140910/libstdc++-v3/libsupc++ -O2 -g -std=3Dgnu++0x /u= sr/ports/lang/gcc49/work/gcc-4.9-20140910/libstdc++- v3/include/precompiled/stdc++.h \ -o i386-portbld-freebsd10.1/bits/stdc++.h.gch/O2ggnu++0x.gch In file included from /usr/ports/lang/gcc49/work/build/i386-portbld-freeb= sd10.1/libstdc++-v3/include/unordered_set:48:0, from /usr/ports/lang/gcc49/work/gcc-4.9-20140910/libstdc= ++-v3/include/precompiled/stdc++.h:116: /usr/ports/lang/gcc49/work/build/i386-portbld-freebsd10.1/libstdc++-v3/in= clude/bits/unordered_set.h:1354:1: internal compiler error: Segmentation = fault } // namespace std ^ no stack trace because unwind library not available Please submit a full bug report, with preprocessed source if appropriate. See for instructions. gmake[6]: *** [i386-portbld-freebsd10.1/bits/stdc++.h.gch/O2ggnu++0x.gch]= Error 1 > Anybody have an idea what kind of magic in gcc is changed, when this > DEV-PHASE file is altered? Some debug code or internal assertion > checking might be turned on or off? Either try to grep the file or string space simple shifted by several byt= es. --=20 http://ache.vniz.net/ --PA7IlscNdd9Of04TWr9xQQUhPuaH3T2Vn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJUF96LAAoJEKUckv0MjfbKswQH/jXz27pZOX1JQ6e22ysG/Qr0 4trkSRVcTtdZbpkrTZcoHvgenDvEO6Uu7xt4q2uFHUUpfLUCUnLN1bI6ULIiomoA Dt04yLdStj0UjE0hFhfX1P+nj3XyuIMsd5WfRpOvShPzhjA2Zyf4y6aqnb/Grcbr p4ji5D1tkLy2UwAfDAjkH0XJOv4tB/4TCddCvnjFlfzd2DLa6tGIw9nVBaSXLO3i KYC+mlgl06KUuNpmO7D7I7ntTYD/tPjMRRND+vPuZ+zCC3H+lW69db+O6YZZUafG aI6FtrN6+elwaoxlrg+fx/0HL4dm9R9YEkas1vJqFWYN4borGJxkSsX7k9rZ7pw= =1N1F -----END PGP SIGNATURE----- --PA7IlscNdd9Of04TWr9xQQUhPuaH3T2Vn-- From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 17 23:01:44 2014 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F08445C for ; Wed, 17 Sep 2014 23:01:44 +0000 (UTC) Received: from mail-qg0-f43.google.com (mail-qg0-f43.google.com [209.85.192.43]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 41F626E9 for ; Wed, 17 Sep 2014 23:01:43 +0000 (UTC) Received: by mail-qg0-f43.google.com with SMTP id a108so67592qge.16 for ; Wed, 17 Sep 2014 16:01:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:date:message-id:subject:from :to:cc:content-type; bh=18ZmefaYSK+HKP9Xs3HVf7GKuIuFcd7O4gaIHPn5CdY=; b=mJKESR4REToXOXIIqEUqnz6c2bSzxhHY5lixPzDZKI4p94kbjCF0dZFyf/7w89p2UR LTvhtXhc36vh/veLNiO1jJ4DJqRMW5b9egWhF/hdkwavO6N7WjSPyk5QpMY532KRTk5q 26kBijCJH5HaDyoy7O8iWCLAtJw3oLI4UnzEvR1ePxMcxwM6OKZ+P8oOawkHeSheRCLy 8jcyGh8O1BwC8BzmntlGS18turXhMusIV/bSBnqssSrgrYd6qIpCt6tENssd7Flcj60c 4KxErtVQEt5dg5KoKoMFWAqpy7/GUF3EwxJJ9y87qBcUZqqLl+S3ljOnTH1M7AaJG2v7 H3MA== X-Gm-Message-State: ALoCoQksOCMpbLvl6OeC0F42LWDXcAQGS5grOBSygGs8p0uAN3ZkqDlv8j2lctaCo1F/G3yeIK48 MIME-Version: 1.0 X-Received: by 10.224.3.5 with SMTP id 5mr1018614qal.1.1410994902661; Wed, 17 Sep 2014 16:01:42 -0700 (PDT) Sender: will@firepipe.net Received: by 10.140.16.183 with HTTP; Wed, 17 Sep 2014 16:01:42 -0700 (PDT) Date: Wed, 17 Sep 2014 17:01:42 -0600 X-Google-Sender-Auth: WQ4htmLZb5j9AJzIFDvUfzfLUGw Message-ID: Subject: elftoolchain update? From: Will Andrews To: jkoshy@freebsd.org, kaiw@freebsd.org, freebsd-toolchain@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: Justin Gibbs X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2014 23:01:44 -0000 Hi, I see there have been a lot of updates & fixes to elftoolchain since the last import into FreeBSD/head nearly 8 months ago. Are there any plans to update the import? I'm asking because it appears that ctfconvert currently crashes (specifically, due to a bug in dwarf_attrval_unsigned()), if you try to use it on C++ object files. This is easily demonstrated by applying this patch to FreeBSD/head and building sbin/devd with WITH_CTF=1: http://people.freebsd.org/~will/add-ctfconvert-to-cpp-object-files.diff Justin Gibbs (cc'd) posted about this issue in February, and it's still a problem: http://lists.freebsd.org/pipermail/freebsd-toolchain/2014-February/001121.html Thanks, --Will. From owner-freebsd-toolchain@FreeBSD.ORG Thu Sep 18 17:42:27 2014 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC344AE5 for ; Thu, 18 Sep 2014 17:42:27 +0000 (UTC) Received: from natasha.panasas.com (natasha.panasas.com [209.166.131.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F67AB6E for ; Thu, 18 Sep 2014 17:42:26 +0000 (UTC) Received: from seabiscuit.panasas.com (seabiscuit.panasas.com [172.17.132.204]) by natasha.panasas.com (8.14.4/8.14.4) with ESMTP id s8IHgO6Y018310 for ; Thu, 18 Sep 2014 13:42:25 -0400 Received: from SEABISCUIT.int.panasas.com ([172.17.132.204]) by seabiscuit ([172.17.132.204]) with mapi id 14.03.0210.002; Thu, 18 Sep 2014 10:42:24 -0700 From: "Sinha, Prokash" To: "freebsd-toolchain@freebsd.org" Subject: While I see the code coverage being present in 3.6.0, I see compile errors Thread-Topic: While I see the code coverage being present in 3.6.0, I see compile errors Thread-Index: AQHP02fndxd9CeK6PkaB2Mo+yrtY8Q== Date: Thu, 18 Sep 2014 17:42:24 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.17.28.63] Content-Type: text/plain; charset="Windows-1252" Content-ID: <71CEA15D2488004CA382D49C882AF3F5@panasas.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 17:42:27 -0000 Hi All, I see that coverage and valgrind seemed to be sneaking in to 3.6.0 ( http:/= /www.llvm.org/docs/CoverageMappingFormat.html ), I see there are some compi= lation error when I update from the svn repo, and try to gmake on freebsd10= .0. Note that about a week or so ago, I pulled in using update and did not = see compile error =96 but those features were missing =85 Thanks much ! -prokash BackendUtil.cpp:65:30: error: no matching constructor for initialization of= 'llvm::DataLayoutPass' CodeGenPasses->add(new DataLayoutPass(TheModule)); ^ ~~~~~~~~~ /.automount/nfs.panwest.panasas.com/root/home/psinha/llvm/include/llvm/IR/D= ataLayout.h:461:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from = 'llvm::Module *const' to 'const llvm::DataLayoutPass' for 1st argument class DataLayoutPass : public ImmutablePass { ^ /.automount/nfs.panwest.panasas.com/root/home/psinha/llvm/include/llvm/IR/D= ataLayout.h:466:3: note: candidate constructor not viable: requires 0 arguments, but 1 was provided DataLayoutPass(); ^ BackendUtil.cpp:75:32: error: no matching constructor for initialization of= 'llvm::DataLayoutPass' PerModulePasses->add(new DataLayoutPass(TheModule)); ^ ~~~~~~~~~ /.automount/nfs.panwest.panasas.com/root/home/psinha/llvm/include/llvm/IR/D= ataLayout.h:461:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from = 'llvm::Module *const' to 'const llvm::DataLayoutPass' for 1st argument class DataLayoutPass : public ImmutablePass { ^ /.automount/nfs.panwest.panasas.com/root/home/psinha/llvm/include/llvm/IR/D= ataLayout.h:466:3: note: candidate constructor not viable: requires 0 arguments, but 1 was provided DataLayoutPass(); ^ BackendUtil.cpp:85:34: error: no matching constructor for initialization of= 'llvm::DataLayoutPass' PerFunctionPasses->add(new DataLayoutPass(TheModule)); ^ ~~~~~~~~~ /.automount/nfs.panwest.panasas.com/root/home/psinha/llvm/include/llvm/IR/D= ataLayout.h:461:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from = 'llvm::Module *const' to 'const llvm::DataLayoutPass' for 1st argument class DataLayoutPass : public ImmutablePass { ^ /.automount/nfs.panwest.panasas.com/root/home/psinha/llvm/include/llvm/IR/D= ataLayout.h:466:3: note: candidate constructor not viable: requires 0 arguments, but 1 was provided DataLayoutPass(); From owner-freebsd-toolchain@FreeBSD.ORG Thu Sep 18 18:47:12 2014 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60AF1A33; Thu, 18 Sep 2014 18:47:12 +0000 (UTC) Received: from tensor.andric.com (unknown [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "tensor.andric.com", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DE7FC21D; Thu, 18 Sep 2014 18:47:11 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::19d6:9310:be5e:bd65] (unknown [IPv6:2001:7b8:3a7:0:19d6:9310:be5e:bd65]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 306E6B803; Thu, 18 Sep 2014 20:47:07 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_30E0948E-EB5E-4D45-B37A-695A9D42D0B0"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: elftoolchain update? From: Dimitry Andric In-Reply-To: Date: Thu, 18 Sep 2014 20:46:59 +0200 Message-Id: References: To: Will Andrews X-Mailer: Apple Mail (2.1878.6) Cc: Justin Gibbs , jkoshy@freebsd.org, freebsd-toolchain@freebsd.org, kaiw@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 18:47:12 -0000 --Apple-Mail=_30E0948E-EB5E-4D45-B37A-695A9D42D0B0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 18 Sep 2014, at 01:01, Will Andrews wrote: > I see there have been a lot of updates & fixes to elftoolchain since > the last import into FreeBSD/head nearly 8 months ago. Are there any > plans to update the import? >=20 > I'm asking because it appears that ctfconvert currently crashes > (specifically, due to a bug in dwarf_attrval_unsigned()), if you try > to use it on C++ object files. >=20 > This is easily demonstrated by applying this patch to FreeBSD/head and > building sbin/devd with WITH_CTF=3D1: > = http://people.freebsd.org/~will/add-ctfconvert-to-cpp-object-files.diff >=20 > Justin Gibbs (cc'd) posted about this issue in February, and it's > still a problem: > = http://lists.freebsd.org/pipermail/freebsd-toolchain/2014-February/001121.= html In that previous thread, I was not able to reproduce any problems with ctfconvert or ctfmerge, but I have tried it again just now, and I think it is a problem in libdwarf. The crash goes like this: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 28803080 (LWP 100196)] 0x280bb75d in dwarf_attrval_unsigned (die=3D0x28941f10, attr=3D73, = valp=3D0xbfbfdea0, err=3D0xbfbfe0a4) at = /usr/src/lib/libdwarf/../../contrib/elftoolchain/libdwarf/dwarf_attrval.c:= 186 186 switch (at->at_form) { (gdb) bt #0 0x280bb75d in dwarf_attrval_unsigned (die=3D0x28941f10, attr=3D73, = valp=3D0xbfbfdea0, err=3D0xbfbfe0a4) at = /usr/src/lib/libdwarf/../../contrib/elftoolchain/libdwarf/dwarf_attrval.c:= 186 #1 0x08052a45 in die_attr_ref (dw=3D0xbfbfe0a0, die=3D0x28941f10, = name=3D73) at = /usr/src/cddl/usr.bin/ctfconvert/../../../cddl/contrib/opensolaris/tools/c= tf/cvt/dwarf.c:417 #2 0x08052844 in die_lookup_pass1 (dw=3D0xbfbfe0a0, die=3D0x28941f10, = name=3D73) at = /usr/src/cddl/usr.bin/ctfconvert/../../../cddl/contrib/opensolaris/tools/c= tf/cvt/dwarf.c:476 #3 0x08052380 in die_variable_create (dw=3D0xbfbfe0a0, die=3D0x28941f10, = off=3D83907, tdp=3D0x0) at = /usr/src/cddl/usr.bin/ctfconvert/../../../cddl/contrib/opensolaris/tools/c= tf/cvt/dwarf.c:1680 #4 0x08050940 in die_create_one (dw=3D0xbfbfe0a0, die=3D0x28941f10) at = /usr/src/cddl/usr.bin/ctfconvert/../../../cddl/contrib/opensolaris/tools/c= tf/cvt/dwarf.c:1793 #5 0x0804fa94 in die_create (dw=3D0xbfbfe0a0, die=3D0x28941f10) at = /usr/src/cddl/usr.bin/ctfconvert/../../../cddl/contrib/opensolaris/tools/c= tf/cvt/dwarf.c:1800 #6 0x0804f368 in dw_read (td=3D0x2881c040, elf=3D0x28830040, = filename=3D0xbfbfe83e "devd.o") at = /usr/src/cddl/usr.bin/ctfconvert/../../../cddl/contrib/opensolaris/tools/c= tf/cvt/dwarf.c:2003 #7 0x0804eb6e in file_read (td=3D0x2881c040, filename=3D0xbfbfe83e = "devd.o", ignore_non_c=3D0) at = /usr/src/cddl/usr.bin/ctfconvert/../../../cddl/contrib/opensolaris/tools/c= tf/cvt/ctfconvert.c:115 #8 0x0804e7ca in main (argc=3D5, argv=3D0xbfbfe694) at = /usr/src/cddl/usr.bin/ctfconvert/../../../cddl/contrib/opensolaris/tools/c= tf/cvt/ctfconvert.c:236 (gdb) print at $1 =3D (Dwarf_Attribute) 0x0 Looking at dwarf_attrval_unsigned(), you can see 'at' being NULL-checked in line 163, but if the _dwarf_attr_find() call on line 164 then also returns NULL, the switch on line 186 will segfault as above: 140 int 141 dwarf_attrval_unsigned(Dwarf_Die die, Dwarf_Half attr, = Dwarf_Unsigned *valp, Dwarf_Error *err) 142 { 143 Dwarf_Attribute at; ... 157 if ((at =3D _dwarf_attr_find(die, attr)) =3D=3D NULL && = attr !=3D DW_AT_type) { 158 DWARF_SET_ERROR(dbg, err, DW_DLE_NO_ENTRY); 159 return (DW_DLV_NO_ENTRY); 160 } 161 162 die1 =3D NULL; 163 if (at =3D=3D NULL && 164 (at =3D _dwarf_attr_find(die, = DW_AT_abstract_origin)) !=3D NULL) { ... 184 } 185 186 switch (at->at_form) { ... I'm not sure what kind of error code should be returned when the second _dwarf_attr_find() fails, though. Or if that is some sort of problem with a symbol? If I go to frame 3 (die_variable_create), the name seems to be the empty string, but not a NULL pointer: (gdb) frame 3 #3 0x08052380 in die_variable_create (dw=3D0xbfbfe0a0, die=3D0x28941f10, = off=3D83907, tdp=3D0x0) at = /usr/src/cddl/usr.bin/ctfconvert/../../../cddl/contrib/opensolaris/tools/c= tf/cvt/dwarf.c:1680 1680 ii->ii_dtype =3D die_lookup_pass1(dw, die, DW_AT_type); (gdb) print name $2 =3D 0x2892dc90 "" The name is looked up on line 1674, where nameless objects are supposed to be skipped: 1666 static void 1667 die_variable_create(dwarf_t *dw, Dwarf_Die die, Dwarf_Off off, = tdesc_t *tdp __unused) 1668 { 1669 iidesc_t *ii; 1670 char *name; 1671 1672 debug(3, "die %llu: creating object definition\n", off); 1673 1674 if (die_isdecl(dw, die) || (name =3D die_name(dw, die)) = =3D=3D NULL) 1675 return; /* skip prototypes and nameless objects = */ 1676 1677 ii =3D xcalloc(sizeof (iidesc_t)); 1678 ii->ii_type =3D die_isglobal(dw, die) ? II_GVAR : = II_SVAR; 1679 ii->ii_name =3D name; 1680 ii->ii_dtype =3D die_lookup_pass1(dw, die, DW_AT_type); However, die_name() does not ever seem to return NULL (the code to return the empty string was added by Kai in r261246): 425 static char * 426 die_name(dwarf_t *dw, Dwarf_Die die) 427 { 428 char *str =3D NULL; 429 430 (void) die_string(dw, die, DW_AT_name, &str, 0); 431 if (str =3D=3D NULL) 432 str =3D xstrdup(""); 433 434 return (str); 435 } There are quite a lot of places in this file where the result of die_name() is explicitly checked against NULL, so maybe always returning an empty string was not such a good idea. It may have been done to avoid another segfault. The way forward is probably to: * fix the situation in dwarf_attrval_unsigned(), returning a sensible error value if both lookups fail. * make die_name() return a NULL pointer again, or explicitly check for the empty string in die_variable_create(). -Dimitry --Apple-Mail=_30E0948E-EB5E-4D45-B37A-695A9D42D0B0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlQbKKgACgkQsF6jCi4glqNK5gCfTxBhMscesG9ogoJfu99Ownts icAAn1NUB56P1rzA7OsvTL2nzUyWikDi =hp85 -----END PGP SIGNATURE----- --Apple-Mail=_30E0948E-EB5E-4D45-B37A-695A9D42D0B0-- From owner-freebsd-toolchain@FreeBSD.ORG Thu Sep 18 20:35:05 2014 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97EF7A91 for ; Thu, 18 Sep 2014 20:35:05 +0000 (UTC) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com [209.85.217.179]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 138B5FD0 for ; Thu, 18 Sep 2014 20:35:04 +0000 (UTC) Received: by mail-lb0-f179.google.com with SMTP id 10so1452551lbg.10 for ; Thu, 18 Sep 2014 13:34:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=YZUB9KvpB7kaAVDwZLVVrCiFMsGNYB+x+0C/5D9Pp8U=; b=S0Cpq5hV8PKtqePwCKySS1Lxb/TcyxjbEtGbT2yqnyyvoSGbbVaZ4XNKitQd6LY6Fn 4CZWsFQm/Yz4ZedYPTYiN9v3XxItSG2F3Zt0PPsJv5+MbfD1DXB6Ci7yUOK0v/U1kg3P Jn3s7t7zdKC+uX9zjR95hPnnVs9ahaFNIso0xYmGYoEZGFrgvHBTrakK7quHV7BLKnIu sKw1Z39lynfBs3hr7si+pMhFUl3grVp2e97VESnHFQt0LKCirJf35h5zImt7SifzjnU1 tMaKb/FGFbyLFD/gwTYez8v8Zr4Os3wuvCI/cFVdptfVvrCw7+WdfSkPCh+fK3hW+Pe6 5+yQ== X-Gm-Message-State: ALoCoQlFgqjavAbrzVcDBtN/X2VIRcEzoPZ4J3EZ2kDyooNeECXiQyvG9LDSfLCkr4hUx6VvgNjH X-Received: by 10.152.21.6 with SMTP id r6mr2385542lae.6.1411072497413; Thu, 18 Sep 2014 13:34:57 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id p8sm5249215lap.24.2014.09.18.13.34.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Sep 2014 13:34:56 -0700 (PDT) Message-ID: <541B41EA.2060805@freebsd.org> Date: Fri, 19 Sep 2014 00:34:50 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Dimitry Andric Subject: Re: clang makes segfaulting code with -march=core2 on i386 References: <54130AD0.8090103@freebsd.org> <54133E1E.9030105@freebsd.org> <54135B24.5040905@freebsd.org> <54135D0B.7060701@freebsd.org> <6FDF432B-8245-4BC7-952B-DFFEEA106D6F@FreeBSD.org> <5414865A.6030101@freebsd.org> <54149286.80608@freebsd.org> <59D2D3D8-CE24-4785-8E39-6A07AE1B266D@FreeBSD.org> <5417DE84.7020105@freebsd.org> In-Reply-To: <5417DE84.7020105@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GV2kdEGLH56qba5CKS8DJeipgEqg3u73N" Cc: toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 20:35:05 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --GV2kdEGLH56qba5CKS8DJeipgEqg3u73N Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable On 16.09.2014 10:53, Andrey Chernov wrote: >=20 > Probably it have sense to track down and look at first post-4.7 gcc/tre= e.c change which cause fail (gcc47 works with BOOTSTRAP=3Doff). >=20 >> Anybody have an idea what kind of magic in gcc is changed, when this >> DEV-PHASE file is altered? Some debug code or internal assertion >> checking might be turned on or off? >=20 > Either try to grep the file or string space simple shifted by several b= ytes. As I test today, gcc5 20140914 from the ports builds normally with BOOTSTRAP=3Doff -march=3Dcore2 -O2 --=20 http://ache.vniz.net/ --GV2kdEGLH56qba5CKS8DJeipgEqg3u73N Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJUG0HwAAoJEKUckv0MjfbKqBUIALiMZ6Oxun1auoVBB2cUC3tY hOeeCO5qYiOdgRQBgzRitmdCeKSYNW9ajisDo98erZSLYoBdOCdrgR2arm5lTfqC 1+BF2Y4+NmZqaxklplgHU8qyoZbP8LyfDmQH5PLxJg5X2/Nd8Nw7uh8bnA8SKoDR 55AlGdH5lJZqmczZuaBleZzcamOcQaFu+2bzBVh4W9xm1xdStLvQ8fCJ8fFu4d7Z 7hJwHxUUeOQ0NigU0B+daZFtXsO/YNVNF/CJvJzXRsoHzmXO0UziuFnSXwZP3gvl 0gM7fiRXINbPIyF/SwISb+F09qQi4ulAcz7+goy7/VsQVK8DeWHk++DEI+CwOHE= =jm6D -----END PGP SIGNATURE----- --GV2kdEGLH56qba5CKS8DJeipgEqg3u73N-- From owner-freebsd-toolchain@FreeBSD.ORG Fri Sep 19 22:20:02 2014 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1156CAB for ; Fri, 19 Sep 2014 22:20:01 +0000 (UTC) Received: from natasha.panasas.com (natasha.panasas.com [209.166.131.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B23221A0 for ; Fri, 19 Sep 2014 22:20:01 +0000 (UTC) Received: from seabiscuit.panasas.com (seabiscuit.panasas.com [172.17.132.204]) by natasha.panasas.com (8.14.4/8.14.4) with ESMTP id s8JMJw0v023184 for ; Fri, 19 Sep 2014 18:19:58 -0400 Received: from SEABISCUIT.int.panasas.com ([172.17.132.204]) by seabiscuit ([172.17.132.204]) with mapi id 14.03.0210.002; Fri, 19 Sep 2014 15:19:55 -0700 From: "Sinha, Prokash" To: "freebsd-toolchain@freebsd.org" Subject: Re: While I see the code coverage being present in 3.6.0, I see compile errors Thread-Topic: While I see the code coverage being present in 3.6.0, I see compile errors Thread-Index: AQHP02fndxd9CeK6PkaB2Mo+yrtY8ZwJCNoA Date: Fri, 19 Sep 2014 22:19:54 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.17.28.63] Content-Type: text/plain; charset="Windows-1252" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2014 22:20:02 -0000 I was having build error when I was "svn update" updating, following the i= nstructions in the document for checkout, and in sequence=85 If I get the source in a new dir, then it builds. But I still concur to fi= nd a way to get the lib clangrt.profile*.a This was my configuration , before using gmake and gmake install ../llvm_9_19/configure --prefix=3D/fs/home/psinha/bin --enable-targets=3Dx8= 6_64 --enable-profiling I really need some advice as to how to make that archived build. -prokash From: , Prokash Sinha = > Date: Thursday, September 18, 2014 10:42 AM To: "freebsd-toolchain@freebsd.org" <= freebsd-toolchain@freebsd.org> Subject: While I see the code coverage being present in 3.6.0, I see compil= e errors Hi All, I see that coverage and valgrind seemed to be sneaking in to 3.6.0 ( http:/= /www.llvm.org/docs/CoverageMappingFormat.html ), I see there are some compi= lation error when I update from the svn repo, and try to gmake on freebsd10= .0. Note that about a week or so ago, I pulled in using update and did not = see compile error =96 but those features were missing =85 Thanks much ! -prokash BackendUtil.cpp:65:30: error: no matching constructor for initialization of= 'llvm::DataLayoutPass' CodeGenPasses->add(new DataLayoutPass(TheModule)); ^ ~~~~~~~~~ /.automount/nfs.panwest.panasas.com/root/home/psinha/llvm/include/llvm/IR/D= ataLayout.h:461:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from = 'llvm::Module *const' to 'const llvm::DataLayoutPass' for 1st argument class DataLayoutPass : public ImmutablePass { ^ /.automount/nfs.panwest.panasas.com/root/home/psinha/llvm/include/llvm/IR/D= ataLayout.h:466:3: note: candidate constructor not viable: requires 0 arguments, but 1 was provided DataLayoutPass(); ^ BackendUtil.cpp:75:32: error: no matching constructor for initialization of= 'llvm::DataLayoutPass' PerModulePasses->add(new DataLayoutPass(TheModule)); ^ ~~~~~~~~~ /.automount/nfs.panwest.panasas.com/root/home/psinha/llvm/include/llvm/IR/D= ataLayout.h:461:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from = 'llvm::Module *const' to 'const llvm::DataLayoutPass' for 1st argument class DataLayoutPass : public ImmutablePass { ^ /.automount/nfs.panwest.panasas.com/root/home/psinha/llvm/include/llvm/IR/D= ataLayout.h:466:3: note: candidate constructor not viable: requires 0 arguments, but 1 was provided DataLayoutPass(); ^ BackendUtil.cpp:85:34: error: no matching constructor for initialization of= 'llvm::DataLayoutPass' PerFunctionPasses->add(new DataLayoutPass(TheModule)); ^ ~~~~~~~~~ /.automount/nfs.panwest.panasas.com/root/home/psinha/llvm/include/llvm/IR/D= ataLayout.h:461:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from = 'llvm::Module *const' to 'const llvm::DataLayoutPass' for 1st argument class DataLayoutPass : public ImmutablePass { ^ /.automount/nfs.panwest.panasas.com/root/home/psinha/llvm/include/llvm/IR/D= ataLayout.h:466:3: note: candidate constructor not viable: requires 0 arguments, but 1 was provided DataLayoutPass();