If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

lld - dummy binary with the elfhack segsfaults

RESOLVED FIXED in Firefox 57

Status

()

Core
Build Config
RESOLVED FIXED
a month ago
a month ago

People

(Reporter: sylvestre, Assigned: glandium)

Tracking

(Blocks: 1 bug)

Trunk
mozilla57
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(5 attachments, 3 obsolete attachments)

(Reporter)

Description

a month ago
Created attachment 8895338 [details]
core

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)
(Reporter)

Comment 1

a month ago
Created attachment 8895339 [details]
test-array.so
(Reporter)

Comment 2

a month ago
Created attachment 8895340 [details]
dummy
Comment hidden (mozreview-request)

Comment 4

a month ago
mozreview-review
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+

Comment 5

a month ago
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/e0417716bac0
Change how elfhack looks for the bss section. r=froydnj
(Reporter)

Updated

a month ago
Assignee: nobody → mh+mozilla
https://hg.mozilla.org/mozilla-central/rev/e0417716bac0
Status: NEW → RESOLVED
Last Resolved: a month ago
status-firefox57: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
(Reporter)

Comment 7

a month ago
I am still seeing this issue
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Reporter)

Comment 8

a month ago
Created attachment 8896227 [details]
core
Attachment #8895338 - Attachment is obsolete: true
(Reporter)

Comment 9

a month ago
Created attachment 8896228 [details]
dummy
Attachment #8895340 - Attachment is obsolete: true
(Reporter)

Comment 10

a month ago
Created attachment 8896229 [details]
test-array.so
Attachment #8895339 - Attachment is obsolete: true
(Assignee)

Comment 11

a month ago
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)
(Assignee)

Comment 12

a month ago
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.
(Reporter)

Comment 13

a month ago
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.
(Reporter)

Comment 14

a month ago
Same, full log:
http://relman-ci.mozilla.org/job/firefox-clang-lld-last/34/consoleFull
Flags: needinfo?(sledru)
(Assignee)

Comment 15

a month ago
Please attach the non-elfhacked test-array.so.
(Assignee)

Comment 16

a month ago
That is, test-array.so.bak
(Reporter)

Comment 17

a month ago
Created attachment 8896325 [details]
test-array.so.bak

voila!
(Assignee)

Comment 18

a month ago
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)
(Reporter)

Comment 19

a month ago
Looks like it is different issue and the test-array.so is different, opening a new bug
Status: REOPENED → RESOLVED
Last Resolved: a month agoa month ago
Flags: needinfo?(sledru)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.