<div dir="ltr">I once spent a couple hours trying to track down this change in glibc sources, but no dice. It must have happened in some deeply nested struct.<div><br></div><div>To find out which one, I think we could try building debug versions of  glibc 2.13 and 2.18 and inspecting both versions of struct pthread with GDB.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Aug 18, 2013 at 2:04 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@gmail.com" target="_blank">chandlerc@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: chandlerc<br>
Date: Sun Aug 18 05:04:51 2013<br>
New Revision: 188635<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=188635&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=188635&view=rev</a><br>
Log:<br>
It appears that glibc 2.13 has the same thread descriptor size as 2.11,<br>
bump up the inflection point to 2.14. If someone can tell me how to<br>
actually figure out value for this, that would be awesome.<br>
<br>
Anyways, this takes me to one ASan failure, one LSan failure, and three<br>
TSan failures for 'check-all' on Linux.<br>
<br>
Modified:<br>
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc<br>
<br>
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc?rev=188635&r1=188634&r2=188635&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc?rev=188635&r1=188634&r2=188635&view=diff</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc (original)<br>
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc Sun Aug 18 05:04:51 2013<br>
@@ -196,9 +196,9 @@ uptr GetTlsSize() {<br>
<br>
 #if defined(__x86_64__) || defined(__i386__)<br>
 // sizeof(struct thread) from glibc.<br>
-// There has been a report of this being different on glibc 2.11. We don't know<br>
-// when this change happened, so 2.12 is a conservative estimate.<br>
-#if __GLIBC_PREREQ(2, 12)<br>
+// There has been a report of this being different on glibc 2.11 and 2.13. We<br>
+// don't know when this change happened, so 2.14 is a conservative estimate.<br>
+#if __GLIBC_PREREQ(2, 14)<br>
 const uptr kThreadDescriptorSize = FIRST_32_SECOND_64(1216, 2304);<br>
 #else<br>
 const uptr kThreadDescriptorSize = FIRST_32_SECOND_64(1168, 2304);<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>