-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-11539] llvm-link: dsymutil prints warning: could not find referenced DIE #53940
Comments
@swift-ci create |
What version of llvm-link were you using? `find` seems to indicate that this tool is not being shipped with Xcode... |
Comment by Jason Holajter (JIRA) We built the llvm-link we are using off latest in the swift-llvm repository on the swift-5.1-branch: https://github.com/apple/swift-llvm/tree/swift-5.1-branch |
I managed to get all the way to the linker invocation, but I don't have all the frameworks (the first on that it's complaining about is AHKActionSheet.framework). Could you please attach them too? |
Comment by Jason Holajter (JIRA) They are too large to attach to this issue. I'll e-mail you a link to where you can get them from me. |
Passing --verbose to dsymutil: {{ 0x00000c21: DW_TAG_inlined_subroutine [32] {0x000000e3} ) It's the DW_AT_abstract_origin the error is complaining about. |
There is nothing at 0xe3: 0x000000e0: DW_TAG_structure_type 0x000000ed: DW_TAG_subprogram |
That does look like a potential LLVM backend bug to me. Steps to reproduce: /Volumes/Data/swift-5.1/_build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/bin/"llvm-link" "17.bc" "24.bc" "-o" "llvm-linked-bitcode.bc" |
Comment by Jason Holajter (JIRA) Is there anything else we can do or provide to get this looked at by the appropriate LLVM backend experts? |
The information you supplied is perfect, I just hadn't found the time to look at this yet. |
Comment by Jason Holajter (JIRA) Thank you, Adrian. Appreciate the support. I just wanted to make sure there was nothing else that we could provide from our end to help out. |
Comment by Luis Gomez (JIRA) I'm working with https://github.com/apple/llvm-project with tag swift-5.3.2 and I'm facing the same warning with dsymutil after link bitcode files with llvm-link tool. Did you find a solution? Note: We don't support Xcode12.5 / swift 5.4 yet, so not sure if this warning is present there Update: this also happens in Xcode12.5 / swift 5.4 |
I've attached a reduced bitcode file that exhibits the issue: Verifying /tmp/linked.out: file format Mach-O arm64 0x0000007a: DW_TAG_inlined_subroutine Verifying .debug_types Unit Header Chain... |
Comment by Luis Gomez (JIRA) I attached 'llvm-link-bug.zip', which contains bc files created with swift 5.4, and a 'runnme.sh' script to reproduce the error. |
Comment by Luis Gomez (JIRA) As an update, for our particular use case we were able to solve it by disabling "Generate Debug Symbols" in Xcode. This removes "-g" flag when compiling. Probably this don't solve this bug, because llc is not taking into account in the original issue with llvm-link, but it could help anyone else using llvm-link + llc |
I would expect removing the `-g` flag to affect the quality of the info in the dsym you produce though. When you `dwarfdump` the valid dsym do you have full debug info fidelity? Same question but if you use it to symbolicate crash reports? |
Attachment: Download
Additional Detail from JIRA
md5: f5a1284ed6017ecdbfbe081809c954a1
Issue Description:
When using
llvm-link
to link multiple bitcode files from swift source, the following warning is seen when usingdsymutil
:This is very similar to the problem reported in https://bugs.swift.org/browse/SR-5935 which has been marked as resolved.
In the attached
llvm-link-dsymutil-repro.zip
, if the "17.bc" and "24.bc" are linked together usingllvm-link
,dsymutil
outputs warnings as seen in the attached "repro-output.txt"The "repro.sh" script can be used to reproduce the issue. However because of the limits in the attachment size, I could not include the dependent Frameworks. I can send those via another mechanism upon request. Alternatively, they can be obtained by building the open source Gulps application found at https://github.com/FancyPixel/gulps
The artifacts in the attachments were generated using Xcode 11.1 GM.
The text was updated successfully, but these errors were encountered: