Segfault in vectorized CubicWorldGen depth noise generation on Windows (AVX and better)
DaMatrix opened this issue ยท 6 comments
Depth noise generation for CubicWorldGen worlds will instantly and consistently cause a segfault, causing the JVM to exit.
The issue is likely caused by commit 8a3d728.
The issue does not occur when switching to Linux, but using an otherwise identical configuration.
I have a hunch the issue might be specific to AVX or AVX2, but more testing is required.
Have noticed this happens on AVX2 as well from this error log below.
hs_err_pid227608.log
GPU: Radeon 5600XT
hs_err_pid243492.log
Still a crash to this point.
latest.log
debug.log
Logs as well
progress update: i've confirmed that the issue only occurs on AVX and higher. most likely it's also a problem on AVX512, although i don't have hardware available to test that.
i've confirmed the issue is related to mingw32's inability to align the stack to anything greater than 16 bytes. AVX registers are 32 bytes, so when using aligned loads/stores to store method parameters/return values to the stack, an exception is generated.
i don't really see any way around this other than switching to another compiler. i do intend to revamp the native compilation pipeline at some point, and will hopefully be able to transition to clang in the process, but for now i'll work around this by forcing everything to be inlined when on windows.