This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix @ISA recursion during global destruction
authorFather Chrysostomos <sprout@cpan.org>
Mon, 25 Oct 2010 21:48:56 +0000 (14:48 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 25 Oct 2010 23:16:34 +0000 (16:16 -0700)
commite0a523956a6a1b27028abe71c6dee3628fa57e63
tree764073abf8f87acb4433d899402b9603e045892f
parent60b22aca14742ead2388ca3c7bb4b542a2d9a4b1
Fix @ISA recursion during global destruction

With -DDEBUGGING and make test (not make test_harness):

Failed 3 tests out of 1889, 99.84% okay.
mro/basic.t
mro/recursion_c3.t
mro/recursion_dfs.t

See <http://www.nntp.perl.org/group/perl.perl5.porters/2010/10/msg165311.html>.

This was broken by change 35759254, which made S_hv_delete_common call
mro_package_moved when the G_DISCARD flag was passed. It used to be
skipped, which was a mistake.

This commit simply skips mro_package_moved when $::{"main::"} is
deleted. It was buggy anyway (main::E being passed to recursive calls,
instead of E), and should only happen at global destruction. (If
$::{"main::"} is deleted at run-time, it stop Perl from being func-
tional, so no one should be doing that.)
hv.c