Bug 760 - ar (version 050223 20050223) segfaults at line 4422
Summary: ar (version 050223 20050223) segfaults at line 4422
Status: RESOLVED WONTFIX
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.15
: P2 critical
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-23 21:51 UTC by Eric Dana
Modified: 2006-03-28 04:51 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build: powerpc-ibm-aix5.1.0.0
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Dana 2005-02-23 21:51:10 UTC
GCC 3.4.3 was used to build binutils and the object files below.
This problem is reproducable in binutils 040922.

When performing the following command, ar crashes at line 4422:
	/bmc/moe/bin/ar cqs ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/librpg.a ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/VisKey.o ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/vis_NodeKey.o ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/vis_NodeKey_gen.o ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/an_rids.o ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/db_an_rids.o ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/rpg_cr.o ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/rpg_data.o ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/rpg_ps.o ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/rpg_ex.o ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/rpg_out.o ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/rpg_read.o ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/rpg_vis.o ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/rpg_planvis.o ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/rpg_vis_util.o ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/rpgen.o ../../../../obj/ibm/powerpc-
aix5.1.0.0/gapLib/lib/rpgen/rpg/rpgenf.o
/bin/sh: 1081542 Memory fault(coredump)
*** Error code 139 (ignored)
A core file is generated.

The stack trace is:
Program terminated with signal 11, Segmentation fault.
#0  coff_slurp_symbol_table (abfd=0x20011968)
    at /depot/gnu/binutils-050223/bfd/coffcode.h:4422
4422                  sym->lineno = cache_ptr;
(gdb) where
#0  coff_slurp_symbol_table (abfd=0x20011968)
    at /depot/gnu/binutils-050223/bfd/coffcode.h:4422
#1  0x1000af70 in coff_get_symtab_upper_bound (abfd=0x20011968)
    at /depot/gnu/binutils-050223/bfd/coffgen.c:359
#2  0x1002a100 in _bfd_compute_and_write_armap (arch=0x200476d8, elength=0)
    at /depot/gnu/binutils-050223/bfd/archive.c:1800
#3  0x10020058 in _bfd_xcoff_write_archive_contents (abfd=0x200476d8)
    at /depot/gnu/binutils-050223/bfd/coff-rs6000.c:2546
#4  0x100148ec in bfd_close (abfd=0x200476d8)
    at /depot/gnu/binutils-050223/bfd/opncls.c:589
#5  0x10001490 in write_archive (iarch=0x2000b738)
    at /depot/gnu/binutils-050223/binutils/ar.c:950
#6  0x100021b8 in main (argc=537146612, argv=0x2ff221c0)
    at /depot/gnu/binutils-050223/binutils/ar.c:1189

I will check to see if this happens on AIX 5.2 and 5.3.
The object files were built with g++ -g -O2.
I have the object files for debugging if you need them.
Comment 1 Nick Clifton 2005-02-28 15:39:42 UTC
Subject: Re:  New: ar (version 050223 20050223) segfaults
 at	line 4422

Hi Eric,

> GCC 3.4.3 was used to build binutils and the object files below.
> This problem is reproducable in binutils 040922.

Does the bug happen if you use the current mainline sources from the 
binutils CVS repository ?

> I will check to see if this happens on AIX 5.2 and 5.3.

Does it ?

> The object files were built with g++ -g -O2.
> I have the object files for debugging if you need them.

Well really we would prefer a small self contained test case, but if you 
cannot manage that then if you could put the files up for ftp/http 
somewhere that would be helpful.

Cheers
   Nick


Comment 2 Ben Elliston 2006-03-28 00:59:53 UTC
Eric, did you resolve this bug?
Comment 3 Ben Elliston 2006-03-28 04:51:22 UTC
Reporter never responded after more than a year.