[llvm-dev] [Exception Handling] Is the default -funwind-tables still required on x86?

Reid Kleckner via llvm-dev llvm-dev at lists.llvm.org
Mon Aug 27 13:01:34 PDT 2018


Yes, I think we should continue emit unwind info into .eh_frame on x86 by
default, even for C code that doesn't use EH. It's nice to have unwind
information in the binary so that you can unwind the stack anywhere in the
program.

I think that's the right default, I'm not sure why it's even architecture
specific, though. I'd rather enable -funwind-tables by default on more
architectures. Maybe the default -funwind-tables logic in clang should be a
blacklist of legacy ISAs that don't want .eh_frame by default instead of
whitelist of where to enable it by default.

On Mon, Aug 27, 2018 at 7:59 AM Stefan Pintilie via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi All,
>
> Recently I fixed a bug that was exposed on PowerPC relating to missing
> unwind tables.
>
> Bug:
> https://bugs.llvm.org/show_bug.cgi?id=32611
>
> Patch For Fix:
> https://reviews.llvm.org/D50987
>
> The bug was not exposed on x86 because the option -funwind-tables is on by
> default and so the uwtable attribute is added to all functions on x86. With
> the fix an unwind table is added to any function that has an error handling
> personality. My questions: 1) Why is -funwind-tables default on x86? 2)
> Does it still need to be default now that this fix is in?
>
> Thank you,
> Stefan
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180827/420102b0/attachment.html>


More information about the llvm-dev mailing list