minefield win32 nightlies have checksum==0 in the PE header so windbg warns when fetching symbols

RESOLVED FIXED in mozilla23

Status

defect
--
minor
RESOLVED FIXED
12 years ago
2 years ago

People

(Reporter: mnemo, Assigned: ted)

Tracking

Trunk
mozilla23
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9pre) Gecko/2008042705 Minefield/3.0pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9pre) Gecko/2008042705 Minefield/3.0pre

Run "dumpbin.exe /headers firefox.exe | grep checksum" (dumpbin ships with visual C++ in visual studio, but you can use any PE dumping tool) on a minefield win32 nightly and you'll see "0 checksum". This means that if you list modules with symbol problems in windbg (use windbg command "lm e") you'll see the firefox module listed:

0:003> lm e
start    end        module name
00400000 00417000   firefox  C (private pdb symbols)  G:\symbols_cache\firefox.pdb\8ACD8EF1DE6140CDA4FF5E4C585358A32\firefox.pdb
71710000 71794000   COMCTL32   (export symbols)       G:\symbols_cache\comctl32.dbg\44EF137484000\comctl32.dbg

Also, note that the firefox module is marked with the "C" flag here indicating that the checksum information for this module is missing. Since windbg has pretty good heuristics it finds the symbols anyway but I bet some other tools need to have it available.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
We're not doing anything unusual, AFAIK, so if you have any ideas why this happens I'm all ears.
Component: General → Build Config
Product: Firefox → Core
QA Contact: general → build-config
Version: unspecified → Trunk
What is this checksum checksumming? Is it the contents of the PDB file, or the contents of the PE image itself, or something else?
It's a checksum of the binary, I believe:
http://msdn.microsoft.com/en-us/library/ms680339%28v=VS.85%29.aspx
http://www.woodmann.com/collaborative/tools/index.php/CheckSum_Fixer
http://www.codeproject.com/KB/cpp/PEChecksum.aspx

Seems kind of lame that we're using Microsoft's compiler and it doesn't bother to fill in this field.
Apparently you're supposed to pass the /RELEASE option to the linker to get this filled out:
http://msdn.microsoft.com/en-us/library/vstudio/h8ksa72a.aspx
This works. I don't think the checksum actually does anything useful, but it stops WinDBG from complaining about it. This doesn't fix NSPR/NSS, but it fixes everything else.
Attachment #742489 - Flags: review?(mh+mozilla)
Assignee: nobody → ted
Attachment #742489 - Flags: review?(mh+mozilla) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/680afe05ac35
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
https://hg.mozilla.org/mozilla-central/rev/680afe05ac35
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
This also disables incremental linking, which is not great!  I filed bug 906119 about that.
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.