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

Document that XS calling to other XS functions that modify the stack should PUTBACK/SPAGAIN #7

Open
wolfsage opened this issue Mar 10, 2014 · 1 comment

Comments

@wolfsage
Copy link
Member

It would seem that if you have:
void x():
...
call_sv(...)
...

void y():
    ....
    x();

That y() must wrap x() with a PUTBACK/SPAGAIN, otherwise the stack might be corrupted.

This does not seem to be documented anywhere, perhaps add a note within perlcall()...

@bulk88
Copy link

bulk88 commented Mar 10, 2014

This is referring to stack reallocation. If a Xsub/func C has an auto SP/dSP; and calls another directly or indirectly (unlimited stack frame depth) a C func that does a call_*, the "Xsub/func C has an auto SP/dSP;" must SPAGAIN;

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

No branches or pull requests

2 participants