Detouring the game's free, alloc, realloc to the one's from the DLL causes heap corruption. Either our knowledge/identification of these functions in the original binary isn't fully correct, or the compiler optimized it such that it became incompatible.
https://github.com/sourcehold/OpenSHC/blob/main/src/OpenSHC/OS.func.hpp
This is something to worry about for when people want to test the detours of these OS functions.
Debugging would involve detecting where the heap corruption occurs, perhaps using these tools? https://web.archive.org/web/20240829103025/https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/example-12---using-page-heap-verification-to-find-a-bug
https://learn.microsoft.com/en-us/cpp/c-runtime-library/internal-crt-globals-and-functions?view=msvc-170
Detouring the game's free, alloc, realloc to the one's from the DLL causes heap corruption. Either our knowledge/identification of these functions in the original binary isn't fully correct, or the compiler optimized it such that it became incompatible.
https://github.com/sourcehold/OpenSHC/blob/main/src/OpenSHC/OS.func.hpp
This is something to worry about for when people want to test the detours of these OS functions.
Debugging would involve detecting where the heap corruption occurs, perhaps using these tools? https://web.archive.org/web/20240829103025/https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/example-12---using-page-heap-verification-to-find-a-bug
https://learn.microsoft.com/en-us/cpp/c-runtime-library/internal-crt-globals-and-functions?view=msvc-170