Skip to content

Issues caused by code coverage in RuntimeHelpers.GetSpanDataFrom #10624

Closed

Description

@h3xds1nz

With #10514 being merged in, a change was made to prevent CI builds from failing when using RuntimeHelpers.CreateSpan in one particular case in ContentType from WindowsBase here:

https://github.com/dotnet/wpf/pull/10514/files/a6cedcc7dce51a30caf60a3f07ec899fb8141f34#diff-1d02f80080e968e5fec25cef51809b5d0a9d18fce33cd7bd8fb2f9c75f14409aR665

This is caused by using outdated Coverlet version (3.1.2) which uses old version of Mono.Cecil. Coverlet is injecting methods to the assembly but the old version of Cecil has a bug with RVA alignment of packed fields, which causes it to fail at runtime when using CreateSpan. This was fixed in Mono.Cecil jbevain/cecil#817 and jbevain/cecil#888.

Coverlet uses Mono.Cecil containing those fixes since 6.0.0

Activity

  1. self-assigned this
    on Mar 23, 2025
  2. h3xds1nz commented on Mar 23, 2025

    @h3xds1nz
    MemberAuthor
  3. locked and limited conversation to collaborators on Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions