[all-commits] [llvm/llvm-project] ba79fb: [libc++] Re-apply "Remove UB in list, forward_list...

Louis Dionne via All-commits all-commits at lists.llvm.org
Fri Oct 13 08:04:09 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ba79fb2e1ff7130cde02fbbd325f0f96f8a522ca
      https://github.com/llvm/llvm-project/commit/ba79fb2e1ff7130cde02fbbd325f0f96f8a522ca
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2023-10-13 (Fri, 13 Oct 2023)

  Changed paths:
    M libcxx/include/__hash_table
    M libcxx/include/__node_handle
    M libcxx/include/__tree
    M libcxx/include/ext/hash_map
    M libcxx/include/forward_list
    M libcxx/include/list
    M libcxx/include/unordered_map
    M libcxx/include/unordered_set

  Log Message:
  -----------
  [libc++] Re-apply "Remove UB in list, forward_list and __hash_table"

This patch removes undefined behavior in list and forward_list and __hash_table
caused by improperly beginning and ending the lifetime of the various node
classes. It allows removing the _LIBCPP_STANDALONE_DEBUG macro from
these node types since we now properly begin and end their lifetime,
meaning that we won't trip up constructor homing.

See https://reviews.llvm.org/D98750 for more information on what prompted
this patch.

This commit re-applies 0687e4d9f310, which had been reverted in b935882bdce7
because it broke the LLDB build. LLDB folks tell me I can go ahead and
re-commit this now.

Differential Revision: https://reviews.llvm.org/D101206

Co-authored-by: Amy Kwan <amy.kwan1 at ibm.com>




More information about the All-commits mailing list