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
cmd/link: TestDWARF fails with the latest tip version #25392
Comments
I am unable to reproduce this on linux.
|
I am unable to reproduce this on Darwin.
I'll see if I can figure out what other information would be helpful to figure out what's causing this. |
FWIW testDWARF is called with multiple build modes -- it would be helpful to know which one is failing (also version info for clang). |
Than, according to what I read, this is TestDWARF calling testDwarf with "" mode, so nothing special.
This looks good to me. |
The problem still occurs on my MacBook. The following is the version information of clang:
|
I tried with MacBook Air. The problem didn't occur. The version information of clang on the MacBook Air is following:
The clang on my MacBook Air is newer than one on my MackBook. |
After upgrading XCode and clang, the problem disappeared.
|
Thanks for the analysis @YoshikiShibata ! @dr2chase - This matches with your findings since you mentioned that you upgraded xcode recently. |
You didn't perhaps save the binary produced with the older version of XCode? I'd love to see what it did differently. |
I think this issue should be reopened. It looks like some (most?) versions of dsymutil do not support (but see below) version 3 for debug_line, including the most recent version of dsymutil on 10.12. If 10.12 is still considered supported this breaks backwards compatibility. Now, Saying that dsymutil doesn't support v3 is incomplete, it seems that it actually does, but only if you lie to it and say it's v2. For example this is what the line table of a compilation unit produced by clang looks like in the final executable:
Note how it says version 2 but has more than 9 standard opcodes. The choice is between lying, pretending 10.12 doesn't exist or reverting the prologueEnd thing. |
It is still broken for me. go version devel +cc09212f59 Sun May 20 00:09:28 2018 +0000 darwin/amd64
|
I can confirm that setting the DWARF version on .debug_lines to 2 still works okay on 10.13.4 with corresponding XCode. |
What did you do?
Just try to rebuild the latest tip version with
all.bash
What did you expect to see?
No error on the build.
What did you see instead?
Does this issue reproduce with the latest release (go1.10.2)?
N/A
System details
The text was updated successfully, but these errors were encountered: