[all-commits] [llvm/llvm-project] e6fa3f: [dfsan] Wrap glibc 2.38 __isoc23_* functions (#79958)

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Feb 9 13:19:23 PST 2024


  Branch: refs/heads/release/18.x
  Home:   https://github.com/llvm/llvm-project
  Commit: e6fa3ff6cc43f78000e56996a45f83acf53d2536
      https://github.com/llvm/llvm-project/commit/e6fa3ff6cc43f78000e56996a45f83acf53d2536
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-02-09 (Fri, 09 Feb 2024)

  Changed paths:
    M compiler-rt/lib/dfsan/dfsan_custom.cpp
    M compiler-rt/lib/dfsan/done_abilist.txt
    M compiler-rt/lib/dfsan/libc_ubuntu1404_abilist.txt

  Log Message:
  -----------
  [dfsan] Wrap glibc 2.38 __isoc23_* functions (#79958)

Fix #79283: `test/dfsan/custom.cpp` has undefined symbol linker errors
on glibc 2.38 due to lack of wrappers for `__isoc23_strtol` and
`__isoc23_scanf` family functions.

Implement these wrappers as aliases to existing wrappers, similar to
https://reviews.llvm.org/D158943 for other sanitizers.

`strtol` in a user program, whether or not `_ISOC2X_SOURCE` is defined,
uses the C23 semantics (`strtol("0b1", 0, 0)` => 1), when
`libclang_rt.dfsan.a` is built on glibc 2.38+.

(cherry picked from commit 648560062af8deb4e6478130deb1dd8fa62929a8)




More information about the All-commits mailing list