On Tue, Dec 03, 2013 at 07:18:14PM +0400, Konstantin Serebryany wrote: > > ==2738==AddressSanitizer CHECK failed: > > ../../../../libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:260 > > "((*tls_addr + *tls_size)) <= ((*stk_addr + *stk_size))" (0x2af8df1bc240, > > 0x2af8df1bc000) > > which clearly is a bug in sanitizer_common, > > > > #if defined(__x86_64__) || defined(__i386__) > > // sizeof(struct thread) from glibc. > > // There has been a report of this being different on glibc 2.11 and 2.13. > > We > > // don't know when this change happened, so 2.14 is a conservative estimate. > > #if __GLIBC_PREREQ(2, 14) > > const uptr kThreadDescriptorSize = FIRST_32_SECOND_64(1216, 2304); > > #else > > const uptr kThreadDescriptorSize = FIRST_32_SECOND_64(1168, 2304); > > #endif
BTW, just to fill in some of the missing data from a couple of glibcs: glibc 2.3.6 FIRST_32_SECOND_64(1104, 1696) glibc 2.4 FIRST_32_SECOND_64(1120, 1728) glibc 2.5 FIRST_32_SECOND_64(1136, 1728) glibc 2.6, 2.7, 2.8, 2.9 FIRST_32_SECOND_64(1136, 1712) glibc 2.10.1 FIRST_32_SECOND_64(1168, 1776) glibc 2.11.1, 2.12 FIRST_32_SECOND_64(1168, 2288) glibc 2.13, 2.14.1, 2.15, 2.17 FIRST_32_SECOND_64(1216, 2304) script to extract the data was: mkdir /tmp/aa; cd /tmp/aa; for i in /tmp/glibc-2.*; do echo $i; rm -rf /tmp/aa/*; rpm2cpio $i | cpio -id; readelf -Ws lib*/libpthread-2.*.so | grep '_thread_db_sizeof_pthread$' | awk '{print $2}'; j=`readelf -Ws lib*/libpthread-2.*.so | grep '_thread_db_sizeof_pthread$' | awk '{print $2}' | sed 's/[48c]$/0/;s/^00*//'`; objdump -s -j .rodata lib*/libpthread-2.*.so | grep $j; done So, as the data shows the numbers aren't even always monotonically increasing. Jakub