[llvm-bugs] [Bug 48657] New: ld64.lld.darwinnew-linked Chromium Framework is somewhat crashy
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jan 4 13:19:08 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=48657
Bug ID: 48657
Summary: ld64.lld.darwinnew-linked Chromium Framework is
somewhat crashy
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: MachO
Assignee: unassignedbugs at nondot.org
Reporter: nicolasweber at gmx.de
CC: llvm-bugs at lists.llvm.org
Repro:
1. Download
https://drive.google.com/file/d/1j6_f55jX1WYjwrDSmQYbr_X043mLG9L2/view?usp=sharing
2. Unpack, cd chromium_framework
3. `ld @response.txt` (this will write its output in the right place below
Chromium.app, which is also in the zip)
4. `Chromium.app/Contents/MacOS/Chromium --single-process` to start the browser
(without `--single-process` is fine too, but it's easier to catch the crash in
lldb with the flag)
5. Go to https://www.pinterest.com/hclev073/asdf/ and scroll down a bit
6. Go to 2 and repeat, but this time link with ld64.lld.darwinnew
Expected: Works just as well with lld as with ld
Actual: Crashes with lld after scrolling for less than a second.
(But: lld.darwinnew can now link Chromium and produce a mostly-working binary!
And it links it over 4x as fast as ld64 O_O)
Note to self: Repro zip created this way:
0. Build `chrome`, `rm
'out/gn/obj/chrome/chrome_framework_shared_library/Chromium Framework'`
1. `LLD_REPRODUCE=chromium_framework.tar ninja -C out/gn
'obj/chrome/chrome_framework_shared_library/Chromium Framework'`
2. `cd out/gn`
3. `open chromium_framework.tar`
4. `cd chromium_framework`
5. `cp -R ../Chromium.app .`
6. `vim response.txt`, delete the `--color-diagnostics` line, change the `-o`
line to `-o "./Chromium.app/Contents/Frameworks/Chromium
Framework.framework/Versions/Current/Chromium Framework"`
7. zip up chromium_framework again
(App bundles are common on macOS, and I wonder if we can teach lld some flag to
make creating repro zips with app bundles less manual. But in this case we have
a framework bundle nested in an app bundle and the binary is copied (well,
hard-linked) to the right place in a step that runs after the actual link, so
that's maybe tricky. Maybe a LLD_REPRODUCE_CONTAINING_DIR=Chromium.app
LLD_REPRODUCE_OUTPUT_PATH_IN_CONTAINING_DIR='Chromium.app/Contents/Frameworks/Chromium
Framework.framework/Versions/Current/Chromium Framework' and then lld could
figure it out from that?)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210104/2c8f096e/attachment.html>
More information about the llvm-bugs
mailing list