This is an archive of the discontinued LLVM Phabricator instance.

Fix linkage of _ZTS strings for types involving incomplete classes to match the Itanium ABI rules.
Needs ReviewPublic

Authored by rsmith on May 24 2019, 2:32 PM.

Details

Reviewers
rjmccall
Summary

Without this patch, type_info objects for pointers to incomplete classes
compare unequal with libc++ when formed in multiple translation units,
because each translation unit has its own copy of the _ZTS symbol, in
violation of the Itanium ABI's uniqueness rule.

Diff Detail

Event Timeline

rsmith created this revision.May 24 2019, 2:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 24 2019, 2:32 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
EricWF added a subscriber: EricWF.May 27 2019, 4:41 PM

I think this is llvm.org/PR37398

I tried fixing this a while back in r332028 but the fix got reverted for causing llvm.org/PR37545.

I think this is llvm.org/PR37398

I tried fixing this a while back in r332028 but the fix got reverted for causing llvm.org/PR37545.

Looks like I had a fix for that in https://reviews.llvm.org/D47092 but it seems we decided to not go that way because the issue is really an ASan instrumentation bug and should be fixed in ASan instead... so I guess this is blocked on a fix to ASan :-/