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
Running a script from a function declared in the terminal appears to cause a stack misalignment bug.
Steps to reproduce
Make a script called "stack" with the code print "stack"..
In the terminal type FUNCTION foo { print "foo1". run stack. print "foo2". }
Call foo from the terminal this will trigger the stack error once foo has finished execution.
All prints will occur successfully and it appears that the error only happens once foo() is returning. None of the prints where required to cause the error and where only included to try to get an idea where the error occurred in execution.
The exact error kOS prints is the "Number of arguments passed in didn't match the number of DECLARED PARAMETERs" with the verbose text of "something is wrong with the stack - no arg bottom mark when doing a return"
The text was updated successfully, but these errors were encountered:
The script would not have run if this was a reserved word conflict. What is happening is that run is actually RUNPATH() in a funny hat so RUN stack. is effectively getting converted into RUNPATH("stack"). by the compiler which won't conflict with any reserved words because that isn't something strings do. I would have expected if there was a reserved word conflict that got past the compile time check for those I would have seen a type mismatch error instead as apposed to stack misalignment. Also this is me simply reproducing and then making an issue about an error that others had that they didn't create an issue about them selves and they used different names for everything in there case with the exact same results as seen here.
Running a script from a function declared in the terminal appears to cause a stack misalignment bug.
Steps to reproduce
print "stack".
.FUNCTION foo { print "foo1". run stack. print "foo2". }
foo
has finished execution.All prints will occur successfully and it appears that the error only happens once
foo()
is returning. None of the prints where required to cause the error and where only included to try to get an idea where the error occurred in execution.The exact error kOS prints is the "Number of arguments passed in didn't match the number of DECLARED PARAMETERs" with the verbose text of "something is wrong with the stack - no arg bottom mark when doing a return"
The text was updated successfully, but these errors were encountered: