: SIGSEGV in compiled programs during stack unwinding

It seemed I found possible llvm-g++ bug.
Programs compiled with llvm-g++ 4.5 crashed with SIGSEGV during stack unwinding in such testcase:

chaos@chaos-desktop ~ % g++ --version
g++ (Ubuntu/Linaro 4.5.1-7ubuntu2) 4.5.1

chaos@chaos-desktop ~ % echo “struct X{ ~X(){} }; int main() { X x; throw 1; }” > test.cpp && g++ test.cpp && ./a.out
terminate called after throwing an instance of ‘int’
zsh: abort ./a.out

chaos@chaos-desktop ~ % echo “struct X{ ~X(){} }; int main() { X x; throw 1; }” > test.cpp && llvm-g++ test.cpp && ./a.out
zsh: segmentation fault ./a.out

chaos@chaos-desktop ~ % llvm-g++ --version
g+±4.5 (Ubuntu/Linaro 4.5.1-7ubuntu2) 4.5.1

chaos@chaos-desktop ~ % valgrind ./a.out
==19523== Memcheck, a memory error detector
==19523== Copyright (C) 2002-2010, and GNU GPL’d, by Julian Seward et al.
==19523== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==19523== Command: ./a.out
==19523==
vex x86->IR: unhandled instruction bytes: 0x36 0xE1 0xBE 0x0
==19523==
==19523== Process terminating with default action of signal 11 (SIGSEGV)
==19523== Bad permissions for mapped region at address 0x42CAFF4
==19523== at 0x42D1068: ???
==19523== by 0x4187CE6: (below main) (libc-start.c:226)
==19523==

Hi Chaos A.D.,

It seemed I found possible llvm-g++ bug.
Programs compiled with llvm-g++ 4.5 crashed with SIGSEGV during stack unwinding
in such testcase:

there is no such thing as llvm-g++ 4.5. Is this dragonegg as shipped by ubuntu?
(I think that comes with a script "llvm-g++" which makes it act a bit like
llvm-g++).

Ciao,

Duncan.

Hi Chaos A.D.,

It seemed I found possible llvm-g++ bug.
Programs compiled with llvm-g++ 4.5 crashed with SIGSEGV during stack unwinding
in such testcase:

I can reproduce this - investigating.

Ciao,

Duncan.

It seemed I found possible llvm-g++ bug.
Programs compiled with llvm-g++ 4.5 crashed with SIGSEGV during stack unwinding
in such testcase:

I can reproduce this - investigating.

This should be fixed in commit 120096. Thanks for reporting the problem!

Ciao,

Duncan.