Subject: | Adding unblessed references to a weak set causes a segfault |
The following program causes Perl to crash with a segmentation fault, no other error message displayed:
use Set::Object qw/weak_set/;
my $n = 1;
my $a = \$n;
my $set1 = weak_set();
$set1->insert($a);
The defining factor seems to be that the object that $a refers to is unblessed when added to the set. Expected behaviour is for the object to be added to the set without a segfault.
Tested with Set::Object 1.27, perl version 5.10.0, on Linux (2.6.31-17, packaged in Ubuntu Karmic).