dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.96k stars 4.65k forks source link

BlobBuilder.Align(int) seems not working on mono #97172

Open buyaa-n opened 8 months ago

buyaa-n commented 8 months ago

A Field RVA alignment test is failing on mono legs in this PR

That verifies the code section:

https://github.com/dotnet/runtime/blob/f36b7cded294d07962060856843c5fa8ec1beb7d/src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/ModuleBuilderImpl.cs#L452-L454

Not sure if it is bug or expected, I don't see mono specific code in MetadataBuilder nor in BlobBuilder.Align(int) https://github.com/dotnet/runtime/blob/72c4c57a3c8c1b267447f253fdc14f9d14d91a2b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/BlobBuilder.cs#L808-L812

lambdageek commented 8 months ago

It's probably an issue on the reading side - maybe somewhere in https://github.com/dotnet/runtime/blob/main/src/mono/mono/metadata/class.c#L5580-L5649

ghost commented 8 months ago

Tagging subscribers to this area: @dotnet/area-system-reflection See info in area-owners.md if you want to be subscribed.

Issue Details
A [Field RVA alignment test](https://github.com/dotnet/runtime/pull/96805#discussion_r1450775745) is failing on mono legs[ in this PR](https://github.com/dotnet/runtime/pull/96805) That verifies the code section: https://github.com/dotnet/runtime/blob/f36b7cded294d07962060856843c5fa8ec1beb7d/src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/ModuleBuilderImpl.cs#L452-L454 Not sure if it is bug or expected, I don't see mono specific code in `MetadataBuilder` nor in `BlobBuilder.Align(int)` https://github.com/dotnet/runtime/blob/72c4c57a3c8c1b267447f253fdc14f9d14d91a2b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/BlobBuilder.cs#L808-L812
Author: buyaa-n
Assignees: -
Labels: `area-System.Reflection`, `runtime-mono`, `area-System.Reflection-mono`
Milestone: 9.0.0