Skip to content

Unable to analyze CHPE, ARM64EC, ARM64X binaries (System.InvalidOperationException: Unknown machine type!) #48

@philnach

Description

@philnach

Describe the bug
In trying to use SizeBench against an ARM64EC binary, I hit the following exception:

Exception information: 
System.InvalidOperationException: Unknown machine type! 
HRESULT: 0x80131509 
   at SizeBench.AnalysisEngine.DIAInterop.DIAAdapter..ctor(Session session, String pdbPath) in /_/src/SizeBench.AnalysisEngine/DIAInterop/DIAAdapter.cs:line 176
   at SizeBench.AnalysisEngine.Session.InitializeDIAThread() in /_/src/SizeBench.AnalysisEngine/Session.cs:line 164 
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location --- 
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) 
--- End of stack trace from previous location --- 
   at SizeBench.AnalysisEngine.Session.Create(String binaryPath, String pdbPath, SessionOptions options, ILogger sessionLogger) in /_/src/SizeBench.AnalysisEngine/Session.cs:line 117
   at SizeBench.AnalysisEngine.Session.Create(String binaryPath, String pdbPath, SessionOptions options, ILogger sessionLogger) in /_/src/SizeBench.AnalysisEngine/Session.cs:line 124
   at SizeBench.GUI.SessionFactory.CreateSession(String binaryPath, String pdbPath, SessionOptions sessionOptions, ILogger logger) in D:\a\1\s\src\SizeBench.GUI\SessionFactory.cs:line 24
   at SizeBench.GUI.ViewModels.MainWindowViewModel.<>c__DisplayClass51_0.<<OpenSessionFromBinaryPathAndPDBPath>b__0>d.MoveNext() in D:\a\1\s\src\SizeBench.GUI\MainWindowViewModel.cs:line 379

What you are doing
Trying to load an ARM64EC compiled binary

Expected behavior
SizeBench is able to load a ARM64EC binary.

Environment Details
Processor Count: 24
Runtime Version: 8.0.10
Framework Description: .NET 8.0.10
CoreCLR Build: 8.0.10
CoreCLR Hash: 81cabf2857a01351e5ab578947c7403a5b128ad1
CoreFX Build: 8.0.10
CoreFX Hash: 81cabf2857a01351e5ab578947c7403a5b128ad1
OS Architecture: X64
Process Architecture: X64
Has Shutdown Started: False
Current Directory: C:\WINDOWS\system32
Locale: en-US
UI Locale: en-US

Process Information
Process Name: SizeBench.GUI
Application Version: 2.2410.3101.0
Working Set: 193,064,960
Command Line: "C:\Program Files\WindowsApps\MicrosoftCorporationII.SizeBench_2.2410.3101.0_x64__8wekyb3d8bbwe\SizeBench.GUI\SizeBench.GUI.dll"
64-bit Process: True

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