The folowing code runs fine in activestate perl
5.6.1.635 but has a severe
memory leak in 5.8.3.809. I had to uninstall that
version and go back to
5.6.1 on my other machine. I've tried to send a bug
report like this but I
believe it did not go through\, so I am sending again
-> mycode:
# Usage: findTableRef parm_file input_dir output_file
# Parm file description:
# tttttttt
# where
# - ttttttttttt is a text pattern = object name.
#
# The programs allows virtually all legitimate Perl
patterns as text
# pattern
use strict;
use File::Find;
use Cwd;
our $fileP=$ARGV[0];
our $fileI=$ARGV[1];
our $fileO=$ARGV[2];
open (PARM\,"\< $fileP") or die "Can't open file $fileP
: $!\r\n";
our @regexes=();
our @opcodes =();
our $regex = " ";
while (\)
{
chomp;
my $inpat = $_ ;
push @regexes\, qr/\b$inpat\b/i;
}
close (PARM);
our $j = $#regexes;
open (OUT\,"> $fileO") or die "Can't open output file
$fileO : $!\r\n";
print OUT
"\"location\"\\,\"source_name\"\\,\"OWNER\"\\,\"OBJECT_NAME\"\\,\"environment\"\n";
find(\&edits\, $fileI);
close (OUT);
sub edits ()
{
return unless -f;
my $file = $_;
return if $file =~ /^\.\.?$/;
return if $file =~ /\.zip$/i;
return if $file =~ /\.xls$/i;
return if $file =~ /\.csv$/i;
return if $file =~ /\STARS_PD/;
return if $file =~ /atls_.am\.txt/;
return if $file =~ /atls_.nz\.txt/;
return if $file =~ /\.doc$/i;
return if $file =~ /\.exe$/i;
return if $file =~ /employee_atlas\.txt/;
return if $file =~ /AtlasWeb\.ear/i;
return if $file =~ /AtlasWeb.war\~/i;
return if !open (SOURCE\, $file);
my $pathname = getcwd;
return if $pathname =~
m#/OLD/|/OLD$|/BAK/|/BAK$|/UNUSED/|/UNUSED$|/BK/|/BK$/|/WIN/|/WIN$#i;
print "$pathname/$file\n";
#while (\
On Sun\, Mar 14\, 2004 at 05:19:42AM -0000\, Ze'ev Atlas (via RT) wrote:
The folowing code runs fine in activestate perl
5.6.1.635 but has a severe
memory leak in 5.8.3.809. I had to uninstall that
version and go back to
5.6.1 on my other machine.
Thanks for the report; however\, you have not given us enough information
to reproduce the bug. Your code relies on the existence of a a parm_file
and a directory structure; would it be possible to proviide the file\, and
details of the directory structure\, (possibly by placing a tar or zip file
of the directory on a web server somewhere)
Also\, and very importantly\, would it be possible for you to reduce your
code to the barest minimum that still exhibits the leak. For example is it
the find() that creates the leak\, or all the code executed for each file?
Dave.
I've tried to send a bug
report like this but I
believe it did not go through\, so I am sending again
-> mycode:
# Usage: findTableRef parm_file input_dir output_file
# Parm file description:
# tttttttt
# where
# - ttttttttttt is a text pattern = object name.
#
# The programs allows virtually all legitimate Perl
patterns as text
# pattern
use strict;
use File::Find;
use Cwd;
our $fileP=$ARGV[0];
our $fileI=$ARGV[1];
our $fileO=$ARGV[2];
open (PARM\,"\< $fileP") or die "Can't open file $fileP
: $!\r\n";
our @regexes=();
our @opcodes =();
our $regex = " ";
while (\)
{
chomp;
my $inpat = $_ ;
push @regexes\, qr/\b$inpat\b/i;
}
close (PARM);
our $j = $#regexes;
open (OUT\,"> $fileO") or die "Can't open output file
$fileO : $!\r\n";
print OUT
"\"location\"\\,\"source_name\"\\,\"OWNER\"\\,\"OBJECT_NAME\"\\,\"environment\"\n";
find(\&edits\, $fileI);
close (OUT);
sub edits ()
{
return unless -f;
my $file = $_;
return if $file =~ /^\.\.?$/;
return if $file =~ /\.zip$/i;
return if $file =~ /\.xls$/i;
return if $file =~ /\.csv$/i;
return if $file =~ /\STARS_PD/;
return if $file =~ /atls_.am\.txt/;
return if $file =~ /atls_.nz\.txt/;
return if $file =~ /\.doc$/i;
return if $file =~ /\.exe$/i;
return if $file =~ /employee_atlas\.txt/;
return if $file =~ /AtlasWeb\.ear/i;
return if $file =~ /AtlasWeb.war\~/i;
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=high
---
Site configuration information for perl v5.8.3:
Configured by ActiveState at Tue Feb 3 00:28:38 2004.
Locally applied patches:
ACTIVEPERL_LOCAL_PATCHES_ENTRY
22218 Remove the caveat about detached threads
crashing on Windows
22201 Avoid threads+win32 crash by freeing Perl
interpreter slightly later
22169 Display 'out of memeory' errors using
low-level I/O
22159 Upgrade to Time::Hires 1.55
22120 Make 'Configure -Dcf_by=...' work
22051 Upgrade to Time::HiRes 1.54
21540 Fix backward-compatibility issues in if.pm
---
@INC for perl v5.8.3:
C:/Perl/lib
C:/Perl/site/lib
.
---
Environment for perl v5.8.3:
HOME (unset)
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=C:\Tcl\bin;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
files\PC-Doctor for Windows XP\WINDSAPI
PERL_BADLANG (unset)
SHELL (unset)
__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable\, more storage\, less spam
http://mail.yahoo.com
--
Lady Nancy Astor: If you were my husband\, I would flavour your coffee
with poison.
Churchill: Madam - if I were your husband\, I would drink it.
Hi
I will try to provide it in the next 3 days
Thanks for the response
ZA
--- Dave Mitchell via RT \perlbug\-followup@​perl\.org
wrote:
On Sun\, Mar 14\, 2004 at 05:19:42AM -0000\, Ze'ev
Atlas (via RT) wrote:
The folowing code runs fine in activestate perl
5.6.1.635 but has a severe
memory leak in 5.8.3.809. I had to uninstall
that
version and go back to
5.6.1 on my other machine.
Thanks for the report; however\, you have not given
us enough information
to reproduce the bug. Your code relies on the
existence of a a parm_file
and a directory structure; would it be possible to
proviide the file\, and
details of the directory structure\, (possibly by
placing a tar or zip file
of the directory on a web server somewhere)
Also\, and very importantly\, would it be possible for
you to reduce your
code to the barest minimum that still exhibits the
leak. For example is it
the find() that creates the leak\, or all the code
executed for each file?
Dave.
I've tried to send a bug
report like this but I
believe it did not go through\, so I am sending
again
-> mycode:
# Usage: findTableRef parm_file input_dir
output_file
# Parm file description:
# tttttttt
# where
# - ttttttttttt is a text pattern = object name.
#
# The programs allows virtually all legitimate
Perl
patterns as text
# pattern
use strict;
use File::Find;
use Cwd;
our $fileP=$ARGV[0];
our $fileI=$ARGV[1];
our $fileO=$ARGV[2];
open (PARM\,"\< $fileP") or die "Can't open file
$fileP
: $!\r\n";
our @regexes=();
our @opcodes =();
our $regex = " ";
while (\)
{
chomp;
my $inpat = $_ ;
push @regexes\, qr/\b$inpat\b/i;
}
close (PARM);
our $j = $#regexes;
open (OUT\,"> $fileO") or die "Can't open output
file
$fileO : $!\r\n";
print OUT
Migrated from rt.perl.org#27627 (status was 'rejected')
Searchable as RT27627$