Subject: | require Variable::Magic VS use Variable::Magic |
Hello,
we investigate a strange segfault problem in Dios (see https://rt.cpan.org/Ticket/Display.html?id=123015) and i can reproduce this segfault in Variable::Magic by a simple "require Variable::Magic;".
$ perl -e 'require Variable::Magic; my $s = "test"; Variable::Magic::cast($s, Variable::Magic::wizard(set => sub { print STDERR "TEST\n"; })); $s = "demo";'
Speicherzugriffsfehler (Speicherabzug geschrieben)
$ perl -e 'use Variable::Magic; my $s = "test"; Variable::Magic::cast($s, Variable::Magic::wizard(set => sub { print STDERR "TEST\n"; })); $s = "demo";'
TEST
I can reproduce this behavior in all major perls since 5.14 (not tested below this version) under Ubuntu 16.04 build with perlbrew. Also with 5.28.0 on a FreeBSD with perlbrew.
Have a nice day
Felix
Also someone find a problem with a SvRV() call on a non-reference, please investigate this too (see the linked ticket).