Bug#716826: Crash when compiling current snapshot of Ruby source

Herwin Weststrate herwin at snt.utwente.nl
Sat Jul 13 09:30:44 UTC 2013


Package: clang
Version: 1:3.2-19

When compiling the current nightly snapshot of Ruby (a copy is available 
at https://tilde.snt.utwente.nl/~herwin/ruby-snapshot-20130713.tgz) 
using clang it fails at bignum.c. Compiling with gcc (4.8) works fine.

Steps to reproduce:
- Download and untar the source code (link above)
- configure using clang: CC=`which clang` ./configure
- make

compiling bignum.c
0  libLLVM-3.2.so.1 0x56325b58
1  libLLVM-3.2.so.1 0x56326094
2  linux-gate.so.1  0x55576400 __kernel_sigreturn + 0
3  libLLVM-3.2.so.1 0x56256d97 llvm::SelectionDAG::getNode(unsigned int, 
llvm::DebugLoc, llvm::EVT, llvm::SDValue) + 2519
4  libLLVM-3.2.so.1 0x5626c6ed
5  libLLVM-3.2.so.1 0x5626be27
6  libLLVM-3.2.so.1 0x56272bc0 
llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&) 
const + 5120
7  libLLVM-3.2.so.1 0x56200cb8
8  libLLVM-3.2.so.1 0x561e5d9c
9  libLLVM-3.2.so.1 0x561ee672
10 libLLVM-3.2.so.1 0x561ff024
11 libLLVM-3.2.so.1 0x562009b9 llvm::SelectionDAG::LegalizeTypes() + 537
12 libLLVM-3.2.so.1 0x562ac67d 
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 205
13 libLLVM-3.2.so.1 0x562adc38 
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction 
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 168
14 libLLVM-3.2.so.1 0x562ae52e 
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 2270
15 libLLVM-3.2.so.1 0x562afbac 
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 748
16 libLLVM-3.2.so.1 0x55b5870e 
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 126
17 libLLVM-3.2.so.1 0x55d11acb 
llvm::FPPassManager::runOnFunction(llvm::Function&) + 619
18 libLLVM-3.2.so.1 0x55d11b2c 
llvm::FPPassManager::runOnModule(llvm::Module&) + 76
19 libLLVM-3.2.so.1 0x55d117f4 
llvm::MPPassManager::runOnModule(llvm::Module&) + 500
20 libLLVM-3.2.so.1 0x55d13368 llvm::PassManagerImpl::run(llvm::Module&) 
+ 120
21 libLLVM-3.2.so.1 0x55d133b6 llvm::PassManager::run(llvm::Module&) + 38
22 clang            0x0838289f 
clang::EmitBackendOutput(clang::DiagnosticsEngine&, 
clang::CodeGenOptions const&, clang::TargetOptions const&, 
clang::LangOptions const&, llvm::Module*, clang::BackendAction, 
llvm::raw_ostream*) + 3471
23 clang            0x083807ca
24 clang            0x084d7435 clang::ParseAST(clang::Sema&, bool, bool) 
+ 645
25 clang            0x08238408 clang::ASTFrontendAction::ExecuteAction() 
+ 120
26 clang            0x0837ff61 clang::CodeGenAction::ExecuteAction() + 33
27 clang            0x08238918 clang::FrontendAction::Execute() + 104
28 clang            0x0821dd2d 
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 253
29 clang            0x08206912 
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1362
30 clang            0x08201714 cc1_main(char const**, char const**, char 
const*, void*) + 1172
31 clang            0x082004fd main + 7101
32 libc.so.6        0x56cc38f5 __libc_start_main + 245
33 clang            0x082010d1
Stack dump:
0.	Program arguments: /usr/bin/clang -cc1 -triple i386-pc-linux-gnu 
-emit-obj -disable-free -disable-llvm-verifier -main-file-name bignum.c 
-mrelocation-model pic -pic-level 2 -pie-level 2 -masm-verbose 
-mconstructor-aliases -fuse-init-array -target-cpu pentium4 
-target-linker-version 2.23.52.20130620 -momit-leaf-frame-pointer -g 
-coverage-file /home/herwin/code/snapshot/bignum.o -resource-dir 
/usr/bin/../lib/clang/3.2 -D _FORTIFY_SOURCE=2 -D RUBY_EXPORT -I . -I 
.ext/include/x86_64-linux -I ./include -I . -fmodule-cache-path 
/var/tmp/clang-module-cache -internal-isystem /usr/local/include 
-internal-isystem /usr/bin/../lib/clang/3.2/include -internal-isystem 
/usr/include/clang/3.2/include/ -internal-externc-isystem 
/usr/include/i386-linux-gnu -internal-externc-isystem 
/usr/include/i486-linux-gnu -internal-externc-isystem /usr/include -O3 
-Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long 
-Wno-missing-field-initializers -Wunused-variable -Werror=pointer-arith 
-Werror=write-strings -Werror=declaration-after-statement 
-Werror=shorten-64-to-32 -Werror=implicit-function-declaration 
-Werror=extra-tokens -std=iso9899:199409 -fdebug-compilation-dir 
/home/herwin/code/snapshot -ferror-limit 19 -fmessage-length 182 
-fvisibility hidden -fwrapv -stack-protector 1 -mstackrealign 
-fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o 
bignum.o -x c bignum.c
1.	<eof> parser at end of file
2.	Code generation
3.	Running pass 'Function Pass Manager' on module 'bignum.c'.
4.	Running pass 'X86 DAG->DAG Instruction Selection' on function 
'@rb_big_mul_normal'
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see 
invocation)
Debian clang version 3.2-10 (tags/RELEASE_32/final) (based on LLVM 3.2)
Target: i386-pc-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to 
http://bugs.debian.org/ and include the crash backtrace, preprocessed 
source, and associated run script.
clang: note: diagnostic msg:

********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/bignum-5odPxv.c
clang: note: diagnostic msg: /tmp/bignum-5odPxv.sh
clang: note: diagnostic msg:

********************
make: *** [bignum.o] Error 254

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bignum-5odPxv.c
Type: text/x-csrc
Size: 1089314 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-llvm-team/attachments/20130713/8380604f/attachment-0001.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bignum-5odPxv.sh
Type: application/x-shellscript
Size: 842 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-llvm-team/attachments/20130713/8380604f/attachment-0001.bin>


More information about the Pkg-llvm-team mailing list