Skip to content

Conversation

@erozenfeld
Copy link
Member

I added a workaround for disassembly non-determinism in #255.
See #255 for details of what causes the non-determinism.
It turns out it relied on a reflection hole that allowed
init-only static fields to be modified after static constructor has
been called. That hole was fixed in dotnet/runtime#37849
so the workaround is no longer valid and causes an exception from pmi.

I don't see a way to work around the non-determinism without changing
framework code so for now I'm just reverting the workaround. Unfortunately, that
means that we can get non-deterministic disassembly for any method that inlines
System.Threading.Thread.GetCurrentProcessorId.

Fixes #271.

I added a workaround for disassembly non-determinism in dotnet#255.
See dotnet#255 for details of what causes the non-determinism.
It turns it relied on a reflection hole that allowed
init-only static fields to be modified after static constructor has
been called. That hole was fixed in dotnet/runtime#37849
so the workaround is no longer valid and causes an exception from pmi.

I don't see a way to work around the non-determinism without changing
framework code so for now I'm just reverting the workaround. Unfortunately, that
means that we can get non-deterministic disassembly for any method that inlines
System.Threading.Thread.GetCurrentProcessorId.

Fixes dotnet#271.
@erozenfeld
Copy link
Member Author

@dotnet/jit-contrib PTAL

@kunalspathak
Copy link
Contributor

I remember seeing some error around this on ARM64 when I was doing jit-diff.dll diff --pmi.

Copy link
Contributor

@briansull briansull left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jit-diff fails with "Cannot set initonly static field ..."

3 participants