[compiler-rt] [sanitizer] Remove usage of termios ioctl constants on Linux (PR #149140)

Florian Weimer via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 18 09:28:31 PDT 2025


================
@@ -482,4 +482,17 @@
 #  define SANITIZER_START_BACKGROUND_THREAD_IN_ASAN_INTERNAL 0
 #endif
 
+#if SANITIZER_LINUX
+#    if SANITIZER_GLIBC
+// Workaround for
+// glibc/commit/3d3572f59059e2b19b8541ea648a6172136ec42e
+// Linux: Keep termios ioctl constants strictly internal
+#      if __GLIBC_PREREQ(2, 41)
+#        define SANITIZER_TERMIOS_IOCTL_CONSTANTS 0
+#      else
+#        define SANITIZER_TERMIOS_IOCTL_CONSTANTS 1
+#      endif
+#    else
+#      define SANITIZER_TERMIOS_IOCTL_CONSTANTS 1
+#    endif
----------------
fweimer-rh wrote:

Why make this conditional? The `ioctl` interceptors never worked. I don't think it's necessary to keep pretending otherwise for old glibc versions.

https://github.com/llvm/llvm-project/pull/149140


More information about the llvm-commits mailing list