[PATCH] D48265: [sanitizer] Use confstr to check libc version in InitTlsSize

Peter Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 17 03:10:43 PDT 2018


Lekensteyn accepted this revision.
Lekensteyn added a comment.
This revision is now accepted and ready to land.

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.



================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc:210
+  *minor = (*p == '.') ?  internal_simple_strtoll(p + 1, &p, 10) : 0;
+  *patch = (*p == '.') ?  internal_simple_strtoll(p + 1, &p, 10) : 0;
+  return true;
----------------
style nitpicks: remove the double spaces after `?` in the lines above and in `sizeof(kGLibC)  - 1`.


Repository:
  rL LLVM

https://reviews.llvm.org/D48265





More information about the llvm-commits mailing list