Skip to content

Windows ARM64 not support #88

@biduan

Description

@biduan

While running npm install segfault-handler on a Windows ARM64 computer, encountered the following error:

npm error C:\github\temp\sherpa-onnx\nodejs-examples\node_modules\segfault-handler\src\StackWalker.cpp(971,1): error C1189: #error: "Platform not supported!" [C:\github\temp\sherpa-onnx\nodejs-examples\node_modules\segfault-handler\build\segfault-handler.vcxproj]

The reason for this error is that StackWalker.cpp does not support Windows ARM64. A workaround is to modify the code by adding the following lines:

#elif _M_ARM64
imageType = IMAGE_FILE_MACHINE_ARM64;
s.AddrPC.Offset = c.Pc;
s.AddrPC.Mode = AddrModeFlat;
s.AddrFrame.Offset = c.Fp;
s.AddrFrame.Mode = AddrModeFlat;
s.AddrStack.Offset = c.Sp;
s.AddrStack.Mode = AddrModeFlat;
#else
#error "Platform not supported!"
#endif

This modification adds support for Windows ARM64 by defining the necessary values for the imageType, AddrPC, AddrFrame, and AddrStack fields.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions