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
newCopyArgs copies too many args #1087
Comments
The implementation of
But the reported
But this one:
This has |
Somehow I have the suspicion that it has to do with |
When the compile/parser see a method with only a single call, or a call to `super.something`, it 'inlines' it. For these methods, all the users arguments were being passed through, regardless of how many were declared in the function signature. This commit checks this, and removes any excess args from the stack. Closes supercollider#1087
When the compile/parser see a method with only a single call, or a call to `super.something`, it 'inlines' it. For these methods, all the users arguments were being passed through, regardless of how many were declared in the function signature. This commit checks this, and removes any excess args from the stack. Closes supercollider#1087
This was being caused by not checking how many args are present for certain 'inlined' methods. I've proposed a PR to fix this. |
When the compile/parser see a method with only a single call, or a call to `super.something`, it 'inlines' it. For these methods, all the users arguments were being passed through, regardless of how many were declared in the function signature. This commit checks this, and removes any excess args from the stack. Closes supercollider#1087
When the compile/parser see a method with only a single call, or a call to `super.something`, it 'inlines' it. For these methods, all the users arguments were being passed through, regardless of how many were declared in the function signature. This commit checks this, and removes any excess args from the stack. Closes supercollider#1087
newCopyArgs
seems to have the equivalent of a buffer overrun bug.Then run:
It prints:
The argument 3 has been copied into c -- but the *new method accepts only two arguments, and passes only two arguments to
newCopyArgs
. The third argument should be discarded.This happens if newCopyArgs is the last method call. If there is another method call after it, then it behaves as expected -- if *new does
{ |a, b| ^super.newCopyArgs(a, b).dump }
, then it handles only two arguments.The text was updated successfully, but these errors were encountered: