stable/10 r266159 base clang 3.4 Assertion on nul \0

Dimitry Andric dim at FreeBSD.org
Fri May 16 10:36:28 UTC 2014


On 16 May 2014, at 06:49, jhellenthal at dataix.net wrote:
> 
> 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.
> 
> 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
> 
> 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=gnustep -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o builtin.o -x c builtin.c
> 1.      <eof> 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 at FreeBSD.org (as he is definitely more knowledgeable
about PowerPC than me :).

-Dimitry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20140516/2fc50bb5/attachment.sig>


More information about the freebsd-hackers mailing list