BrowserUK++
Same results here. Makes you wonder if there are any more 'issues'.
As far as I can tell 0.94 is the most recent version. I use DBM::Deep because it is the only one I could find that I could run/test locally and on my ISP's server (it is pure Perl).
Apart from this it's been just the ticket.
Many thanks for your help. | [reply] |
Hello, this is Joseph Huckaby, author of DBM::Deep. I was able to reproduce the crash in WinXP ActivePerl 5.8.7 + Net::FTP WITHOUT using DBM::Deep at all. All you have to do is:
#!/usr/bin/perl
use strict;
use warnings;
use Net::FTP;
$| = 1;
my $words_all = {
kosovar => [qw(33 35 28 44)],
};
my %pack;
while (my ($word, $url_list) = each %{$words_all}){
my $url_list_packed = pack 'v*', @{$url_list};
$pack{$word} = $url_list_packed;
}
warn "calling isa on kosovar\n";
warn UNIVERSAL::isa($pack{'kosovar'}, "ARRAY") . "\n";
warn "you should never see this, because it crashed.\n";
The crash occurs when you call isa() on the kosovar key in the hash. This should be a perfectly valid call, which should return true. Instead, it crashes the VM.
I conclude that this is probably a bug in Net::FTP, or ActiveState Perl on WinXP.
| [reply] [d/l] |
Then you have my apologies for casting errant aspersions. It certainly looked like a DBM::Deep bug. Very nice module BTW.
This should be a perfectly valid call, which should return true.
Actually not. pack 'v*', 33, 35, 28, 44; is just a scalar containing some binary data. Still, it shouldn't crash when you pass it to UNIVERSAL::isa()
The problem isn't directly the fault of Net::FTP either, though it may be related, as the bug also manifests in the presence of IO::Socket. This also crashes, and again, only when a value of 33 is packed and passed:
P:\test>p1
perl> use IO::Socket;;
perl> print $_, UNIVERSAL::isa( pack( 'v*', $_ ), 'SCALAR' ) for 0 ..
+33;;
0
1
2
[...]
30
31
32
P:\test>rem It segfaulted.
So the bug appears to be that UNIVERAL::isa() attempts to use the passed value as a reference, and dies if you pass it binary data that isn't--but only if it is/contains "dirty knee", 33! And only if some networking module is loaded? Beyond that is the province of the internals guys.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
| [reply] [d/l] [select] |
| [reply] |