[all-commits] [llvm/llvm-project] 4c8fab: [libc++] Avoid type-punning between __hash_value_t...

Nikolas Klauser via All-commits all-commits at lists.llvm.org
Thu Jun 26 10:44:20 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c8fab399b2ebf37f6a560bc2d5c6b4f0045a19f
      https://github.com/llvm/llvm-project/commit/4c8fab399b2ebf37f6a560bc2d5c6b4f0045a19f
  Author: Nikolas Klauser <nikolasklauser at berlin.de>
  Date:   2025-06-26 (Thu, 26 Jun 2025)

  Changed paths:
    M libcxx/include/__hash_table
    M libcxx/include/unordered_map
    M libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_copy.pass.cpp
    M libcxx/utils/gdb/libcxx/printers.py

  Log Message:
  -----------
  [libc++] Avoid type-punning between __hash_value_type and pair (#143501)

This patch is very similar to #134819 in nature. Before this patch, we
were dereferencing pointers to objects which were never constructed. Now
we always assume that nodes store `pair<const KeyT, ValueT>` for
unordered_maps instead, as they actually do.



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