X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/06f3ce8671cf9695edecc29f8df95fec541d24ed..42581d5d97e4a9547642d444e528041b0030a32d:/mro.c diff --git a/mro.c b/mro.c index ec0fb60..115da8b 100644 --- a/mro.c +++ b/mro.c @@ -830,7 +830,7 @@ S_mro_gather_and_rename(pTHX_ HV * const stashes, HV * const seen_stashes, register XPVHV* xhv; register HE *entry; I32 riter = -1; - I32 items; + I32 items = 0; const bool stash_had_name = stash && HvENAME(stash); bool fetched_isarev = FALSE; HV *seen = NULL; @@ -939,7 +939,7 @@ S_mro_gather_and_rename(pTHX_ HV * const stashes, HV * const seen_stashes, * mro_isa_changed_in called on it. That happens if it was * detached from the symbol table (so it had no HvENAME) before * being assigned to the spot named by the ‘name’ variable, because - * its cached isa linerisation is now stale (the effective name + * its cached isa linearisation is now stale (the effective name * having changed), and subclasses will then use that cache when * mro_package_moved calls mro_isa_changed_in. (See * [perl #77358].) @@ -992,6 +992,7 @@ S_mro_gather_and_rename(pTHX_ HV * const stashes, HV * const seen_stashes, it, so subclasses could be listed in isarev hashes belonging to any of the names, so we have to check all of them. */ + assert(!oldstash || HvENAME(oldstash)); if (oldstash) { /* Extra variable to avoid a compiler warning */ char * const hvename = HvENAME(oldstash);