develooper Front page | perl.perl5.porters | Postings from October 2015

[perl #126145] Problem with stack moving fix for Perl_load_module

Thread Previous | Thread Next
From:
bulk88 via RT
Date:
October 6, 2015 19:54
Subject:
[perl #126145] Problem with stack moving fix for Perl_load_module
Message ID:
rt-4.0.18-1374-1444161230-198.126145-15-0@perl.org
On Tue Oct 06 06:32:12 2015, davem wrote:
> It appears to be a bug in Sub::Attribute (note that this modules is at
> v0.05 and was least released 5 years ago, so it might not be actively
> maintained).
> 
> At one point it does:
> 
>     PL_stack_sp -= call_sv(method, G_VOID | G_EVAL);
> 
> If the stack happens to to be grown and reallocated during the call to
> call_sv(), then the new value of PL_stack_sp is overwritten with the
> *old* value less whatever call_sv returns.
> 
> It probably needs to be rewritten as:
> 
>     I32 retcount;
> 
>     retcount = call_sv(method, G_VOID | G_EVAL);
>     PL_stack_sp -= retcount;
> 
> or possibly
> 
>     retcount = call_sv(method, G_VOID | G_EVAL | G_DISCARD);
> 

Remind me of problem described in https://rt.cpan.org/Public/Bug/Display.html?id=92570

-- 
bulk88 ~ bulk88 at hotmail.com

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=126145

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