Hello again,

I think I found the construct that causes these segfaults.
Things like

my %b : shared;
$b{a} = &share( { a => 1, b => 2 });

tend to lead to these crashes.

Also note this bug:

#!/usr/bin/perl -w
use threads;
use threads::shared;
use Data::Dumper;

my %b : shared;
my %tmp : shared = ( a => 1, b => 2 );
$b{a} = \%tmp;
$b{b} = &share( { a => 1, b => 2 } ); # no error, but ...

print Dumper(\%b);

============8<==============

The output of this script:

$VAR1 = {
          'a' => {
                   'a' => '1',
                   'b' => '2'
                 },
          'b' => {}
        };

Note that the key 'b' contains an empty hash reference.
The content is missing.

-Sven

Reply via email to