Closed Bug 1388713 Opened 7 years ago Closed 7 years ago

lld - dummy binary with the elfhack segsfaults

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox57 fixed)

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: Sylvestre, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(5 files, 3 obsolete files)

Attached file core (obsolete) —
Thanks to bug 1385783, the hack no longer fails.

This command is segfaulting:
$ LD_PRELOAD=/data/jenkins/workspace/firefox-clang-lld-last/obj-x86_64-pc-linux-gnu/build/unix/elfhack/test-array.so  /data/jenkins/workspace/firefox-clang-lld-last/obj-x86_64-pc-linux-gnu/build/unix/elfhack/dummy
Segmentation fault (core dumped)

core dump as attachment (debian 64b)
Attached file test-array.so (obsolete) —
Attached file dummy (obsolete) —
Comment on attachment 8895586 [details]
Bug 1388713 - Change how elfhack looks for the bss section.

https://reviewboard.mozilla.org/r/166790/#review172456
Attachment #8895586 - Flags: review?(nfroyd) → review+
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/e0417716bac0
Change how elfhack looks for the bss section. r=froydnj
Assignee: nobody → mh+mozilla
https://hg.mozilla.org/mozilla-central/rev/e0417716bac0
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
I am still seeing this issue
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached file core
Attachment #8895338 - Attachment is obsolete: true
Attached file dummy
Attachment #8895340 - Attachment is obsolete: true
Attached file test-array.so
Attachment #8895339 - Attachment is obsolete: true
That new test-array.so is impossible considering the current code. Are you sure you built a version that had this landed?
Flags: needinfo?(sledru)
Specifically, it has exactly the same problem as the original one, with the mprotect pointer pointing before the bss. There is *no way* the new code can get that address, because there is no section for it.
I am building this one:

changeset:   374096:65826179c86e
tag:         tip
fxtree:      central
user:        Jonathan Kew <jkew@mozilla.com>
date:        Fri Aug 11 11:12:12 2017 +0100
summary:     Bug 1387912 - Add missing #include to dom/canvas/ImageBitmap.h, to 

I re triggered a new build to be sure.
Please attach the non-elfhacked test-array.so.
That is, test-array.so.bak
Attached file test-array.so.bak
voila!
Well, when I take that test-array.so.bak and apply a locally built elfhack to it, I get the mprotect relocation at the right place:

00000000c000  000b00000001 R_X86_64_64       0000000000000000 mprotect + 0

While the test-array.so you attached has:

00000000b1c8  000b00000001 R_X86_64_64       0000000000000000 mprotect + 0

I see no way elfhack can produce the latter from that test-array.so.bak. I *do* get the latter if I locally backout the patch for this bug. Are you absolutely sure you're building the right thing?
Flags: needinfo?(sledru)
Looks like it is different issue and the test-array.so is different, opening a new bug
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Flags: needinfo?(sledru)
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: