[compiler-rt] r261193 - [compiler-rt] Return correct size of struct pthread for glibc-2.12.2

Hahnfeld, Jonas via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 23:19:17 PST 2016


Hi all,

I think this would be another candidate to go into 3.8...

Sorry for those last-minute fixes,
Jonas

> -----Original Message-----
> From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On Behalf
> Of Jonas Hahnfeld via llvm-commits
> Sent: Thursday, February 18, 2016 8:08 AM
> To: llvm-commits at lists.llvm.org
> Subject: [compiler-rt] r261193 - [compiler-rt] Return correct size of struct
> pthread for glibc-2.12.2
>
> Author: hahnfeld
> Date: Thu Feb 18 01:08:26 2016
> New Revision: 261193
>
> URL: http://llvm.org/viewvc/llvm-project?rev=261193&view=rev
> Log:
> [compiler-rt] Return correct size of struct pthread for glibc-2.12.2
>
> There seems to be a difference between 2.12.1 and 2.12.2 in 64-bit build.
> Tested on Scientific Linux 6.6, based on RHEL.
>
> Differential Revision: http://reviews.llvm.org/D17190
>
> Modified:
>     compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
>
> Modified: compiler-
> rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
> URL: http://llvm.org/viewvc/llvm-project/compiler-
> rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc?rev=261193&r1=2
> 61192&r2=261193&view=diff
> ==========================================================
> ====================
> --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
> (original)
> +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc Thu
> Feb 18 01:08:26 2016
> @@ -222,6 +222,11 @@ uptr ThreadDescriptorSize() {
>      char *end;
>      int minor = internal_simple_strtoll(buf + 8, &end, 10);
>      if (end != buf + 8 && (*end == '\0' || *end == '.')) {
> +      int patch = 0;
> +      if (*end == '.')
> +        // strtoll will return 0 if no valid conversion could be performed
> +        patch = internal_simple_strtoll(end + 1, nullptr, 10);
> +
>        /* sizeof(struct pthread) values from various glibc versions.  */
>        if (SANITIZER_X32)
>          val = 1728;  // Assume only one particular version for x32.
> @@ -235,9 +240,9 @@ uptr ThreadDescriptorSize() {
>          val = FIRST_32_SECOND_64(1136, 1712);
>        else if (minor == 10)
>          val = FIRST_32_SECOND_64(1168, 1776);
> -      else if (minor <= 12)
> +      else if (minor == 11 || (minor == 12 && patch == 1))
>          val = FIRST_32_SECOND_64(1168, 2288);
> -      else if (minor == 13)
> +      else if (minor <= 13)
>          val = FIRST_32_SECOND_64(1168, 2304);
>        else
>          val = FIRST_32_SECOND_64(1216, 2304);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160218/9ecb872c/attachment.bin>


More information about the llvm-commits mailing list