-
Notifications
You must be signed in to change notification settings - Fork 6
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
Stack pointer validation for call function/method opcodes #237
Stack pointer validation for call function/method opcodes #237
Conversation
This is a very complicated area and I would better avoid making changes here. We should encourage people using new foreign function syntax in SB with proper calling convention and clearly defined arguments, and avoid dealing with raw commands like that. |
Yes, but new syntax also relay on user specifying correct calling convention. As said module build in debug mode automatically throws exceptions when such scenario occurs. |
No idea. Possibly not, but I can't guarantee. Calling external code is a precise operation. You must do it right. This is not something we should correct. |
I was about to say after some thinking, maybe we can keep it and see if user would complain. The error message in VS is much more helpful that what CLEO provides. Maybe we can use the exact wording + usual script info. |
Well the VS error message does not seem to be much more helpful. All the script user needs to know is the script command and information the "pop" argument was too small/big. |
Can it backfire in any way? Plugin compiled in debug configuration throws similar exceptions\error messages when stack pointer is left modified.
Does it make sense to allow scripts in legacy mode to not pop after call?