Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

clang-trunk segfaults when building make_aisleriot_freecell_board.c #11756

Closed Quuxplusone closed 12 years ago

Quuxplusone commented 12 years ago
Bugzilla Link PR11587
Status RESOLVED DUPLICATE of bug 11571
Importance P normal
Reported by Shlomi Fish (shlomif@shlomifish.org)
Reported on 2011-12-15 13:33:52 -0800
Last modified on 2011-12-22 01:22:05 -0800
Version trunk
Hardware PC Linux
CC atrick@apple.com, efriedma@quicinc.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments make_aisleriot_freecell_board.c (8898 bytes, text/plain)
llvm-mageia.diff (772 bytes, text/plain)
run-clang.bash (1013 bytes, text/plain)
Blocks
Blocked by
See also
Hi all. Thanks for your work on LLVM and clang.

When I try to build Freecell Solver ( http://fc-solve.shlomifish.org/ ) using
it, I'm getting a segfault on one of its board generation programs:

shlomif[fcs]:$trunk/fc-solve/source/board_gen$
/home/shlomif/apps/llvm/bin/clang-3.1 -cc1 -triple x86_64-unknown-linux-gnu -
emit-obj -disable-free -disable-llvm-verifier -main-file-name
make_aisleriot_freecell_board.c -mrelocation-model static -masm-verbose -
mconstructor-aliases -munwind-tables -target-cpu x86-64 -momit-leaf-frame-
pointer -coverage-file CMakeFiles/make-aisleriot-freecell-
board.dir/make_aisleriot_freecell_board.c.o -resource-dir
/home/shlomif/apps/llvm/bin/../lib/clang/3.1 -D NDEBUG -fmodule-cache-path
/home/shlomif/tmp/clang-module-cache -internal-isystem /usr/local/include -
internal-isystem /home/shlomif/apps/llvm/bin/../lib/clang/3.1/include -internal-
externc-isystem /include -internal-externc-isystem /usr/include -O3 -fdebug-
compilation-dir /home/shlomif/progs/freecell/trunk/fc-solve/source/board_gen -
ferror-limit 19 -fmessage-length 80 -mstackrealign -fgnu-runtime -fobjc-runtime-
has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option -
fcolor-diagnostics  -x c make_aisleriot_freecell_board.c
Stack dump:
0.      Program arguments: /home/shlomif/apps/llvm/bin/clang-3.1 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -main-
file-name make_aisleriot_freecell_board.c -mrelocation-model static -masm-
verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -momit-leaf-
frame-pointer -coverage-file CMakeFiles/make-aisleriot-freecell-
board.dir/make_aisleriot_freecell_board.c.o -resource-dir
/home/shlomif/apps/llvm/bin/../lib/clang/3.1 -D NDEBUG -fmodule-cache-path
/home/shlomif/tmp/clang-module-cache -internal-isystem /usr/local/include -
internal-isystem /home/shlomif/apps/llvm/bin/../lib/clang/3.1/include -internal-
externc-isystem /include -internal-externc-isystem /usr/include -O3 -fdebug-
compilation-dir /home/shlomif/progs/freecell/trunk/fc-solve/source/board_gen -
ferror-limit 19 -fmessage-length 80 -mstackrealign -fgnu-runtime -fobjc-runtime-
has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option -
fcolor-diagnostics -x c make_aisleriot_freecell_board.c
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module
'make_aisleriot_freecell_board.c'.
4.      Running pass 'Machine Instruction LICM' on function '@main'
Segmentation fault
shlomif[fcs]:$trunk/fc-solve/source/board_gen$

I'll attach the offending file soon, and a reproducing script, and a patch I
applied to the clang svn trunk to get it to run properly on Mageia Linux.

Regards,

-- Shlomi Fish
Quuxplusone commented 12 years ago

Attached make_aisleriot_freecell_board.c (8898 bytes, text/plain): The offending .c file

Quuxplusone commented 12 years ago

Attached llvm-mageia.diff (772 bytes, text/plain): Patch to get LLVM+clang to run on Mageia Linux

Quuxplusone commented 12 years ago

Attached run-clang.bash (1013 bytes, text/plain): A script that reproduces the problem.

Quuxplusone commented 12 years ago

Looks like this is related to bug 11571.

Quuxplusone commented 12 years ago

This should be fixed as of r146950; would you mind checking that?

Quuxplusone commented 12 years ago

Indeed fixed by r146950.

_This bug has been marked as a duplicate of bug 11571_

Quuxplusone commented 12 years ago

@Eli Friedman: it is indeed OK now after I did "svn up" and rebuilt.