CMake Windows Build Crashes (32bit)
Work environment
| Questions | Answers |
|---|---|
| OS/arch/bits | Windows x86 |
| Architecture | x86 |
| Source of Capstone | git clone, reproduces with vcpkg port which uses cmake for windows |
| Version/git commit | v5.0.1 |
Expected behavior
When compiling the library for windows using the CMake buildsystem for x86 32 bit it should produce a working binary.
Actual behavior
The library lib file produced causes a null-dereference when using cs_disasm.
Steps to reproduce the behavior
Compile for windows x86 32 bit Release static using the CMake buildsystem and then run test_basic.exe - the test crashes almost immediately. Preferably use the vcpkg port version which uses CMake both for Linux and Windows binaries.
It will take a while until I have a working Windows VM set up. Would you mind building the next branch with ASAN enabled (-DENABLE_ASAN=1), so we get a stack trace?
The crash does not reproduce when test_basic.exe is compiled from the next branch, and when compiling 5.0.1 with asan no trace is produced and only a windows popup shows that says the program has stopped working.
Unfortunatly, although the tests pass when using next my binary still manages to reproduce the crash, but I can't attach it here.
My suggestion is to try and work on a windows 32-bit machine and run the test_basic.exe from version 5.0.1 and fix the bug this way
@kabeor Would support Windows 32bit? Personally I think it is too much maintenance work at the current time. Also I think it is not supported by Github actions. So we can't test it
We discovered before that it also crashes in the next branch. Generally Capstone should work on 32bit systems as well.