Bug 12166

Summary: Assertion failure in coff_frob_symbol
Product: binutils Reporter: Mikhail Glushenkov <foldr>
Component: gasAssignee: Dave Korn <davek>
Status: RESOLVED FIXED    
Severity: normal CC: asl, davek, nickc
Priority: P2    
Version: 2.21   
Target Milestone: ---   
Host: i686-pc-mingw32 Target: i686-pc-mingw32
Build: i686-pc-mingw32 Last reconfirmed:
Attachments: File that demonstrates the problem
Avoid truncation.

Description Mikhail Glushenkov 2010-10-27 20:49:52 UTC
When run on the attached file, as crashes with the following message:

Assertion failure in coff_frob_symbol at ../../../src/binutils-2.20.1/gas/config/obj-coff.c line 125
5.
Please report this bug. 

The problem is the dot before '1288208123' on this line:

	.weak	_mseed.1288208123

This bug exists in all versions of as I tried (MinGW-current,2.20.1,CVS).

Target: i686-pc-mingw32
Comment 1 Nick Clifton 2010-10-28 14:56:51 UTC
Hi Michail,

  Please could you upload the file that demonstrates this problem.  Sending it as an attachment does not work. :-(

Cheers
  Nick Clifton
Comment 2 Mikhail Glushenkov 2010-10-28 15:02:54 UTC
Created attachment 5097 [details]
File that demonstrates the problem
Comment 3 Mikhail Glushenkov 2010-10-28 15:06:48 UTC
Sorry, I thought that I've already done that.
Comment 4 Dave Korn 2010-10-29 12:29:33 UTC
Created attachment 5100 [details]
Avoid truncation.

Assuming that the frob_symbol hook can't be called twice on the same symbol, which it looks like to me, then weak_altname2name is just being paranoid in thinking that the symbol might have already been uniquified, and weak_uniquify itself doesn't need to take any care to avoid re-uniquifying a name.
Comment 5 Dave Korn 2010-10-29 12:44:38 UTC
Mikhail, I guess that you ran into this problem while you were building a larger project of some sort?  Could you test the suggested patch on top of current CVS and verify that it gets you to the end of your build without any odd side-effects showing up?
Comment 6 Mikhail Glushenkov 2010-10-29 15:24:39 UTC
I tried your patch, and it works for me. Thanks!
Comment 7 Dave Korn 2010-10-30 16:59:54 UTC
I'm just going to run a gcc bootstrap-and-test cycle using binutils built with this patch and make sure nothing bad shows up before I check it in.
Comment 8 Dave Korn 2010-11-05 05:01:19 UTC
Committed.