[all-commits] [llvm/llvm-project] 05c33c: [NFC][libc++] Guard agains operator& hijacking.

Mark de Wever via All-commits all-commits at lists.llvm.org
Sat Feb 22 05:09:07 PST 2025


  Branch: refs/heads/users/mordante/operator_hijacking_not_exploitable
  Home:   https://github.com/llvm/llvm-project
  Commit: 05c33c80b15e9f1cd27206f31ff69add583f72af
      https://github.com/llvm/llvm-project/commit/05c33c80b15e9f1cd27206f31ff69add583f72af
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2025-02-22 (Sat, 22 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 agains operator& hijacking.

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