[all-commits] [llvm/llvm-project] 3eb929: Make ios_base::xalloc non-atomic with LIBCXX_ENABL...

Eli Friedman via All-commits all-commits at lists.llvm.org
Tue Jul 14 13:54:47 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3eb929be5e17d66900020bd1caa7d2510d4f9601
      https://github.com/llvm/llvm-project/commit/3eb929be5e17d66900020bd1caa7d2510d4f9601
  Author: Eli Friedman <efriedma at qti.qualcomm.com>
  Date:   2026-07-14 (Tue, 14 Jul 2026)

  Changed paths:
    M libcxx/src/ios.cpp

  Log Message:
  -----------
  Make ios_base::xalloc non-atomic with LIBCXX_ENABLE_THREADS=OFF. (#208356)

762b77a moved the definition of "xindex" out of the header, and in the
process dropped the _LIBCPP_HAS_THREADS check. Re-add the check to
maintain the status quo.

The discussion on https://github.com/llvm/llvm-project/pull/198994
indicates it's not clear whether LIBCXX_ENABLE_THREADS=OFF is actually
supposed to mean single-threaded. But it clearly does in practice:
atomic_support.h uses non-atomic ops when threads are disabled, and a
few other APIs have explicit non-atomic fallback paths.

My team ran into this trying to run libc++ tests for a RISC-V core
without the "a" extension.



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