This is an archive of the discontinued LLVM Phabricator instance.

[libc++][hardening] Add an ABI macro `_LIBCPP_ABI_BOUNDED_ITERATORS`.
ClosedPublic

Authored by var-const on Jun 27 2023, 10:03 AM.

Details

Summary

Use the new macro instead of _LIBCPP_DEBUG_ITERATOR_BOUNDS_CHECKING.

Diff Detail

Event Timeline

var-const created this revision.Jun 27 2023, 10:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2023, 10:03 AM
var-const requested review of this revision.Jun 27 2023, 10:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2023, 10:03 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript

Note: this patch is split from https://reviews.llvm.org/D151637 (which is a draft but helps see the state towards which this patch is working).

ldionne added inline comments.
libcxx/include/__config
197

This is not true right now, so it should be removed.

198
199–200

This is also aspirational so it could be removed (for now).

202–203

This seems simpler but also more accurate.

libcxx/include/__config_site.in
33 ↗(On Diff #535037)

We generally don't do that for ABI macros (except e.g. _LIBCPP_ABI_FORCE_ITANIUM and _LIBCPP_ABI_FORCE_MICROSOFT which are kind of hacks and don't have the same purpose as other ABI macros). I don't think this is necessary.

ldionne accepted this revision.Jun 27 2023, 12:25 PM

Basically LGTM w/ comments applied, this is pretty straightforward.

This revision is now accepted and ready to land.Jun 27 2023, 12:25 PM
var-const marked 5 inline comments as done.

Address feedback

Thanks for the feedback!

ldionne accepted this revision.Jun 27 2023, 1:25 PM

The CI failure (on Windows) looks unrelated:

ERROR Error uploading artifact states: Put "https://agent.buildkite.com/v3/jobs/0188fe57-a065-42d7-9db7-12f5c85e38c4/artifacts": context deadline exceeded

I'll go ahead and merge this.

This revision was landed with ongoing or failed builds.Jun 27 2023, 4:41 PM
This revision was automatically updated to reflect the committed changes.