develooper Front page | perl.perl5.porters | Postings from September 2023

Calling Perl subs from XS under PERL_RC_STACK

Thread Next
From:
Lukas Mai
Date:
September 12, 2023 17:10
Subject:
Calling Perl subs from XS under PERL_RC_STACK
Message ID:
50c7f0de-58ed-4b85-6b7e-a925010f2bb8@gmail.com
I built perl 5.39.2 with PERL_RC_STACK. One of my modules, 
Function::Parameters, started failing:

http://www.cpantesters.org/cpan/report/a395543c-403d-11ee-bf97-ffb5ff96f5f7
| Attempt to free unreferenced scalar: SV 0x5556d4a0cbd8 at 
t/01-compiles.t line 10.

http://www.cpantesters.org/cpan/report/55055e26-4050-11ee-8bd0-2f0c0197f5f7
| perl5.39.2: Parameters.xs:1367: register_info: Assertion 
`!rpp_stack_is_rc()' failed.

Is this the expected behavior?

I got things to work again by manually patching all the 
PUSHMARK/EXTEND/PUSH sites with lots of #ifdef PERL_RC_STACK gates: 
https://github.com/mauke/Function-Parameters/commit/8df472a56657a410d4cd69da2579c527c155085a

Is there a better way to do this? Should perlcall.pod be amended? Or am 
I doing it wrong?

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About