[all-commits] [llvm/llvm-project] 7d1538: Move LIBC_CONF_STRING_UNSAFE_WIDE_READ to top-leve...

Sterling-Augustine via All-commits all-commits at lists.llvm.org
Mon Oct 27 14:40:07 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7d1538cd3db3e228459e483ce9cdeb7fa4ae5e00
      https://github.com/llvm/llvm-project/commit/7d1538cd3db3e228459e483ce9cdeb7fa4ae5e00
  Author: Sterling-Augustine <saugustine at google.com>
  Date:   2025-10-27 (Mon, 27 Oct 2025)

  Changed paths:
    M libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
    M libc/src/string/CMakeLists.txt

  Log Message:
  -----------
  Move LIBC_CONF_STRING_UNSAFE_WIDE_READ to top-level libc-configuration (#165046)

This options sets a compile option when building sources inside the
string directory, and this option affects string_utils.h. But
string_utils.h is #included from more places than just the string
directory (such as from __support/CPP/string.h), leading to both
narrow-reads in those cases, but more seriously, ODR violations when the
two different string_length implementations are included int he same
program.

Having this option at the top level avoids this problem.



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