[LLVMdev] Unwind + lli
Talin
viridia at gmail.com
Fri May 2 22:04:15 PDT 2008
Is there a problem using 'unwind' with lli? When I run the following
program with lli, I get a crash:
define i32 @main() {
entry:
invoke void @throw_something() to label %nounwind unwind label %catch
nounwind:
ret i32 1
catch:
ret i32 0
}
define void @throw_something() noreturn {
entry:
unwind
}
To run this, I am doing:
llvm-as crash.ll
lli -enable-eh crash.bc
I was going to report this as a bug, but I realized after simplifying my
example to the smallest possible failure case, that no one could have
missed this, so it must be something I am doing wrong or have missed. I
also tried running it under gdb, but the debugger wasn't able to make
sense of the stack frame at the crash site.
Note that if I add -force-interpreter to the command line, it runs OK.
If I change the unwind to a ret void, it also runs OK.
-- Talin
More information about the llvm-dev
mailing list