[compiler-rt] [sanitizer] Remove usage of termios ioctl constants on Linux (PR #149140)
Thurston Dang via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 16 21:57:09 PDT 2025
================
@@ -482,4 +482,26 @@
# define SANITIZER_START_BACKGROUND_THREAD_IN_ASAN_INTERNAL 0
#endif
+#if SANITIZER_LINUX
+# if !SANITIZER_GLIBC || SANITIZER_PPC
+// Workaround for
+// glibc/commit/3d3572f59059e2b19b8541ea648a6172136ec42e
+// Linux: Keep termios ioctl constants strictly internal
+# define SANITIZER_TERMIOS_IOCTL_CONSTANTS 1
+# if SANITIZER_GLIBC && SANITIZER_PPC
+# define SANITIZER_TCGETS 0x402c7413
+# define SANITIZER_TCSETS 0x802c7414
+# define SANITIZER_TCSETSF 0x802c7415
+# define SANITIZER_TCSETSW 0x802c7416
----------------
thurstond wrote:
My understanding was glibc doesn't want us to use these constants and that there is no need to intercept these ioctls under glibc.
So the simplest change would be your original change (I can't refer to it anymore because of the force-push) that deleted unused lines, but guard the deletions with `SANITIZER_LINUX && SANITIZER_GLIBC`.
https://github.com/llvm/llvm-project/pull/149140
More information about the llvm-commits
mailing list