[libcxx-commits] [PATCH] D147089: [libc++] Add assertions for potential OOB reads in std::sort

Alexander Kornienko via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon May 22 16:05:34 PDT 2023


alexfh added a comment.

In D147089#4362778 <https://reviews.llvm.org/D147089#4362778>, @alexfh wrote:

> In D147089#4349826 <https://reviews.llvm.org/D147089#4349826>, @ldionne wrote:
>
>> See https://reviews.llvm.org/D150779 for the temporary workaround.
>
> @ldionne thanks for the workaround! However, it doesn't help even with the original reproducer in godbolt (https://gcc.godbolt.org/z/be7xMhcn3). We've done some progress cleaning up non-conforming iterators (mostly adding `const` to dereference and comparison operators), but I'd still find it useful to have a working workaround for this in case we're stuck with some of the fixes. I guess, other libc++ users would also appreciate a more controllable way to enable enforcement of iterator requirements.

Ideally, it would be nice to put breaking changes in this area under a config option that could be enabled in order to get an early warning or prevent backsliding.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147089/new/

https://reviews.llvm.org/D147089



More information about the libcxx-commits mailing list