This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Change default value of FDEPointerEncoding
ClosedPublic

Authored by maksfb on Jul 5 2018, 2:46 PM.

Details

Summary

If the encoding is not specified in CIE augmentation string, then it
should be DW_EH_PE_absptr instead of DW_EH_PE_omit.

Diff Detail

Event Timeline

maksfb created this revision.Jul 5 2018, 2:46 PM
rafauler edited reviewers, added: rafauler; removed: rafaelauler.Jul 5 2018, 3:38 PM
rafauler added a subscriber: rafauler.
MaskRay accepted this revision.Jul 9 2018, 10:53 AM

The most relevant document about .eh_frame I can find is http://refspecs.linuxbase.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html , which does not say what the default encoding for FDE pointers should be.

But the http://www.nongnu.org/libunwind/ implementation provides a default depending on address size http://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=blob;f=src/dwarf/Gfde.c;h=9250b895eabebdaa964ab3ddefdaece8100593c6;hb=HEAD#l64
DW_EH_PE_absptr seems to do the same thing.

This revision is now accepted and ready to land.Jul 9 2018, 10:53 AM
MaskRay added a comment.EditedJul 9 2018, 10:56 AM

Just curious, in which case the R (in augmentation string) is missing?

@MaskRay this was originally reported here: https://github.com/facebookincubator/BOLT/issues/23

Apparently, this happens in binaries generated by icc.

This revision was automatically updated to reflect the committed changes.