Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
HamiltonHuaji opened this issue May 24, 2024 · 0 comments

Comments

@HamiltonHuaji
Copy link

HamiltonHuaji commented May 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant