Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: "double free or corruption" in Perl 5.16.0 but not in 5.14.2

by Khen1950fx (Canon)
on Sep 21, 2012 at 03:22 UTC ( #994801=note: print w/replies, xml ) Need Help??

in reply to "double free or corruption" in Perl 5.16.0 but not in 5.14.2

I couldn't replicate your problem, tested on 5.8x thru 5.17.4. At first, I thought the problem was with File::Glob; however, I kept getting an exception with chdir. It seems that there's a portability issue. I don't have fchdir, so I can't pass it a filehandle nor dirhandle without getting
chdir('') has been deprecated...
I stopped after this:
#!perl -l BEGIN { $| = 1; } use autodie; use strict 'refs'; use warnings FATAL => 'syntax'; use Data::Dumper::Concise; use File::Glob ':globally'; use Memoize; memoize('no_bug', LIST_CACHE => 'MEMORY'); no_bug(); sub no_bug { my(@md) = (1..305); my(@mp) = (1000..1205); print "market detail: ", scalar(@md); print "market price: ", scalar(@mp); my $path = '/tmp/xx'; foreach my $md(@md) { &open(my $f, '<', $path); &close($f); } foreach my $mp(@mp) { &open(my $f, '<', $path); &close($f); } chdir '/tmp/xx'; my(@sources) = <~$path/mp_*>, <~$path/md_* >; print Dumper(scalar @sources); }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994801]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2018-06-25 12:35 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.