[all-commits] [llvm/llvm-project] da618c: [NFC][libc++] Guard against operator& hijacking. (...

Mark de Wever via All-commits all-commits at lists.llvm.org
Thu Feb 27 08:47:56 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: da618cf0a76371ca89769ca706fe39cc92fbf7d6
      https://github.com/llvm/llvm-project/commit/da618cf0a76371ca89769ca706fe39cc92fbf7d6
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2025-02-27 (Thu, 27 Feb 2025)

  Changed paths:
    M libcxx/include/__atomic/atomic.h
    M libcxx/include/__atomic/atomic_ref.h
    M libcxx/include/__charconv/traits.h
    M libcxx/include/__filesystem/path.h
    M libcxx/include/__functional/hash.h
    M libcxx/include/__iterator/aliasing_iterator.h
    M libcxx/include/__locale
    M libcxx/include/__mdspan/layout_left.h
    M libcxx/include/__mdspan/layout_right.h
    M libcxx/include/__mdspan/layout_stride.h
    M libcxx/include/__mdspan/mdspan.h
    M libcxx/include/__memory/shared_count.h
    M libcxx/include/__ostream/basic_ostream.h
    M libcxx/include/__split_buffer
    M libcxx/include/__stop_token/intrusive_shared_ptr.h
    M libcxx/include/__string/constexpr_c_functions.h
    M libcxx/include/__thread/thread.h
    M libcxx/include/cwchar
    M libcxx/include/fstream
    M libcxx/include/future
    M libcxx/include/locale
    M libcxx/include/regex
    M libcxx/include/string

  Log Message:
  -----------
  [NFC][libc++] Guard against operator& hijacking. (#128351)

This set usage of operator& instead of std::addressof seems not be easy
to "abuse". Some seem easy to misuse, like basic_ostream::operator<<,
trying to do that results in compilation errors since the `widen`
function is not specialized for the hijacking character type. Hence
there are no tests.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list