This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: libsanitizer merge from upstream r196090
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "H.J. Lu" <hjl dot tools at gmail dot com>, Dodji Seketeli <dodji at redhat dot com>, Marek Polacek <polacek at redhat dot com>, Dmitry Vyukov <dvyukov at google dot com>, Evgeniy Stepanov <eugenis at google dot com>, Alexey Samsonov <samsonov at google dot com>
- Date: Tue, 3 Dec 2013 22:49:09 +0100
- Subject: Re: libsanitizer merge from upstream r196090
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4ZrFy-o7GmDh31WRpoxiYwwLpaAY6pOtxCZ9i-+4kfv1A at mail dot gmail dot com> <CAGQ9bdzMRvFOWXmAbRoXAM4otn6JMR8AALspJ1s=hP=jgm7KXQ at mail dot gmail dot com> <CAFULd4Z-HrnYedyH_fcH1knQAD+=4jmC_xOBacgs2-DJhGWD0Q at mail dot gmail dot com> <CAGQ9bdz4Qm8nGJhLPJ9wwP71rUC4CddaReqWsbUqLq-GZSqRTA at mail dot gmail dot com> <20131203114959 dot GW892 at tucnak dot redhat dot com> <CAGQ9bdwvEB7-TGoycetGmMOqs6Xe=uW0bVn8KAWMooaSYe6nUQ at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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