lwjgl3 icon indicating copy to clipboard operation
lwjgl3 copied to clipboard

[Suggestion]: use canary values to catch memory out of boundary errors when the debug option is enabled

Open HamiltonHuaji opened this issue 2 months ago • 0 comments

Description

In debug mode, place canary values before and after the memory blocks allocated by functions like memAlloc or MemoryStack.stackPush. After native calls, check if these values have been accidentally modified, and throw an exception to warn the developer about the memory boundary issue and provide information such as the line of code where the memory block was allocated.

HamiltonHuaji avatar May 24 '24 03:05 HamiltonHuaji