Alejandro Santillan Iturres wrote: >>It seems to me that when you get a warning, you're doing something wrong >>or it wasn't coded to take all possibilities into consideration - so I >>never turn off warnings or strict. I already found two legit bugs in that >>module, so I'm guessing there are more to find. > > > I agree about the warnings. I've added something to the code ( I am > attaching the script I've used): > > open(OUT,">output.txt") or die; > foreach (sort {$a <=> $b} keys %memlist){ > print OUT "\nContent of $_ -> $memlist{$_}\n"; > print OUT $proc->hexdump($_, $memlist{$_})."\n"; > } > close(OUT); > > And finally I think I get the reason for the warning: > when reading a chunk of memory it appears this error on the output to a file > (whereas in the screen output it wasn't readable): > > Content of 995328 -> 249856 > Err: length is too long! > > Content of 1245184 -> 4096 > 00130000 : 41 63 74 78 20 00 00 00 01 00 00 00 3C 05 00 00 : Actx > ........<... > 00130010 : 7C 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 : |....... > ........ > 00130020 : 14 00 00 00 01 00 00 00 03 00 00 00 34 00 00 00 : > .............4... > etc.. > > So I think that the chunk size exceeds some buffer capacity. I don't > understand the inner workings of > Memory.pm so I am not able to say more.
All you have to do is look : sub hexdump { my ( $this, $from, $len ) = @_; return "Err: length is too long!" if $len > 65536; He apparently restricted the len to 16 bits for some reason. You can try : 1) Changing the 65536 to 2 ** 32 (or maybe somewhere in between). or 2) Add another loop in your code to loop over 65K at a time - something like this untested code: my $len = $memlist{$_}; my $bytes = $len > 65536 ? 65536 : $len; for (my $off = 0; $off < $len; $off += 65536) { print OUT $proc->hexdump($_+$off, $bytes) . "\n"; $bytes += 65536; } -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff) _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs