in reply to perl +xs : crash after some time
Reading perlcall, there's an example with SPAGAIN; after the call_pv().
The purpose of the macro "SPAGAIN" is to refresh the local copy of the stack pointer. This is necessary because it is possible that the memory allocated to the Perl stack has been reallocated during the call_pv call.
You do the opposite: a PUTBACK; after the call. There shouldn't be need for either as you don't access SP after the call.
Anyway, that was just my quick guess. Can you try the code without this (second) PUTBACK; statement?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl +xs : crash after some time
by frazap (Monk) on Nov 06, 2017 at 14:07 UTC |