This is an archive of the discontinued LLVM Phabricator instance.

[LowerTypeTests] Mark .cfi.jumptable nounwind.
ClosedPublic

Authored by efriedma on Apr 25 2018, 2:14 PM.

Details

Summary

It doesn't unwind, and the wrong marking leads to the creation of an .eh_frame section when it isn't necessary.

Diff Detail

Repository
rL LLVM

Event Timeline

efriedma created this revision.Apr 25 2018, 2:14 PM
pcc accepted this revision.Apr 25 2018, 2:21 PM

LGTM

This revision is now accepted and ready to land.Apr 25 2018, 2:21 PM
This revision was automatically updated to reflect the committed changes.
joerg added a subscriber: joerg.Apr 27 2018, 6:58 AM

Given that .eh_frame sections can be used to create backtraces i.e. from signal handlers, this seems to be undesirable in the generality. Shouldn't this attribute be conditional on whether functions are normally supposed to have unwind data?

Are you asking about the case where -fasynchronous-unwind-tables is enabled? We normally represent that using the uwtable attribute. Not sure how we would decide whether we need the uwtable attribute; I guess we could scan the module and check if there are any other functions marked uwtable.

Yes, if that option is enabled explicitly or implicitly in the frontend, the expectation is that all compiler-generated functions have uwtable as well.