The segfault happening on the latest version of Windows is due to a heap corruption.
I am fairly sure this is a compiler bug, but so far I have not been able to come up with a small reproducer.
The segfault only occurs when compiling using one of the latest versions of MSVC and only in release mode.
Furthermore, changing the memory allocator (e.g. with mimalloc) and enabling verbose reporting makes the test crash at a different point.
I've already spent a significant amount of time chasing down this issue, so I think for the time being the temporary solution is to validate the compiler version with CMake, and refuse to build hictkpy on Windows when one of the faulty compiler versions is detected.
Most users shouldn't be affected by this, given that I believe there are only a handful of users on Windows, and that we publish x86 Windows wheels on PyPI.
The segfault happening on the latest version of Windows is due to a heap corruption. I am fairly sure this is a compiler bug, but so far I have not been able to come up with a small reproducer. The segfault only occurs when compiling using one of the latest versions of MSVC and only in release mode. Furthermore, changing the memory allocator (e.g. with mimalloc) and enabling verbose reporting makes the test crash at a different point. I've already spent a significant amount of time chasing down this issue, so I think for the time being the temporary solution is to validate the compiler version with CMake, and refuse to build hictkpy on Windows when one of the faulty compiler versions is detected. Most users shouldn't be affected by this, given that I believe there are only a handful of users on Windows, and that we publish x86 Windows wheels on PyPI.