develooper Front page | perl.perl5.porters | Postings from January 2014

Re: [perl #120626] Bleadperl v5.19.6-22-gebdc880 breaks GWILLIAMS/RDF-Trine-1.007.tar.gz

Thread Previous | Thread Next
Father Chrysostomos
January 30, 2014 04:38
Re: [perl #120626] Bleadperl v5.19.6-22-gebdc880 breaks GWILLIAMS/RDF-Trine-1.007.tar.gz
Message ID:
I wrote:
> Indeed, Data::Clone does not protect against stack reallocation during
> callbacks.

I was implying that it should do PUSHSTACK/POPSTACK, but actually it
should not have to, as XSUBs may reallocate the stack and pp_entersub
already accounts for that.  What seems to be the problem is that
Data::Clone is not protecting itself.  The code in question is:

clone(SV* sv)
    ST(0) = sv_clone(sv);

where sv_clone can reallocate the stack.  That line translates into:

    PL_stack_base[ax + (0)] = Data_Clone_sv_clone( (sv));

Does the C standard guarantee any execution order here?  (According
to Perl execution order, that code would actually work.  According to
JavaScript execution order, it is completely broken.)

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About