Bug 12779 - *** glibc detected *** /usr/bin/ld: free(): invalid size: 0x0ea8ac18 ***
Summary: *** glibc detected *** /usr/bin/ld: free(): invalid size: 0x0ea8ac18 ***
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.21
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-18 15:43 UTC by Orion Poplawski
Modified: 2011-05-19 15:34 UTC (History)
1 user (show)

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 Orion Poplawski 2011-05-18 15:43:45 UTC
While trying to build GDL on Fedora Rawhide 32-bit (64-bit works fine):

libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/i686-redhat-linux/4.6.0/../../../crti.o /usr/lib/gcc/i686-redhat-linux/4.6.0/crtbeginS.o  .libs/assocdata.o .libs/basic_fun_cl.o .libs/basic_fun.o .libs/basic_fun_jmg.o .libs/basic_op.o .libs/basic_pro.o .libs/basic_pro_jmg.o .libs/CFMTLexer.o .libs/color.o .libs/convert2.o .libs/datatypes.o .libs/dcommon.o .libs/dcompiler.o .libs/default_io.o .libs/dinterpreter.o .libs/dnode.o .libs/dpro.o .libs/dstructdesc.o .libs/dstructgdl.o .libs/dvar.o .libs/envt.o .libs/extrat.o .libs/FMTIn.o .libs/FMTLexer.o .libs/fmtnode.o .libs/FMTOut.o .libs/FMTParser.o .libs/gdleventhandler.o .libs/gdlexception.o .libs/gdlgstream.o .libs/GDLInterpreter.o .libs/GDLLexer.o .libs/GDLParser.o .libs/gdlpsstream.o .libs/gdlsvgstream.o .libs/gdlpython.o .libs/GDLTreeParser.o .libs/gdlwinstream.o .libs/gdlxstream.o .libs/getfmtast.o .libs/graphics.o .libs/gsl_fun.o .libs/ifmt.o .libs/initct.o .libs/initsysvar.o .libs/io.o .libs/libinit_cl.o .libs/libinit.o .libs/libinit_jmg.o .libs/math_fun.o .libs/math_fun_jmg.o .libs/math_utl.o .libs/ncdf_att_cl.o .libs/ncdf_cl.o .libs/ncdf_dim_cl.o .libs/ncdf_var_cl.o .libs/new.o .libs/objects.o .libs/ofmt.o .libs/math_fun_ac.o .libs/libinit_ac.o .libs/math_fun_gm.o .libs/libinit_gm.o .libs/math_fun_ng.o .libs/libinit_ng.o .libs/plotting.o .libs/print.o .libs/print_tree.o .libs/read.o .libs/str.o .libs/terminfo.o .libs/topython.o .libs/typetraits.o .libs/hdf_fun.o .libs/hdf_pro.o .libs/magick_cl.o .libs/gdlwidget.o .libs/widget.o .libs/basegdl.o .libs/hdf5_fun.o .libs/libinit_mes.o .libs/file.o .libs/image.o .libs/gdljournal.o .libs/convol.o .libs/convol_inc0.o .libs/convol_inc1.o .libs/convol_inc2.o .libs/sigfpehandler.o .libs/gdlzstream.o .libs/arrayindex.o .libs/fftw.o .libs/mpi.o .libs/plot3d_nr.o .libs/grib.o .libs/prognode.o .libs/prognodeexpr.o .libs/datatypesref.o .libs/lapack.o .libs/gshhs.o .libs/newprognode.o .libs/pythongdl.o   -lantlr -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 -lncurses -L/usr/lib/hdf -ldl -lreadline -lgsl -lgslcblas -lplplotd -lplplotcxxd -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 -lMagick++ -lMagickCore -lnetcdf /usr/lib/hdf/libmfhdf.a /usr/lib/hdf/libdf.a -ljpeg -lz -L/usr/lib/hdf5 -lhdf5 -lfftw3 -lfftw3f -lpython2.7 -ludunits2 -lgrib_api -ljasper -L/usr/lib/gcc/i686-redhat-linux/4.6.0 -L/usr/lib/gcc/i686-redhat-linux/4.6.0/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i686-redhat-linux/4.6.0/crtendS.o /usr/lib/gcc/i686-redhat-linux/4.6.0/../../../crtn.o  -O2 -m32 -march=i686 -mtune=atom -Wl,-z -Wl,muldefs -pthread   -pthread -Wl,-soname -Wl,libgdl.so.0 -o .libs/libgdl.so.0.0.0
collect2: ld terminated with signal 6 [Aborted], core dumped
*** glibc detected *** /usr/bin/ld: free(): invalid size: 0x0ea8ac18 ***
======= Backtrace: =========
/lib/libc.so.6(+0x73055)[0x556f9055]
/usr/lib/libbfd-2.21.51.0.9-1.fc16.so(objalloc_free+0x2c)[0x55636ecc]
/usr/lib/libbfd-2.21.51.0.9-1.fc16.so(_bfd_delete_bfd+0x3e)[0x555a89de]
/usr/lib/libbfd-2.21.51.0.9-1.fc16.so(bfd_close+0x98)[0x555a8e18]
/usr/bin/ld[0x804be8c]
/lib/libc.so.6(__libc_start_main+0xf3)[0x5569f513]
/usr/bin/ld[0x804c2dd]
======= Memory map: ========
08048000-080fe000 r-xp 00000000 fc:02 1448411                            /usr/bin/ld.bfd
080fe000-080ff000 rw-p 000b6000 fc:02 1448411                            /usr/bin/ld.bfd
080ff000-08100000 rw-p 00000000 00:00 0 
09643000-0ef1a000 rw-p 00000000 00:00 0                                  [heap]
55555000-55575000 r-xp 00000000 fc:02 1447487                            /lib/ld-2.13.90.so
55575000-55576000 r--p 0001f000 fc:02 1447487                            /lib/ld-2.13.90.so
55576000-55577000 rw-p 00020000 fc:02 1447487                            /lib/ld-2.13.90.so
55577000-55578000 r-xp 00000000 00:00 0                                  [vdso]
55578000-5557b000 rw-p 00000000 00:00 0 
5557c000-55582000 rw-p 00000000 00:00 0 
55582000-5565c000 r-xp 00000000 fc:02 1448420                            /usr/lib/libbfd-2.21.51.0.9-1.fc16.so
5565c000-55667000 rw-p 000da000 fc:02 1448420                            /usr/lib/libbfd-2.21.51.0.9-1.fc16.so
55667000-5566b000 rw-p 00000000 00:00 0 
5566b000-55680000 r-xp 00000000 fc:02 1447554                            /lib/libz.so.1.2.5
55680000-55681000 rw-p 00014000 fc:02 1447554                            /lib/libz.so.1.2.5
55681000-55684000 r-xp 00000000 fc:02 1447500                            /lib/libdl-2.13.90.so
55684000-55685000 r--p 00002000 fc:02 1447500                            /lib/libdl-2.13.90.so
55685000-55686000 rw-p 00003000 fc:02 1447500                            /lib/libdl-2.13.90.so
55686000-5580f000 r-xp 00000000 fc:02 1447494                            /lib/libc-2.13.90.so
5580f000-55810000 ---p 00189000 fc:02 1447494                            /lib/libc-2.13.90.so
55810000-55812000 r--p 00189000 fc:02 1447494                            /lib/libc-2.13.90.so
55812000-55813000 rw-p 0018b000 fc:02 1447494                            /lib/libc-2.13.90.so
55813000-55817000 rw-p 00000000 00:00 0 
55817000-55833000 r-xp 00000000 fc:02 1447379                            /lib/libgcc_s-4.6.0-20110428.so.1
55833000-55834000 rw-p 0001b000 fc:02 1447379                            /lib/libgcc_s-4.6.0-20110428.so.1
55834000-578b5000 rw-p 00000000 00:00 0 
57905000-59ec4000 rw-p 00000000 00:00 0 
ffe97000-ffeb9000 rw-p 00000000 00:00 0                                  [stack]

binutils                 i686     2.21.51.0.9-1.fc16
Comment 1 H.J. Lu 2011-05-18 21:05:41 UTC
If you can provide ALLL linker inputs, I will take a look.
Comment 2 Orion Poplawski 2011-05-18 21:09:02 UTC
Is there a tool that would help in collecting all of them?
Comment 3 Orion Poplawski 2011-05-18 21:19:03 UTC
Well, it's rather large (142M), but:

http://sw.cora.nwra.com/tmp/ld.tar.gz

Should have everything. Build was being done in builddir/build/BUILD/gdl-0.9.1/build-python/src, and the .libs directory in there is the one referenced.  /usr/lib is also included.
Comment 4 H.J. Lu 2011-05-18 21:39:45 UTC
(In reply to comment #3)
> Well, it's rather large (142M), but:
> 
> http://sw.cora.nwra.com/tmp/ld.tar.gz
> 
> Should have everything. Build was being done in
> builddir/build/BUILD/gdl-0.9.1/build-python/src, and the .libs directory in
> there is the one referenced.  /usr/lib is also included.

Please show me the output of "g++ -v .......".
Comment 5 Orion Poplawski 2011-05-18 21:44:24 UTC
Using built-in specs.
COLLECT_GCC=/usr/bin/g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.6.0/lto-wrapper
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.6.0 20110428 (Red Hat 4.6.0-6) (GCC) 
COMPILER_PATH=/usr/libexec/gcc/i686-redhat-linux/4.6.0/:/usr/libexec/gcc/i686-redhat-linux/4.6.0/:/usr/libexec/gcc/i686-redhat-linux/:/usr/lib/gcc/i686-redhat-linux/4.6.0/:/usr/lib/gcc/i686-redhat-linux/
LIBRARY_PATH=/usr/lib/gcc/i686-redhat-linux/4.6.0/:/usr/lib/gcc/i686-redhat-linux/4.6.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-fPIC' '-D' 'PIC' '-shared' '-nostdlib' '-L/usr/X11R6/lib64' '-L/usr/X11R6/lib' '-L/usr/lib/hdf' '-L/usr/lib/hdf5' '-L/usr/lib/gcc/i686-redhat-linux/4.6.0' '-L/usr/lib/gcc/i686-redhat-linux/4.6.0/../../..' '-O2' '-m32' '-march=i686' '-mtune=atom' '-pthread' '-pthread' '-o' '.libs/libgdl.so.0.0.0' '-shared-libgcc'
 /usr/libexec/gcc/i686-redhat-linux/4.6.0/collect2 --build-id --no-add-needed --eh-frame-hdr -m elf_i386 --hash-style=gnu -shared -o .libs/libgdl.so.0.0.0 -L/usr/X11R6/lib64 -L/usr/X11R6/lib -L/usr/lib/hdf -L/usr/lib/hdf5 -L/usr/lib/gcc/i686-redhat-linux/4.6.0 -L/usr/lib/gcc/i686-redhat-linux/4.6.0/../../.. -L/usr/lib/gcc/i686-redhat-linux/4.6.0 -L/usr/lib/gcc/i686-redhat-linux/4.6.0/../../.. /usr/lib/gcc/i686-redhat-linux/4.6.0/../../../crti.o /usr/lib/gcc/i686-redhat-linux/4.6.0/crtbeginS.o .libs/assocdata.o .libs/basic_fun_cl.o .libs/basic_fun.o .libs/basic_fun_jmg.o .libs/basic_op.o .libs/basic_pro.o .libs/basic_pro_jmg.o .libs/CFMTLexer.o .libs/color.o .libs/convert2.o .libs/datatypes.o .libs/dcommon.o .libs/dcompiler.o .libs/default_io.o .libs/dinterpreter.o .libs/dnode.o .libs/dpro.o .libs/dstructdesc.o .libs/dstructgdl.o .libs/dvar.o .libs/envt.o .libs/extrat.o .libs/FMTIn.o .libs/FMTLexer.o .libs/fmtnode.o .libs/FMTOut.o .libs/FMTParser.o .libs/gdleventhandler.o .libs/gdlexception.o .libs/gdlgstream.o .libs/GDLInterpreter.o .libs/GDLLexer.o .libs/GDLParser.o .libs/gdlpsstream.o .libs/gdlsvgstream.o .libs/gdlpython.o .libs/GDLTreeParser.o .libs/gdlwinstream.o .libs/gdlxstream.o .libs/getfmtast.o .libs/graphics.o .libs/gsl_fun.o .libs/ifmt.o .libs/initct.o .libs/initsysvar.o .libs/io.o .libs/libinit_cl.o .libs/libinit.o .libs/libinit_jmg.o .libs/math_fun.o .libs/math_fun_jmg.o .libs/math_utl.o .libs/ncdf_att_cl.o .libs/ncdf_cl.o .libs/ncdf_dim_cl.o .libs/ncdf_var_cl.o .libs/new.o .libs/objects.o .libs/ofmt.o .libs/math_fun_ac.o .libs/libinit_ac.o .libs/math_fun_gm.o .libs/libinit_gm.o .libs/math_fun_ng.o .libs/libinit_ng.o .libs/plotting.o .libs/print.o .libs/print_tree.o .libs/read.o .libs/str.o .libs/terminfo.o .libs/topython.o .libs/typetraits.o .libs/hdf_fun.o .libs/hdf_pro.o .libs/magick_cl.o .libs/gdlwidget.o .libs/widget.o .libs/basegdl.o .libs/hdf5_fun.o .libs/libinit_mes.o .libs/file.o .libs/image.o .libs/gdljournal.o .libs/convol.o .libs/convol_inc0.o .libs/convol_inc1.o .libs/convol_inc2.o .libs/sigfpehandler.o .libs/gdlzstream.o .libs/arrayindex.o .libs/fftw.o .libs/mpi.o .libs/plot3d_nr.o .libs/grib.o .libs/prognode.o .libs/prognodeexpr.o .libs/datatypesref.o .libs/lapack.o .libs/gshhs.o .libs/newprognode.o .libs/pythongdl.o -lantlr -lX11 -lncurses -ldl -lreadline -lgsl -lgslcblas -lplplotd -lplplotcxxd -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 -lMagick++ -lMagickCore -lnetcdf /usr/lib/hdf/libmfhdf.a /usr/lib/hdf/libdf.a -ljpeg -lz -lhdf5 -lfftw3 -lfftw3f -lpython2.7 -ludunits2 -lgrib_api -ljasper -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i686-redhat-linux/4.6.0/crtendS.o /usr/lib/gcc/i686-redhat-linux/4.6.0/../../../crtn.o -z muldefs -soname libgdl.so.0
collect2: ld terminated with signal 6 [Aborted]
*** glibc detected *** /usr/bin/ld: free(): invalid size: 0x0f20ec18 ***
Comment 6 H.J. Lu 2011-05-18 22:07:49 UTC
(In reply to comment #3)
> Well, it's rather large (142M), but:
> 
> http://sw.cora.nwra.com/tmp/ld.tar.gz
> 
> Should have everything. Build was being done in
> builddir/build/BUILD/gdl-0.9.1/build-python/src, and the .libs directory in
> there is the one referenced.  /usr/lib is also included.

I also need /lib/lib*.so.*
Comment 7 Orion Poplawski 2011-05-18 22:11:00 UTC
Ah, yes: http://sw.cora.nwra.com/tmp/ld.lib.tar.gz
Comment 8 H.J. Lu 2011-05-18 22:19:15 UTC
(In reply to comment #7)
> Ah, yes: http://sw.cora.nwra.com/tmp/ld.lib.tar.gz

It is incompleted, missing files like libm-2.13.90.so.
I need /lib/lib*.so*
Comment 9 Orion Poplawski 2011-05-18 22:21:38 UTC
Sorry, rebuilt the archive.
Comment 10 H.J. Lu 2011-05-18 23:22:03 UTC
(In reply to comment #9)
> Sorry, rebuilt the archive.

I can't reproduce it with the Linux binutils 2.21.51.0.9.20110507
from

http://www.kernel.org/pub/linux/devel/binutils/
Comment 11 Orion Poplawski 2011-05-19 15:34:12 UTC
Apparently a glibc bug - fixed with 2.13.90-13 in Fedora Rawhide