Bug 15067 - LD from Binutils 2.23.1 crashes when building GDB 7.5.1
Summary: LD from Binutils 2.23.1 crashes when building GDB 7.5.1
Status: RESOLVED OBSOLETE
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.23
: P2 critical
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-26 05:33 UTC by Wolf
Modified: 2022-07-22 01:04 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolf 2013-01-26 05:33:55 UTC
Using a cross toolchain targeting x86_64-w64-mingw32, I am building a native GDB. The following crash only occurs when --with-zlib=yes is passed to GDB's configure line.

checking whether snprintf is declared... yes
checking whether vsnprintf is declared... yes
checking for library containing zlibVersion... *** Error in `/root/win64-build/cross/lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld': free(): invalid pointer: 0x000000000441ee78 ***
======= Backtrace: =========
/usr/lib/libc.so.6(+0x7ab06)[0x31243789b06]
/usr/lib/libc.so.6(+0x7b883)[0x3124378a883]
/root/win64-build/cross/lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld[0x4391a5]
/root/win64-build/cross/lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld[0x454e47]
/root/win64-build/cross/lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld[0x441a57]
/root/win64-build/cross/lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld[0x4108fd]
/root/win64-build/cross/lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld[0x411563]
/root/win64-build/cross/lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld[0x41372a]
/root/win64-build/cross/lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld[0x4033c7]
/usr/lib/libc.so.6(__libc_start_main+0xf5)[0x31243730a15]
/root/win64-build/cross/lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld[0x403895]
======= Memory map: ========
00400000-00520000 r-xp 00000000 08:05 1055263                            /root/win64-build/cross/x86_64-w64-mingw32/bin/ld
00720000-00726000 rw-p 00120000 08:05 1055263                            /root/win64-build/cross/x86_64-w64-mingw32/bin/ld
00726000-0072b000 rw-p 00000000 00:00 0 
0072b000-043d8000 ---p 00000000 00:00 0 
043d8000-04435000 rw-p 00000000 00:00 0                                  [heap]
312434fa000-3124350f000 r-xp 00000000 08:05 2627738                      /usr/lib/libgcc_s.so.1
3124350f000-3124370e000 ---p 00015000 08:05 2627738                      /usr/lib/libgcc_s.so.1
3124370e000-3124370f000 rw-p 00014000 08:05 2627738                      /usr/lib/libgcc_s.so.1
3124370f000-312438b3000 r-xp 00000000 08:05 2624672                      /usr/lib/libc-2.17.so
312438b3000-31243ab2000 ---p 001a4000 08:05 2624672                      /usr/lib/libc-2.17.so
31243ab2000-31243ab6000 r--p 001a3000 08:05 2624672                      /usr/lib/libc-2.17.so
31243ab6000-31243ab8000 rw-p 001a7000 08:05 2624672                      /usr/lib/libc-2.17.so
31243ab8000-31243abc000 rw-p 00000000 00:00 0 
31243abc000-31243abf000 r-xp 00000000 08:05 2624696                      /usr/lib/libdl-2.17.so
31243abf000-31243cbe000 ---p 00003000 08:05 2624696                      /usr/lib/libdl-2.17.so
31243cbe000-31243cbf000 r--p 00002000 08:05 2624696                      /usr/lib/libdl-2.17.so
31243cbf000-31243cc0000 rw-p 00003000 08:05 2624696                      /usr/lib/libdl-2.17.so
31243cc0000-31243cd5000 r-xp 00000000 08:05 2627786                      /usr/lib/libz.so.1.2.7
31243cd5000-31243ed4000 ---p 00015000 08:05 2627786                      /usr/lib/libz.so.1.2.7
31243ed4000-31243ed5000 r--p 00014000 08:05 2627786                      /usr/lib/libz.so.1.2.7
31243ed5000-31243ed6000 rw-p 00015000 08:05 2627786                      /usr/lib/libz.so.1.2.7
31243ed6000-31243ef7000 r-xp 00000000 08:05 2624679                      /usr/lib/ld-2.17.so
312440dd000-312440e1000 rw-p 00000000 00:00 0 
312440f1000-312440f6000 rw-p 00000000 00:00 0 
312440f6000-312440f7000 r-xp 00000000 00:00 0                            [vdso]
312440f7000-312440f8000 r--p 00021000 08:05 2624679                      /usr/lib/ld-2.17.so
312440f8000-312440f9000 rw-p 00022000 08:05 2624679                      /usr/lib/ld-2.17.so
312440f9000-312440fa000 rw-p 00000000 00:00 0 
3875dd60000-3875dd84000 rw-p 00000000 00:00 0                            [stack]
ffffffffff600000-ffffffffff601000 r--p 00000000 00:00 0                  [vsyscall]
no
configure: error: zlib (libz) library was explicitly requested but not found
make[1]: *** [configure-bfd] Error 1
make[1]: Leaving directory `/root/win64-build/src/gdb-7.5.1'
make: *** [all] Error 2
Comment 1 Alan Modra 2022-07-22 01:04:36 UTC
Likely already fixed