Skip to content

[compiler-rt] Remove struct_termio_sz from sanitizer_platform_limits_posix.cpp #137440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

trcrsired
Copy link

Fix #137436

The struct termio and its associated code have been removed from glibc as they are considered obsolete. This change removes the corresponding code in compiler-rt to maintain compatibility.

Additionally, the check for struct_termio_sz specific to Android has been removed. There is no guarantee that the Linux kernel or Google will continue supporting struct termio, and its removal aligns with the deprecation in glibc.

Reference: glibc commit e04afb71771710cdc6025fe95908f5f17de7b72d

bminor/glibc@e04afb7

…posix.cpp

The `struct termio` and its associated code have been removed from glibc as they are considered obsolete. This change removes the corresponding code in compiler-rt to maintain compatibility. 

Additionally, the check for `struct_termio_sz` specific to Android has been removed. There is no guarantee that the Linux kernel or Google will continue supporting `struct termio`, and its removal aligns with the deprecation in glibc.

Reference: glibc commit e04afb71771710cdc6025fe95908f5f17de7b72d

bminor/glibc@e04afb7
Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot
Copy link
Member

llvmbot commented Apr 26, 2025

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: cqwrteur (trcrsired)

Changes

Fix #137436

The struct termio and its associated code have been removed from glibc as they are considered obsolete. This change removes the corresponding code in compiler-rt to maintain compatibility.

Additionally, the check for struct_termio_sz specific to Android has been removed. There is no guarantee that the Linux kernel or Google will continue supporting struct termio, and its removal aligns with the deprecation in glibc.

Reference: glibc commit e04afb71771710cdc6025fe95908f5f17de7b72d

bminor/glibc@e04afb7


Full diff: https://github.com/llvm/llvm-project/pull/137440.diff

1 Files Affected:

  • (modified) compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp (-3)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
index b4d87ab6228e5..7a89bf1c74985 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
@@ -494,9 +494,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
   unsigned struct_input_id_sz = sizeof(struct input_id);
   unsigned struct_mtpos_sz = sizeof(struct mtpos);
   unsigned struct_rtentry_sz = sizeof(struct rtentry);
-#if SANITIZER_GLIBC || SANITIZER_ANDROID
-  unsigned struct_termio_sz = sizeof(struct termio);
-#endif
   unsigned struct_vt_consize_sz = sizeof(struct vt_consize);
   unsigned struct_vt_sizes_sz = sizeof(struct vt_sizes);
   unsigned struct_vt_stat_sz = sizeof(struct vt_stat);

@thesamesam
Copy link
Member

There's #137403 already.

@trcrsired trcrsired closed this Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants