Page MenuHomePhabricator

[libc++abi] Do not export some implementation-detail functions

Authored by ldionne on Oct 2 2019, 2:21 PM.



Those functions started being mistakenly exported from the libc++abi
shared library after commit r344152 in 2018. Removing these symbols is
technically an ABI break. However, they are not part of the C++ ABI,
they haven't ever been re-exported from libc++, and they are not
declared in any public header, so it's very unlikely that calls to
these functions exist out there. Also, the functions have reserved
names, so any impacted user would have to have tried really hard
being broken by this removal.

Note that avoiding this kind of problem is exactly why we're now
controlling exported symbols explicitly with a textual list.

Also note that applying the hidden visibility attribute is necessary
because the list of exported symbols is only used on Apple platforms
for the time being.

Diff Detail


Event Timeline

ldionne created this revision.Oct 2 2019, 2:21 PM
smeenai added a subscriber: smeenai.Oct 2 2019, 2:39 PM

Do we not build libc++abi with -fvisibility=hidden? That would also have prevented this, right?

phosek accepted this revision.Oct 2 2019, 8:12 PM


This revision is now accepted and ready to land.Oct 2 2019, 8:12 PM

Do we not build libc++abi with -fvisibility=hidden? That would also have prevented this, right?

No, we don’t. At least we used not to. And yes, it would have prevented that.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 3 2019, 7:23 AM