Bug 12166 - Assertion failure in coff_frob_symbol
Summary: Assertion failure in coff_frob_symbol
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.21
: P2 normal
Target Milestone: ---
Assignee: Dave Korn
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-27 20:49 UTC by Mikhail Glushenkov
Modified: 2010-11-05 05:01 UTC (History)
3 users (show)

See Also:
Host: i686-pc-mingw32
Target: i686-pc-mingw32
Build: i686-pc-mingw32
Last reconfirmed:


Attachments
File that demonstrates the problem (229 bytes, text/plain)
2010-10-28 15:02 UTC, Mikhail Glushenkov
Details
Avoid truncation. (437 bytes, patch)
2010-10-29 12:29 UTC, Dave Korn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.