Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Relax DIE verification #120

Merged
merged 2 commits into from
Oct 29, 2018
Merged

Conversation

compnerd
Copy link
Collaborator

@compnerd compnerd commented Oct 27, 2018

This relaxes the DWARF verifier for object files. In particular, this is important for ELF where COMDATs are created by means of function sections. Each section is independent and the DW_AT_low_pc is a section relative address. The linker will coalesce the sections into the text segment and then update the debug info. The current approach of verifying the contents of DW_AT_ranges of the CU does not work as a result as the overlapping address is totally valid. The bug was uncovered while trying to fix the IRGen for swift on ELF and COFF targets. Without this change, in order to fix a size regression and a complete failure for building code for Windows targets, we would need to disable tests that verify the generated debug information on object files which would open the door for introducing debug information QoI regressions.

CC: @adrian-prantl @JDevlieghere @bob-wilson @tkremenek

Relocatable content may have overlapping ranges until the sections are
finalized.  This reduces the amount of verification that is done on an object
file so that invalid errors are not raised.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345441 91177308-0d34-0410-b5e6-96231b3b80d8
Ensure that the test builds for x86_64 as it is an assembly test.  This
should repair the buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345444 91177308-0d34-0410-b5e6-96231b3b80d8
@compnerd
Copy link
Collaborator Author

Note that this is a cherry-pick from usptream (I fixed this upstream and am trying to pull this into the swift side).

@adrian-prantl
Copy link
Member

When cherry-picking, could you use cherry-pick -x in the future?

@adrian-prantl adrian-prantl merged commit 0b03c95 into apple:swift-5.0-branch Oct 29, 2018
@compnerd compnerd deleted the die-must-die branch October 29, 2018 18:41
@compnerd
Copy link
Collaborator Author

@adrian-prantl - sure will do!

@rjmccall
Copy link
Member

This seems to be breaking the Linux CI bots: https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-14_04/6373/

@adrian-prantl
Copy link
Member

I have reverted this PR in c8d253a.
@compnerd can you investigate what was going on with the Swift test?

@compnerd
Copy link
Collaborator Author

compnerd commented Nov 1, 2018

@adrian-prantl - I had put up #121 to address the issue. The check was overly strict and I had missed the local change for relaxing it when I committed it. Sorry about that. Its already fixed upstream, it was a matter of pulling the fix back down here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants