[LLVMdev] landingpad and null filter clause
Duncan Sands
baldrick at free.fr
Mon May 12 02:50:18 PDT 2014
Hi Richard,
On 11/05/14 22:23, Richard Smith wrote:
> http://llvm.org/docs/ExceptionHandling.html#try-catch says:
>
> "The array argument to filter may be empty; for example, “[0 x i8**] undef”.
> This means that the landingpad should always be entered.
this seems pretty bogus to me, since it depends on the personality function.
For example in Ada there is no way to ensure that you always enter a landing
pad, there isn't even a catch-all filter. So this statement can't possibly be
correct. I'm pretty sure it is wrong for the C++ personality function too:
without any filters, I think the personality will just continue unwinding
further up the stack (experimentation is needed to confirm this because I don't
remember too well any more).
(Note that such a
> filter would not be equivalent to “catch i8* null”, because filter and catch
> produce negative and positive selector values respectively.)"
>
> The verifier disagrees with this claim:
>
> Filter operand is not an array of constants!
> %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)*
> @__gxx_personality_v0 to i8*)
> filter [0 x i8**] undef
> LLVM ERROR: Broken function found, compilation aborted!
>
> Is the documentation out of date, or is the verifier doing the wrong thing, or
> did I misunderstand what the documentation meant?
The message is wrong at least: "[0 x i8**] undef" sure looks like an array of
constants to me.
Ciao, Duncan.
>
>
> _______________________________________________
> 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