llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.15k stars 12.03k forks source link

clang-trunk segfaults when building make_aisleriot_freecell_board.c #11959

Closed llvmbot closed 12 years ago

llvmbot commented 12 years ago
Bugzilla Link 11587
Resolution DUPLICATE
Resolved on Dec 22, 2011 01:22
Version trunk
OS Linux
Attachments The offending .c file, Patch to get LLVM+clang to run on Mageia Linux, A script that reproduces the problem.
Reporter LLVM Bugzilla Contributor
CC @atrick,@efriedma-quic

Extended Description

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:

  1. 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
  2. parser at end of file
  3. Code generation
  4. Running pass 'Function Pass Manager' on module 'make_aisleriot_freecell_board.c'.
  5. 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

llvmbot commented 12 years ago

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

atrick commented 12 years ago

Indeed fixed by r146950.

This bug has been marked as a duplicate of bug llvm/llvm-project#11943

efriedma-quic commented 12 years ago

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

efriedma-quic commented 12 years ago

Looks like this is related to bug 11571.