Skip to content

Issues caused by code coverage in RuntimeHelpers.GetSpanDataFrom #10624

@h3xds1nz

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions