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
From:
Father Chrysostomos
Date:
January 30, 2014 04:38
Subject:
Re: [perl #120626] Bleadperl v5.19.6-22-gebdc880 breaks GWILLIAMS/RDF-Trine-1.007.tar.gz
Message ID:
20140130043847.18486.qmail@lists-nntp.develooper.com
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:

void
clone(SV* sv)
CODE:
{
    ST(0) = sv_clone(sv);
    XSRETURN(1);
}

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


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