[all-commits] [llvm/llvm-project] b5f4f1: [libcxx] Remove ASan container overflow checks for...

Aiden Grossman via All-commits all-commits at lists.llvm.org
Mon May 4 19:00:04 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b5f4f16fd98cb57a13a96b7d7faa89326636c5bc
      https://github.com/llvm/llvm-project/commit/b5f4f16fd98cb57a13a96b7d7faa89326636c5bc
  Author: Aiden Grossman <aidengrossman at google.com>
  Date:   2026-05-04 (Mon, 04 May 2026)

  Changed paths:
    M libcxx/include/string
    R libcxx/test/libcxx/strings/basic.string/asan_deque_integration.pass.cpp
    R libcxx/test/libcxx/strings/basic.string/asan_short.pass.cpp
    R libcxx/test/libcxx/strings/basic.string/asan_vector_integration.pass.cpp
    M libcxx/test/support/asan_testing.h

  Log Message:
  -----------
  [libcxx] Remove ASan container overflow checks for SSO strings (#194208)

Essentially a revert of #79536, although manual given how much the code
has changed.

Doing container overflow checks on SSO strings is fundamentally unsound
due to how they interact with compiler optimizations within LLVM, which
assume that the entire object is dereferencable when it is live. LLVM
can sometimes insert speculative loads that will create false positives
when they try and load a partially filled SSO buffer. This was
previously prevented using inline asm barriers within std::string
itself. However, this can also manifest in other ways, with the
motivating example for the revert being GlobalOpt inserting a
speculative load of a std::variant containing a SSO std::string, causing
an ASan failure.



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