nayakgi / perl-compiler

Automatically exported from code.google.com/p/perl-compiler
Other
0 stars 0 forks source link

t/CORE/cmd/while.t fails in save_magic with empty SV ptr in HEf_SVKEY #370

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
$ perl -Ilib t/C-COMPILED/CORE--cmd--while.t
1..23
ok 1 - t/CORE/cmd/while.t exists
ok 2 - Not in taint mode
ok 3 - /usr/local/cpanel/3rdparty/perl/520/bin/perl -c  t/CORE/cmd/while.t
# Can't call method "save" on an undefined value at blib/lib/B/C.pm line 2900.
# CHECK failed--call queue aborted.
not ok 4 - t/CORE/cmd/while.c is generated (-O0)

#   Failed test 't/CORE/cmd/while.c is generated (-O0)'
#   at t/C-COMPILED/CORE--cmd--while.t line 84.
ok 5 # skip Can't test further due to failure to create a c file.
ok 6 # skip Can't test further due to failure to create a c file.
ok 7 # skip Can't test further due to failure to create a c file.
ok 8 # skip Can't test further due to failure to create a c file.
ok 9 # skip Can't test further due to failure to create a c file.
ok 10 # skip Can't test further due to failure to create a c file.
ok 11 # skip Can't test further due to failure to create a c file.
ok 12 # skip Can't test further due to failure to create a c file.
ok 13 # skip Can't test further due to failure to create a c file.
# Can't call method "save" on an undefined value at blib/lib/B/C.pm line 2900.
# CHECK failed--call queue aborted.
not ok 14 - t/CORE/cmd/while.c is generated (-O3)

#   Failed test 't/CORE/cmd/while.c is generated (-O3)'
#   at t/C-COMPILED/CORE--cmd--while.t line 84.
ok 15 # skip Can't test further due to failure to create a c file.
ok 16 # skip Can't test further due to failure to create a c file.
ok 17 # skip Can't test further due to failure to create a c file.
ok 18 # skip Can't test further due to failure to create a c file.
ok 19 # skip Can't test further due to failure to create a c file.
ok 20 # skip Can't test further due to failure to create a c file.
ok 21 # skip Can't test further due to failure to create a c file.
ok 22 # skip Can't test further due to failure to create a c file.
ok 23 # skip Can't test further due to failure to create a c file.
# Looks like you failed 2 tests of 23.

Original issue reported on code.google.com by erin.schoenhals on 14 Aug 2014 at 9:22

GoogleCodeExporter commented 9 years ago
caught with the 5.20 core test t/CORE/cmd/while.t
but repro with the current testfile also:

$ perl5.20.0d-nt -Mblib -S script/perlcc t/CORE/cmd/while.t 
script/perlcc: Unexpected compiler output
Can't call method "save" on an undefined value at blib/lib/B/C.pm line 2900.
 CHECK failed--call queue aborted.

Original comment by reini.urban on 14 Aug 2014 at 10:19

GoogleCodeExporter commented 9 years ago
with -v6: it's the new ` magic

 saving magic for PVMG main::` (0xd64720) flags=0x600007()  - called from B::PVMG::save:4138
 main::` '\000' magic
 GV 0xd64750 already saved as gv_list[50]
 Can't call method "save" on an undefined value at blib/lib/B/C.pm line 2900.
 CHECK failed--call queue aborted.

Original comment by reini.urban on 14 Aug 2014 at 10:21

GoogleCodeExporter commented 9 years ago
Fixed with 1.51_01: 

commit 51235acf6ddd53e0dc4ea453e31325859db6e02a
Author: Reini Urban <rurban@cpanel.net>
Date:   Thu Aug 14 17:25:29 2014 -0500

    C: fix issue 370, protect against empty SV magic

    HEf_SVKEY might store an empty SV (NULL) since 5.20 for the \0 magic with the ` symbol.

Original comment by reini.urban on 14 Aug 2014 at 10:26