This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Remove bad_array_length
ClosedPublic

Authored by ldionne on Nov 21 2018, 9:54 AM.

Details

Summary

std::bad_array_length was added by n3467, but this never made it into C++.
This commit removes the definition of std::bad_array_length from the headers
AND from the shared library. See the comments in the ABI changelog for details
about the ABI implications of this change.

Diff Detail

Repository
rCXX libc++

Event Timeline

ldionne created this revision.Nov 21 2018, 9:54 AM

If we have shipped this in libc++abi.dylib, we need to continue supporting it for bincompat of existing apps.

If we have shipped this in libc++abi.dylib, we need to continue supporting it for bincompat of existing apps.

I don't think it's possible for any application to actually use the symbols, as they were marked as unavailable on Darwin. It would technically be possible for an application to depend on the symbol by e.g. forward-declaring it themselves, but I think it is quite unlikely this has ever happened, especially for something that was not even standardized. The same reasoning applies to symbols that we have been exporting "by mistake" through implicit instantiations of function templates that were not marked as hidden. We're comfortable removing such symbols because nobody could depend on those symbols being part of the dylib, except if they _really_ tried hard (by forward declaring the function template and using an explicit instantiation declaration with default visibility).

dexonsmith added a comment.EditedNov 26 2018, 3:29 PM

If we have shipped this in libc++abi.dylib, we need to continue supporting it for bincompat of existing apps.

I don't think it's possible for any application to actually use the symbols, as they were marked as unavailable on Darwin.

I think I added that markup later though. What was the setup for applications built before that markup was there?

(Agreed that we don't think there are people that added their own declarations.)

dexonsmith added inline comments.Nov 26 2018, 5:42 PM
libcxx/lib/abi/CHANGELOG.TXT
23 ↗(On Diff #174947)

If the symbols really didn't ship until that late, then we may be okay.

Louis confirmed that we had the unavailable in place before shipping the symbols. This LGTM from our perspective, but do other vendors have comments?

ldionne updated this revision to Diff 175915.Nov 29 2018, 11:41 AM

Added release notes.

I'd like to merge this early in the cycle to give vendors the chance to notice failures in case there are any (but we don't expect that to happen given our investigation). I'll merge this now because I'm not aware of any other vendor that could be worried by this (and so the waiting time implied by Duncan's question above is potentially unbounded). However, if anyone has concerns, please comment here and I'll insta-revert until we've come to an agreement.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 29 2018, 11:47 AM
This revision was automatically updated to reflect the committed changes.
src/support/runtime/exception_msvc.ipp