Skip to content

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

Closed

Description

@tannergooding

Running a jit-diff, such as ..\jitutils\bin\jit-diff.bat diff --diff --pmi --benchmarks, currently fails with an error similar to the following:

Unhandled exception. System.FieldAccessException: Cannot set initonly static field 's_isProcessorNumberReallyFast' after type 'System.Threading.Thread' is initialized.
   at System.RuntimeFieldHandle.SetValue(RtFieldInfo field, Object obj, Object value, RuntimeType fieldType, FieldAttributes fieldAttr, RuntimeType declaringType, Boolean& domainInitialized)
   at System.Reflection.RtFieldInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture)
   at System.Reflection.FieldInfo.SetValue(Object obj, Object value)
   at PrepareMethodinator.EnsureGetCurrentProcessorIdIsDeterministic() in D:\tagoo\Repos\jitutils\src\pmi\pmi.cs:line 1332
   at PrepareMethodinator.Main(String[] args) in D:\tagoo\Repos\jitutils\src\pmi\pmi.cs:line 1363

Activity

  1. tannergooding commented on Jun 19, 2020

    @tannergooding
    MemberAuthor

    CC. @erozenfeld, it looks like this was added in #255

  2. erozenfeld commented on Jun 19, 2020

    @erozenfeld
    Contributor

    Yes, I’ll need to tweak this workaround. Will take a look today.

  3. added a commit that references this issue on Jun 19, 2020
    04f7602
  4. added a commit that references this issue on Jun 19, 2020
    1561547
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions