You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there are no upper bounds in place, for example regarding the macro call stack:
macro function
begin
function
endmacro
function
This segfaults because the stack grows out of bounds. Adding hardcoded upperbounds, like a depth of 2048 or whatever should suffice.
I'm aware that this is yet another piece of information that needs to be carried around all the time. Maybe putting the variables, macros, hex flag, and stack depth all in a single "context" struct would clean up the function signatures?
The text was updated successfully, but these errors were encountered:
Valid concern, but I'm wondering how necessary it might be in practice. Since t2b isn't a real programming language, I doubt people would be writing functions so recursive that they trigger segfaults.
Though, it might be good to impose bounds just in case.
And yes, having a context struct would be smarter. I've actually removed hexMode locally, as it's no longer necessary, now that hex/bin/oct literals are in place.
Currently, there are no upper bounds in place, for example regarding the macro call stack:
This segfaults because the stack grows out of bounds. Adding hardcoded upperbounds, like a depth of 2048 or whatever should suffice.
I'm aware that this is yet another piece of information that needs to be carried around all the time. Maybe putting the variables, macros, hex flag, and stack depth all in a single "context" struct would clean up the function signatures?
The text was updated successfully, but these errors were encountered: