[libcxx-commits] [PATCH] D119853: [libc++] Guard much of std::ranges under _LIBCPP_HAS_NO_INCOMPLETE_RANGES.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 15 12:17:55 PST 2022


ldionne closed this revision.
ldionne added a comment.

Landed this:

  commit dfc24b8522ba9943e20bc4162d42d6b49bf85214 (origin/release/14.x, release/14.x)
  Author: Konstantin Varlamov <varconst at apple.com>
  Date:   Fri Feb 11 11:56:29 2022 -0800
  
      [libc++][NFC] Work around false positive ODR violations from ASan.
  
      This works around a known issue in ASan. ASan doesn't instrument weak
      symbols. Because instrumentation increases object size, the binary can
      end up with two versions of the same object, one instrumented and one
      not instrumented, with different sizes, which ASan will report as an ODR
      violation. In libc++, this affects typeinfo for `std::bad_function_call`
      which is emitted as a weak symbol in the test executable and as a strong
      symbol in the shared library.
  
      The main open issue for ASan appears to be
      https://github.com/google/sanitizers/issues/1017.
  
      Differential Revision: https://reviews.llvm.org/D119410
  
      (cherry picked from commit 10953974ed6b61247fd4b070b3a6e390e02d0edb)
  
  commit 199e05e34bb8beb1cafce3a086932a32c493fa13
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   Tue Feb 15 15:10:27 2022 -0500
  
      [libc++] Add missing UNSUPPORTED for the has-no-incomplete-ranges test
  
      This wasn't caught because we don't test the combination of no-filesystem
      and no-experimental-features in the CI.
  
      (cherry picked from commit 7dad5f84f1b8a7aafd5a27ce2889bd72a1e54002)
  
  commit 7fdca71be63aa2abad2bff099c6754938a2fe4fc
  Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
  Date:   Tue Feb 1 16:52:02 2022 -0500
  
      [libc++] Guard much of std::ranges under _LIBCPP_HAS_NO_INCOMPLETE_RANGES.
  
      The logic here is that we are disabling *only* things in `std::ranges::`.
      Everything in `std::` is permitted, including `default_sentinel`, `contiguous_iterator`,
      `common_iterator`, `projected`, `swappable`, and so on. Then, we include
      anything from `std::ranges::` that is required in order to make those things
      work: `ranges::swap`, `ranges::swap_ranges`, `input_range`, `ranges::begin`,
      `ranges::iter_move`, and so on. But then that's all. Everything else (including
      notably all of the "views" and the `std::views` namespace itself) is still
      locked up behind `_LIBCPP_HAS_NO_INCOMPLETE_RANGES`.
  
      Originally reviewed as https://reviews.llvm.org/D118736.
  
      (cherry picked from commit 53406fb691db38b21decf233e091f648f8317b2d)
  
      Differential Revision: https://reviews.llvm.org/D119853


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119853



More information about the libcxx-commits mailing list