From owner-freebsd-hackers@FreeBSD.ORG Fri May 16 10:36:28 2014 Return-Path: Delivered-To: hackers@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 5025B934 for ; Fri, 16 May 2014 10:36:28 +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 EAFAE206A for ; Fri, 16 May 2014 10:36:27 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::307e:8fe5:fab4:9592] (unknown [IPv6:2001:7b8:3a7:0:307e:8fe5:fab4:9592]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 426345C43; Fri, 16 May 2014 12:36:22 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_62A0D4BB-6874-4DB3-9CE1-8684B2AA425C"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: stable/10 r266159 base clang 3.4 Assertion on nul \0 From: Dimitry Andric In-Reply-To: <20140516044950.GA37592@DataIX.net> Date: Fri, 16 May 2014 12:36:09 +0200 Message-Id: <1BE05E62-27FE-4D51-B028-2F926BD4E5C8@FreeBSD.org> References: <20140516044950.GA37592@DataIX.net> To: jhellenthal@dataix.net X-Mailer: Apple Mail (2.1878.2) Cc: hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 10:36:28 -0000 --Apple-Mail=_62A0D4BB-6874-4DB3-9CE1-8684B2AA425C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 16 May 2014, at 06:49, jhellenthal@dataix.net wrote: >=20 > On powerpc maybe others, I believe I am hitting a bug in clang34 that = is part of base. After seearching around it has lead me to = (llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp) line 973ish code = block where I believe it never checks for the condition of no new line = at end of file but I am unfamiliar with the code and could use someone = to take a closer look when they have the time. >=20 > This is the link that lead me there: (Says resolved so I believe that = to be another issue) > http://comments.gmane.org/gmane.comp.compilers.llvm.bugs/24021 >=20 > This is the error I see repeated through compilation of different = programs: > clang -c -I. -I../Src -I../Src -I../Src/Zle -I. -I/usr/local/include = -DLIBICONV_PLUG -I/usr/local/include -DHAVE_CONFIG_H -O2 -pipe = -DLIBICONV_PLUG -fno-strict-aliasing -o builtin.o builtin.c > UNREACHABLE executed! > Stack dump: > 0. Program arguments: /usr/bin/clang -cc1 -triple = powerpc-unknown-freebsd10.0 -emit-obj -disable-free = -disable-llvm-verifier -main-file-name builtin.c -mrelocation-model = static -mdisable-fp-elim -relaxed-aliasing -masm-verbose = -mconstructor-aliases -target-cpu ppc -coverage-file = /export/usr/obj/export/usr/ports/shells/zsh/work/zsh-5.0.5/Src/builtin.o = -resource-dir /usr/bin/../lib/clang/3.4 -D LIBICONV_PLUG -D = HAVE_CONFIG_H -D LIBICONV_PLUG -I . -I ../Src -I ../Src -I ../Src/Zle -I = . -I /usr/local/include -I /usr/local/include -O2 = -fdebug-compilation-dir = /export/usr/obj/export/usr/ports/shells/zsh/work/zsh-5.0.5/Src = -ferror-limit 19 -fmessage-length 94 -mstackrealign -fno-signed-char = -fobjc-runtime=3Dgnustep -fdiagnostics-show-option -fcolor-diagnostics = -vectorize-loops -vectorize-slp -o builtin.o -x c builtin.c > 1. parser at end of file > 2. Code generation > 3. Running pass 'Function Pass Manager' on module 'builtin.c'. > 4. Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' = on function '@bin_print' > clang: error: unable to execute command: Abort trap > clang: error: clang frontend command failed due to signal (use -v to = see invocation) > FreeBSD clang version 3.4 (tags/RELEASE_34/final 197956) 20140216 > Target: powerpc-unknown-freebsd10.0 > Thread model: posix This is something completely different than http://llvm.org/PR16339 which you referred to. You seem to be running into a problem in the pass manager, which is part of the optimizer. Please try reproducing it with clang trunk, and if it still happens there, try reducing the testcase to a minimal form. Or submit the generated .sh and .c file in a new LLVM PR. If it doesn't reproduce on trunk, send me the generated .sh and .c file, CC'ing rdivacky@FreeBSD.org (as he is definitely more knowledgeable about PowerPC than me :). -Dimitry --Apple-Mail=_62A0D4BB-6874-4DB3-9CE1-8684B2AA425C 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) iEYEARECAAYFAlN16iIACgkQsF6jCi4glqNdgQCgzGl2BzU/wx7H05shJ0QnF4QV V7cAn0+YCgeoLjrbeOyidRgY6aY7mMPc =bs9b -----END PGP SIGNATURE----- --Apple-Mail=_62A0D4BB-6874-4DB3-9CE1-8684B2AA425C--