[all-commits] [llvm/llvm-project] 41658b: [libc++][hardening] Add iterator validity checks o...

David Benjamin via All-commits all-commits at lists.llvm.org
Mon Mar 11 18:39:42 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 41658bafb70680d0aafb7e79c7f694b8c2a5217d
      https://github.com/llvm/llvm-project/commit/41658bafb70680d0aafb7e79c7f694b8c2a5217d
  Author: David Benjamin <davidben at google.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M libcxx/include/__hash_table
    A libcxx/test/libcxx/containers/unord/unord.map/assert.iterator.dereference.pass.cpp
    A libcxx/test/libcxx/containers/unord/unord.map/assert.iterator.increment.pass.cpp
    A libcxx/test/libcxx/containers/unord/unord.map/assert.local_iterator.dereference.pass.cpp
    A libcxx/test/libcxx/containers/unord/unord.map/assert.local_iterator.increment.pass.cpp
    R libcxx/test/libcxx/containers/unord/unord.map/debug.iterator.dereference.pass.cpp
    R libcxx/test/libcxx/containers/unord/unord.map/debug.iterator.increment.pass.cpp
    R libcxx/test/libcxx/containers/unord/unord.map/debug.local_iterator.dereference.pass.cpp
    R libcxx/test/libcxx/containers/unord/unord.map/debug.local_iterator.increment.pass.cpp
    A libcxx/test/libcxx/containers/unord/unord.multimap/assert.iterator.dereference.pass.cpp
    A libcxx/test/libcxx/containers/unord/unord.multimap/assert.iterator.increment.pass.cpp
    A libcxx/test/libcxx/containers/unord/unord.multimap/assert.local_iterator.dereference.pass.cpp
    A libcxx/test/libcxx/containers/unord/unord.multimap/assert.local_iterator.increment.pass.cpp
    R libcxx/test/libcxx/containers/unord/unord.multimap/debug.iterator.dereference.pass.cpp
    R libcxx/test/libcxx/containers/unord/unord.multimap/debug.iterator.increment.pass.cpp
    R libcxx/test/libcxx/containers/unord/unord.multimap/debug.local_iterator.dereference.pass.cpp
    R libcxx/test/libcxx/containers/unord/unord.multimap/debug.local_iterator.increment.pass.cpp
    A libcxx/test/libcxx/containers/unord/unord.multiset/assert.iterator.dereference.pass.cpp
    A libcxx/test/libcxx/containers/unord/unord.multiset/assert.iterator.increment.pass.cpp
    A libcxx/test/libcxx/containers/unord/unord.multiset/assert.local_iterator.dereference.pass.cpp
    A libcxx/test/libcxx/containers/unord/unord.multiset/assert.local_iterator.increment.pass.cpp
    R libcxx/test/libcxx/containers/unord/unord.multiset/debug.iterator.dereference.pass.cpp
    R libcxx/test/libcxx/containers/unord/unord.multiset/debug.iterator.increment.pass.cpp
    R libcxx/test/libcxx/containers/unord/unord.multiset/debug.local_iterator.dereference.pass.cpp
    R libcxx/test/libcxx/containers/unord/unord.multiset/debug.local_iterator.increment.pass.cpp
    A libcxx/test/libcxx/containers/unord/unord.set/assert.iterator.dereference.pass.cpp
    A libcxx/test/libcxx/containers/unord/unord.set/assert.iterator.increment.pass.cpp
    A libcxx/test/libcxx/containers/unord/unord.set/assert.local_iterator.dereference.pass.cpp
    A libcxx/test/libcxx/containers/unord/unord.set/assert.local_iterator.increment.pass.cpp
    R libcxx/test/libcxx/containers/unord/unord.set/debug.iterator.dereference.pass.cpp
    R libcxx/test/libcxx/containers/unord/unord.set/debug.iterator.increment.pass.cpp
    R libcxx/test/libcxx/containers/unord/unord.set/debug.local_iterator.dereference.pass.cpp
    R libcxx/test/libcxx/containers/unord/unord.set/debug.local_iterator.increment.pass.cpp

  Log Message:
  -----------
  [libc++][hardening] Add iterator validity checks on unordered containers (#80230)

These are simply null checks, so use `_LIBCPP_ASSERT_NON_NULL`. This
allows us to restore a bunch of the old debug tests. I've extended them
to also cover the const iterators, as those run through different
codepaths than the const ones.

This does the easier (and less important) half of #80212.



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