[LLVMdev] exception handling broken on x86-64?
Dale Johannesen
dalej at apple.com
Sat Feb 9 10:39:24 PST 2008
On Feb 9, 2008, at 6:53 AM, Thomas Neumann wrote:
> Hi,
>
> when building the second release candidate of llvm 2.2 I noticed that
> exception handling seems to be broken on Linux x86-64. The exception
> is
> thrown but never caught.
> This can be seen by this trivial example:
>
> #include <iostream>
> using namespace std;
> class A { };
> int main()
> {
> cout << "A" << endl;
> try {
> cout << "B" << endl;
> throw A();
> cout << "C" << endl;
> } catch (const A&) {
> cout << "D" << endl;
> }
> cout << "E" << endl;
> }
Works for me on x86-64 Darwin, fwiw. I made EH work in that
environment with 46029, and it's possible I broke Linux when I did
that, although I don't think so. Anybody tried this since January 16?
If the assembler code looks right there is probably something wrong in
the Dwarf metadata. Try comparing with the output of g++; you'll need
some understanding of Dwarf. The options -asm-verbose on llvm and -dA
on g++ will give you some debugging info.
> When compiled with llvm-g++ it aborts after printing "B". The
> generated
> assembler code looks reasonable at a first glance, but something must
> be broken. Any ideas about how to debug this?
>
> I build the gcc 4.2 snapshot from the second release candidate with
> --disable-multilib and --disable-shared to get it to build (as
> suggested by the readme). llvm itself was build without special
> options.
>
> Thomas
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list