This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc-4.8 + tree-loop-distribute-patterns breaks glibc-2.18


Hi,

Thanks for reporting it, I saw it too when building glibc with gcc-trunk.
Carlos O'Donell already reported it could be an issue to glibc at
http://sourceware.org/ml/libc-alpha/2013-02/msg00299.html and I also noted
it causes PTL issues too at http://sourceware.org/ml/libc-alpha/2013-04/msg00124.html

I have proposed a patch http://sourceware.org/ml/libc-alpha/2013-04/msg00196.html
so configure can check if compiler transform loops into libc functions calls, but
Andreas Jaeger and Roland McGrath didn't approve the approach.

Although, the problem persist and I think we need to figure out how to proceed 
before 2.18 release. Based on the loader memset recursion call you observe I do
suggest to use my approach and add '-fno-tree-loop-distribute-patterns' on
rtld-memset.os object.

Any comments?


On 05/20/2013 09:03 AM, Winfried Magerl wrote:
> Hi,
>
> I've tried to compile upcoming glibc-2.18 with gcc-4.8.x and optimized
> with '-O3' and testsuite breaks horrible with SIGSEGV and eating up
> all available memory.
>
> I've tracked it down to the flag 'tree-loop-distribute-patterns' and can
> reproduce the problem with CFLAGS='-g -O2 -ftree-loop-distribute-patterns'
> on my own system and on clean openSUSE 12.3 (x86_64) with gcc-4.8.1-20130519.
>
> System:
> 	AMD FX(tm)-6300 Six-Core Processor (fam: 15, model: 02, stepping: 00)
> 	linux-3.9.3
> 	gcc (GCC) 4.8.1 20130519
> 	binutils-2.23.52.0.2
>
> glibc-repository is from 20130519.
>
> I've done some more checks on the first failing test 'csu/tst-atomic' which
> is the second test in the test-suite:
>
> env GCONV_PATH=/home/winfried/glibc-cvs/winni/iconvdata LC_ALL=C   /home/winfried/glibc-cvs/winni/elf/ld-linux-x86-64.so.2 --library-path /home/winfried/glibc-cvs/winni:/home/winfried/glibc-cvs/winni/math:/home/winfried/glibc-cvs/winni/elf:/home/winfried/glibc-cvs/winni/dlfcn:/home/winfried/glibc-cvs/winni/nss:/home/winfried/glibc-cvs/winni/nis:/home/winfried/glibc-cvs/winni/rt:/home/winfried/glibc-cvs/winni/resolv:/home/winfried/glibc-cvs/winni/crypt:/home/winfried/glibc-cvs/winni/nptl /home/winfried/glibc-cvs/winni/csu/tst-atomic
>
> gdb-output:
> # gdb /home/winfried/glibc-cvs/winni/elf/ld-linux-x86-64.so.2 core
> [.........]
> Reading symbols from /home/winfried/glibc-cvs/winni/elf/ld-linux-x86-64.so.2...done.
> warning: core file may not match specified executable file.
> [New LWP 28667]
> Core was generated by `/home/winfried/glibc-cvs/winni/elf/ld-linux-x86-64.so.2 --library-path /home/wi'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x00007f92a16785c4 in memset (dstpp=0x7fff51ca40c0, c=<optimized out>, len=6) at ../string/memset.c:81
> 81        while (len > 0)
> (gdb) where
> #0  0x00007f92a16785c4 in memset (dstpp=0x7fff51ca40c0, c=<optimized out>, len=6) at ../string/memset.c:81
> #1  0x00007f92a16785c9 in memset (dstpp=0x7fff51ca40c0, c=<optimized out>, len=<optimized out>) at ../string/memset.c:81
> #2  0x00007f92a16785c9 in memset (dstpp=0x7fff51ca40c0, c=<optimized out>, len=<optimized out>) at ../string/memset.c:81
> #3  0x00007f92a16785c9 in memset (dstpp=0x7fff51ca40c0, c=<optimized out>, len=<optimized out>) at ../string/memset.c:81
> [.....]
> #75638 0x00007f92a16785c9 in memset (dstpp=0x7fff51ca40c0, c=<optimized out>, len=<optimized out>) at ../string/memset.c:81
> #75639 0x00007f92a16785c9 in memset (dstpp=0x7fff51ca40c0, c=<optimized out>, len=<optimized out>) at ../string/memset.c:81
> #75640 0x00007f92a16785c9 in memset (dstpp=0x7fff51ca40c0, c=<optimized out>, len=<optimized out>) at ../string/memset.c:81
> [.....]
>
> some more notes:
> 	- no problem with '-O3' and glibc-2.17
> 	- no problem with gcc-4.7.3 and glibc-2.18
> 	- CFLAGS for test-suite doesn't matter
>
> I send this mail to gcc@gcc.gnu.org and libc-alpha@sourceware.org because
> it's not obvious if it's a bug in glibc or in gcc.
> I can help with testing but I'm not realy able to track this problem
> down.
>
> regards
>
> 	winfried
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]