This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer] Use confstr to check libc version in InitTlsSize
ClosedPublic

Authored by vitalybuka on Jun 17 2018, 1:57 AM.

Diff Detail

Event Timeline

vitalybuka created this revision.Jun 17 2018, 1:57 AM
Lekensteyn accepted this revision.Jun 17 2018, 3:10 AM

With the three whitespace issues fixed up, LGTM.
(I am also observing that the version check in ThreadDescriptorSize is Linux-only (minus Android), such that the cpp guards !SANITIZER_FREEBSD && !SANITIZER_ANDROID && ... will be broad enough.)

Tested with -m32 -fsanitize=address glibc 2.27.0 (with #define CHECK_GET_TLS_STATIC_INFO_VERSION 1) and glibc 2.23.0.

compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc
210

style nitpicks: remove the double spaces after ? in the lines above and in sizeof(kGLibC) - 1.

This revision is now accepted and ready to land.Jun 17 2018, 3:10 AM

clang-format

vitalybuka marked an inline comment as done.Jun 17 2018, 10:30 AM
This revision was automatically updated to reflect the committed changes.