Subject: | Variable::Magic + fork crashes on 5.10.0/Win32 |
Date: | Sun, 31 May 2009 10:07:19 +0200 |
To: | bug-Variable-Magic [...] rt.cpan.org |
From: | kmx <kmx [...] volny.cz> |
Hi,
the following script:
---
1: use Variable::Magic qw/wizard cast/;
2: my $wiz = wizard set => sub { print "now set to ${$_[0]}!\n" };
3:
4: if (my $p = fork ) {
5: print "After fork 1: $$\n";
6: }
7: else {
8: print "After fork 2: $$\n";
9: }
---
crashes during "fork" call on win32/strawberry perl 5.10.0.4 & 5.10.0.5
with error: perl.exe fails with error "The instruction at address
0x6a72c777 referenced memory at address 0x00000004. The memory could not
be read". If I comment out the second line it works fine.
On Win32 Active state perl 5.10 the program (fork call) does not work
but program just silently ends (without crash).
The same script works fine on win32/strawberry perl 5.8.9.0 & 5.8.9.1 -
also no problems on UNIX perls (I have tested Linux - perl 5.8 and 5.10)
To be honest I am not sure if this is a bug in Variable::Magic or perl
core 510 for Win32. Here is some dubug info:
(gdb) run test.pl
Starting program: D:\strawberry\perl\bin\perl.exe test.pl
[New thread 1680.0xebc]
...
Program received signal SIGSEGV, Segmentation fault.
0x6a72c777 in perl510!Perl_ptr_table_new () from
D:\strawberry\perl\bin\perl510.dll
(gdb) backtrace full
#0 0x6a72c777 in perl510!Perl_ptr_table_new () from
D:\strawberry\perl\bin\perl510.dll
No symbol table info available.
#1 0x6a72c7ae in perl510!Perl_ptr_table_fetch () from
D:\strawberry\perl\bin\perl510.dll
No symbol table info available.
#2 0x6a72cb48 in perl510!Perl_sv_dup () from
D:\strawberry\perl\bin\perl510.dll
No symbol table info available.
#3 0x2e4f11ad in ?? () from
D:\strawberry\perl\site\lib\auto\Variable\Magic\Magic.dll
No symbol table info available.
#4 0x009f2324 in ?? ()
No symbol table info available.
#5 0x009eb0a4 in ?? ()
No symbol table info available.
#6 0x0022f7d0 in ?? ()
No symbol table info available.
#7 0x6a76509f in perl510!Perl_safesysmalloc () from
D:\strawberry\perl\bin\perl510.dll
No symbol table info available.
#8 0x2e4f3346 in ?? () from
D:\strawberry\perl\site\lib\auto\Variable\Magic\Magic.dll
No symbol table info available.
#9 0x003f4764 in ?? ()
No symbol table info available.
#10 0x00a373dc in ?? ()
No symbol table info available.
#11 0x00000000 in ?? ()
No symbol table info available.
(gdb)
--
kmx