Closed
Bug 661800
Opened 14 years ago
Closed 14 years ago
elfhack/elf.cpp:285: Elf::Elf(std::ifstream&): Assertion `segment->getFileSize() == phdr.p_filesz' failed.
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla7
People
(Reporter: octoploid, Assigned: glandium)
References
(Depends on 1 open bug)
Details
Attachments
(5 files)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0a1) Gecko/20100101 Firefox/7.0a1
Build Identifier:
I've hit the following assertion in elfhack:
===
=== If you get failures below, please file a bug describing the error
=== and your environment (compiler and linker versions), and use
=== --disable-elf-hack until this is fixed.
===
cd ../../dist/bin; find . -name "*.so" | xargs ../../build/unix/elfhack/elfhack
./libnspr4.so: Already elfhacked. Skipping
./libplds4.so: No gain. Skipping
./libplc4.so: No gain. Skipping
./libmozsqlite3.so: Reduced by 8032 bytes
./libnssdbm3.so: No gain. Skipping
./libsmime3.so: No gain. Skipping
./libxpcom.so: No gain. Skipping
./libmozalloc.so: No gain. Skipping
./components/libmozgnome.so: No gain. Skipping
./components/libdbusservice.so: No gain. Skipping
./components/libnkgnomevfs.so: No gain. Skipping
./components/libbrowsercomps.so: Reduced by 12128 bytes
./libnssckbi.so: Already elfhacked. Skipping
./libsoftokn3.so: Already elfhacked. Skipping
./libnss3.so: Already elfhacked. Skipping
./libnssutil3.so: Already elfhacked. Skipping
./libssl3.so: Already elfhacked. Skipping
./libfreebl3.so: Already elfhacked. Skipping
elfhack: /var/tmp/mozilla-central/build/unix/elfhack/elf.cpp:285: Elf::Elf(std::ifstream&): Assertion `segment->getFileSize() == phdr.p_filesz' failed.
xargs: ../../build/unix/elfhack/elfhack: terminated by signal 6
make[3]: *** [elfhack] Error 125
This only happens with the latest gcc-4.7.0 during a profiledbuild.
A normal build works without problems.
Reproducible: Always
Assignee | ||
Comment 1•14 years ago
|
||
could you attach the file on which elfhack fails? (I guess it is libxul.so)
Both libnspr4.so and libxul.so trigger the same assertion.
I've attached libnspr4.so, because it's smaller.
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → mh+mozilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
In case someone is wondering about the "Already elfhacked" messages
above. They appear because I forgot to delete the build directory (
that contained a conventional build) before starting the profiledbuild.
Assignee | ||
Comment 4•14 years ago
|
||
The problem is that elfhack believes the .dynamic section is in the TLS segment. What's weird is that I'd expect that to be caught by the test case. Could you attach $objdir/build/unix/elfhack/test.so as well?
Assignee | ||
Comment 7•14 years ago
|
||
Attachment #537290 -
Flags: review?(tglek)
Comment 9•14 years ago
|
||
Comment on attachment 537290 [details] [diff] [review]
Avoid elfhack considering non SHF_TLS sections as part of PT_TLS segment
rubberstamp
Attachment #537290 -
Flags: review?(tglek) → review+
Assignee | ||
Comment 10•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
Assignee | ||
Comment 11•14 years ago
|
||
Backed out because of bug 664362
http://hg.mozilla.org/mozilla-central/rev/f6f801cfdf4c
Assignee | ||
Comment 12•14 years ago
|
||
Alternatively, landing with a clobber forcing thingy would work as well.
Depends on: 660015
Assignee | ||
Updated•14 years ago
|
Target Milestone: mozilla7 → ---
Assignee | ||
Updated•14 years ago
|
Assignee | ||
Comment 13•14 years ago
|
||
In the end, it's much simpler to do it locally.
Assignee | ||
Updated•14 years ago
|
Attachment #539454 -
Flags: review?(ted.mielczarek)
Comment 14•14 years ago
|
||
Comment on attachment 539454 [details] [diff] [review]
part 0 - Add a dependency of host_elf*.o upon elfxx.h, to circumvent bug 664362.
Review of attachment 539454 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #539454 -
Flags: review?(ted.mielczarek) → review+
Assignee | ||
Comment 15•14 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/0640c9ecfba2
http://hg.mozilla.org/integration/mozilla-inbound/rev/6e3813929a57
Whiteboard: [inbound]
Assignee | ||
Comment 16•14 years ago
|
||
Merged in m-c
http://hg.mozilla.org/mozilla-central/rev/0640c9ecfba2
http://hg.mozilla.org/mozilla-central/rev/6e3813929a57
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
Updated•14 years ago
|
Whiteboard: [inbound]
Comment 17•14 years ago
|
||
After this got merged to m-c, tip doesn't build for me:
=== If you get failures below, please file a bug describing the error
=== and your environment (compiler and linker versions), and use
=== --disable-elf-hack until this is fixed.
===
/home/tim/workspace/mozilla-central/objdir-ff-release/build/unix/elfhack/elfhack -b test.so
test.so: terminate called after throwing an instance of 'std::runtime_error'
what(): PT_GNU_RELRO segment doesn't start on a section start
I guess this is related?
Comment 18•14 years ago
|
||
(In reply to comment #17)
> After this got merged to m-c, tip doesn't build for me:
>
The tip does not (clobber) build for me either (5a46d17c72ca - 64bit linux)
===
=== If you get failures below, please file a bug describing the error
=== and your environment (compiler and linker versions), and use
=== --disable-elf-hack until this is fixed.
===
/home/mcmanus/src/mozilla2/wd/obj-debug-661036/build/unix/elfhack/elfhack -b test.so
test.so: terminate called after throwing an instance of 'std::runtime_error'
what(): PT_GNU_RELRO segment doesn't start on a section start
Assignee | ||
Comment 19•14 years ago
|
||
this is bug 664366, and the most likely relationship between this and that bug is that the test case change triggers the ld bug.
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•