Closed Bug 1844484 Opened 1 year ago Closed 1 year ago

libxul with packed relative relocations is larger than with elfhack

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(firefox-esr102 unaffected, firefox-esr115 unaffected, firefox115 unaffected, firefox116 wontfix, firefox117 wontfix, firefox118 fixed)

RESOLVED FIXED
118 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 --- unaffected
firefox115 --- unaffected
firefox116 --- wontfix
firefox117 --- wontfix
firefox118 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Interestingly enough, it's not larger enough to compensate the fact that the other binaries are overall smaller because they don't each have the elfhack initialization payload.

The main difference is that elfhack removes relocations to __cxa_pure_virtual.

Set release status flags based on info from the regressing bug 1839743

Not big enough to require an uplift, and also, doesn't affect Mozilla builds (although it will affect Mozilla builds after bug 1839740).

In bug 1839743, we made the build system prefer packed relative
relocations to elfhack when both the system libc and linker support
them. Unfortunately, while that covers most of the benefits from
elfhack, it doesn't cover bug 651892.

To cover it, we make every C++ executable contain its own copy of
the symbol, so that all relocations related to it become relative.

And because this is actually (slightly) beneficial on macos, and because
it's also an advantage to have our own abort called rather than the
system's, we apply the same to all platforms.

Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/2bd2112ff7c0 Override the symbol used by compilers in vtables for pure virtual methods. r=firefox-build-system-reviewers,nalexander

Backed out for causing py3 failures and build bustages

Bustages: gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:526: fake.dll] Error 1
Log: https://treeherder.mozilla.org/logviewer?job_id=423242389&repo=autoland

Flags: needinfo?(mh+mozilla)
Flags: needinfo?(mh+mozilla)
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/9a6d93f12d75 Override the symbol used by compilers in vtables for pure virtual methods. r=firefox-build-system-reviewers,nalexander

Backed out for causing xpcshell failures on test_crash_purevirtual.js.
This seems to affect only windows.

[task 2023-07-20T08:47:46.856Z] 08:47:46     INFO -  TEST-START | toolkit/crashreporter/test/unit/test_crash_purevirtual.js
[task 2023-07-20T08:47:48.065Z] 08:47:48  WARNING -  TEST-UNEXPECTED-FAIL | toolkit/crashreporter/test/unit/test_crash_purevirtual.js | xpcshell return code: 0
[task 2023-07-20T08:47:48.069Z] 08:47:48     INFO -  TEST-INFO took 1209ms
[task 2023-07-20T08:47:48.069Z] 08:47:48     INFO -  >>>>>>>
[task 2023-07-20T08:47:48.069Z] 08:47:48     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2023-07-20T08:47:48.069Z] 08:47:48     INFO -  (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2023-07-20T08:47:48.069Z] 08:47:48     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2023-07-20T08:47:48.069Z] 08:47:48     INFO -  running event loop
[task 2023-07-20T08:47:48.069Z] 08:47:48     INFO -  toolkit/crashreporter/test/unit/test_crash_purevirtual.js | Starting run_test
[task 2023-07-20T08:47:48.070Z] 08:47:48     INFO -  (xpcshell/head.js) | test run_test pending (2)
[task 2023-07-20T08:47:48.070Z] 08:47:48     INFO -  No minidump found!
[task 2023-07-20T08:47:48.070Z] 08:47:48     INFO -  Z:/task_168983521465395/build/tests/xpcshell/tests/toolkit/crashreporter/test/unit/head_crashreporter.js:handleMinidump:133
[task 2023-07-20T08:47:48.070Z] 08:47:48     INFO -  Z:/task_168983521465395/build/tests/xpcshell/tests/toolkit/crashreporter/test/unit/head_crashreporter.js:do_crash:91
[task 2023-07-20T08:47:48.071Z] 08:47:48     INFO -  Z:/task_168983521465395/build/tests/xpcshell/tests/toolkit/crashreporter/test/unit/test_crash_purevirtual.js:run_test:18
[task 2023-07-20T08:47:48.071Z] 08:47:48     INFO -  Z:\task_168983521465395\build\tests\xpcshell\head.js:_run_next_test/<:1755
[task 2023-07-20T08:47:48.071Z] 08:47:48     INFO -  Z:\task_168983521465395\build\tests\xpcshell\head.js:_run_next_test:1755
[task 2023-07-20T08:47:48.071Z] 08:47:48     INFO -  Z:\task_168983521465395\build\tests\xpcshell\head.js:run:804
[task 2023-07-20T08:47:48.071Z] 08:47:48     INFO -  Z:\task_168983521465395\build\tests\xpcshell\head.js:_do_main:245
[task 2023-07-20T08:47:48.071Z] 08:47:48     INFO -  Z:\task_168983521465395\build\tests\xpcshell\head.js:_execute_test:592
[task 2023-07-20T08:47:48.071Z] 08:47:48     INFO -  -e:null:1
[task 2023-07-20T08:47:48.072Z] 08:47:48     INFO -  exiting test
[task 2023-07-20T08:47:48.072Z] 08:47:48     INFO -  (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2023-07-20T08:47:48.072Z] 08:47:48     INFO -  Unexpected exception NS_ERROR_ABORT:
[task 2023-07-20T08:47:48.072Z] 08:47:48     INFO -  _abort_failed_test@Z:\task_168983521465395\build\tests\xpcshell\head.js:865:20
[task 2023-07-20T08:47:48.072Z] 08:47:48     INFO -  do_throw@Z:\task_168983521465395\build\tests\xpcshell\head.js:858:3
[task 2023-07-20T08:47:48.072Z] 08:47:48     INFO -  handleMinidump@Z:/task_168983521465395/build/tests/xpcshell/tests/toolkit/crashreporter/test/unit/head_crashreporter.js:133:13
[task 2023-07-20T08:47:48.073Z] 08:47:48     INFO -  do_crash@Z:/task_168983521465395/build/tests/xpcshell/tests/toolkit/crashreporter/test/unit/head_crashreporter.js:91:9
[task 2023-07-20T08:47:48.073Z] 08:47:48     INFO -  run_test@Z:/task_168983521465395/build/tests/xpcshell/tests/toolkit/crashreporter/test/unit/test_crash_purevirtual.js:18:9
[task 2023-07-20T08:47:48.073Z] 08:47:48     INFO -  _run_next_test/<@Z:\task_168983521465395\build\tests\xpcshell\head.js:1755:22
[task 2023-07-20T08:47:48.073Z] 08:47:48     INFO -  _run_next_test@Z:\task_168983521465395\build\tests\xpcshell\head.js:1755:38
[task 2023-07-20T08:47:48.073Z] 08:47:48     INFO -  run@Z:\task_168983521465395\build\tests\xpcshell\head.js:804:9
[task 2023-07-20T08:47:48.073Z] 08:47:48     INFO -  _do_main@Z:\task_168983521465395\build\tests\xpcshell\head.js:245:6
[task 2023-07-20T08:47:48.073Z] 08:47:48     INFO -  _execute_test@Z:\task_168983521465395\build\tests\xpcshell\head.js:592:5
[task 2023-07-20T08:47:48.073Z] 08:47:48     INFO -  @-e:1:1
[task 2023-07-20T08:47:48.074Z] 08:47:48     INFO -  exiting test
[task 2023-07-20T08:47:48.074Z] 08:47:48     INFO -  <<<<<<<
[task 2023-07-20T08:47:48.074Z] 08:47:48     INFO -  INFO | Result summary:
[task 2023-07-20T08:47:48.074Z] 08:47:48     INFO -  INFO | Passed: 877
[task 2023-07-20T08:47:48.074Z] 08:47:48  WARNING -  INFO | Failed: 1
[task 2023-07-20T08:47:48.074Z] 08:47:48  WARNING -  One or more unittests failed.
[task 2023-07-20T08:47:48.074Z] 08:47:48     INFO -  INFO | Todo: 4
[task 2023-07-20T08:47:48.074Z] 08:47:48     INFO -  INFO | Retried: 1
[task 2023-07-20T08:47:48.074Z] 08:47:48     INFO -  SUITE-END | took 532s
Flags: needinfo?(mh+mozilla)
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/a8537b37554e Override the symbol used by compilers in vtables for pure virtual methods. r=firefox-build-system-reviewers,nalexander
Pushed by smolnar@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/750b3385f0aa Fix toolchain bustage in src/build/pure_virtual/pure_virtual.c CLOSED TREE
Flags: needinfo?(mh+mozilla)
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/a2017655dd34 Override the symbol used by compilers in vtables for pure virtual methods. r=firefox-build-system-reviewers,ahochheiden

Set release status flags based on info from the regressing bug 1839743

Flags: needinfo?(mh+mozilla)
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/b3c797d9f723 Override the symbol used by compilers in vtables for pure virtual methods. r=firefox-build-system-reviewers,ahochheiden
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch

The patch landed in nightly and beta is affected.
:glandium, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox117 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(mh+mozilla)
Flags: needinfo?(mh+mozilla)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: