[LLVMdev] uses of unwind lead to crashes

John Clements aoeullvm at brinckerhoff.org
Wed Jan 28 09:56:33 PST 2009


On Jan 28, 2009, at 1:20 AM, Duncan Sands wrote:

> Hi John,
>
>> I have what appears to be a bug in LLVM... I'm deeply hesitant to
>> label it a bug, given my lack of experience with LLVM, but the
>> behaviour of this fragment strongly suggests a bug.
>
> this is a frequently asked question.  The LLVM code generators
> currently do not support unwind.  As far as I know the only
> back-end that supports it is the interpreter.  You may wonder
> how llvm-gcc manages to support exception handling?  It calls
> the unwind routine in the gcc library, which takes care of
> unwinding the stack.  The LLVM exception *catching* stuff works
> fine, but *throwing* (unwind) is trickier to get working which
> is why no one did it yet.  I have a plan for implementing it,
> but it is low on my list of priorities...

Thanks for your prompt response!

If I understand you correctly, one interim measure would be to update  
the code generators that don't support unwind to explicitly signal an  
error, no? You could always have a -compile-anyway command-line flag  
that tells the code generator to do its best, for users that want to  
proceed with the unsupported feature.

Thanks again,

John Clements




More information about the llvm-dev mailing list