Skip to content
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

Big-endian fixes: PDB creation by ilasm #59422

Merged
merged 1 commit into from
Sep 22, 2021
Merged

Big-endian fixes: PDB creation by ilasm #59422

merged 1 commit into from
Sep 22, 2021

Conversation

uweigand
Copy link
Contributor

  • Fix byte order of debug directory fields

  • Fix byte order of PDB stream data (PdbHeap::SetData)

* Fix byte order of debug directory fields

* Fix byte order of PDB stream data (PdbHeap::SetData)
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Sep 21, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added area-ILTools-coreclr and removed community-contribution Indicates that the PR has been added by a community member labels Sep 21, 2021
@ghost
Copy link

ghost commented Sep 21, 2021

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

Issue Details
  • Fix byte order of debug directory fields

  • Fix byte order of PDB stream data (PdbHeap::SetData)

Author: uweigand
Assignees: -
Labels:

area-ILTools-coreclr

Milestone: -

@uweigand
Copy link
Contributor Author

CC @BruceForstall

Yet more endian issues in ilasm, this time when creating debug info / PDB files. The first problem is that the members of the DebugDirectory in the main .DLL need to be properly byte-swapped. The second problem is that when defining the PDB stream data, fields need to be swapped as well (in PdbHeap::SetData in md). The rest of the PDB contents seem fine, they're emitted via the MiniMd mechanism that already handles byte order properly.

This bug currently causes source-build to fail on s390x with the latest .NET 6 code, because a PDB file for an assembly created via ilasm contains invalid data, and therefore illink.dll fails to generate an updated PDB when trimming the assembly, and because of that missing final PDB the packaging fails.

Therefore, it would be great if this fix could still make it into .NET 6, ideally RC2.

@JulieLeeMSFT
Copy link
Member

CC @dotnet/jit-contrib PTAL. Community request to backport to .NET 6 RC2.

@BruceForstall
Copy link
Member

/azp run runtime-coreclr ilasm

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BruceForstall
Copy link
Member

The failures are #58481

@BruceForstall BruceForstall merged commit d32d871 into dotnet:main Sep 22, 2021
@BruceForstall
Copy link
Member

/backport to release/6.0

@github-actions
Copy link
Contributor

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1260093631

@BruceForstall
Copy link
Member

/backport to release/6.0-rc2

@github-actions
Copy link
Contributor

Started backporting to release/6.0-rc2: https://github.com/dotnet/runtime/actions/runs/1262715856

@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants