develooper Front page | perl.perl5.porters | Postings from July 2005

[perl #34450] Coding defect in Perl_newFOROP causing Access Violation

From:
Steve Peters via RT
Date:
July 14, 2005 20:39
Subject:
[perl #34450] Coding defect in Perl_newFOROP causing Access Violation
Message ID:
rt-3.0.11-34450-117427.1.57122870588871@perl.org
> [John_Sargent@McAfee.com - Wed Mar 16 06:02:13 2005]:
> 
> If scalar(sv) is null (not sure why it would be off hand), and expr is
> not 
> a list type, append will just return the expr object, which is not of
> type
> OP_LIST. Perl_convert will then return a new LISTOP. 
> 
> The crash is because the code casts a LISTOP to a LOOP which is bigger
> as Copy
> takes the expected type as an argument, and assumes the data size from
> that
> rather than the actual size of the data.
> 
> 
> 
> -----Original Message-----
> From: Rafael Garcia-Suarez via RT [mailto:perlbug-followup@perl.org] 
> Sent: 16 March 2005 12:02
> To: Sargent, John
> Subject: Re: [perl #34450] Coding defect in Perl_newFOROP causing Access
> Violation
> 
> 
> Sargent, John wrote:
> > In op.c, line 3856 (ish) the cast to a LOOP* is incorrect. in that the
> > memory allocated inside Perl_convert when the OP type is NOT OP_LIST
> is 
> 
> I can't figure out a case where this wouldn't be a list op.
> Have you code to reproduce this ?
> 

Let me clarify.  Do you have any Perl and/or XS code that demonstrates this problem?



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