develooper Front page | perl.perl5.porters | Postings from August 2013

[perl #117855] Excessive memory waste from duplicate CopFILE in threaded perl

Thread Next
From:
Father Chrysostomos via RT
Date:
August 3, 2013 21:31
Subject:
[perl #117855] Excessive memory waste from duplicate CopFILE in threaded perl
Message ID:
rt-3.6.HEAD-2552-1375565466-371.117855-15-0@perl.org
On Wed Jul 31 02:46:54 2013, timbo wrote:
> I think it's worth it but let's check it out some more first.

A bug that used to occur only under non-threaded builds can now happen
under threads, too:

$ ./perl -Ilib -e 'BEGIN{${"_<-e"}=\1} warn __FILE__'
??C? at ??C? line 1.

It looks as though the solution is to change

#define CopFILE(c)		(CopFILEGV(c) && GvSV(CopFILEGV(c)) \
				    ? SvPVX(GvSV(CopFILEGV(c))) : NULL)

to

#define CopFILE(c)		(CopFILEGV(c) && GvSV(CopFILEGV(c)) \
				    ? SvPVX(GvSV(CopFILEGV(c))) : NULL)

but I have another idea that might simplify the code and reduce memory
usage even more....

Where do I put tests for things like that __FILE__ bug? 
t/comp/retainedlines.t has similar tests for CopFILEGV stuff, but
__FILE__ has nothing to do with retained lines.

-- 

Father Chrysostomos


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

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