Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit b70a30e

Browse files
Father ChrysostomosReini Urban
authored andcommitted
[perl #128238] Crash with non-stash in stash
This is a follow-up to e7acdfe. Even if the name of the stash entry ends with ::, it may not itself contain a real stash (though this only happens with code that assigns directly to stash entries, which has undefined behaviour according to perlmod), so skip hashes that are not stashes.
1 parent 71e8558 commit b70a30e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2438,10 +2438,10 @@ Perl_gv_check(pTHX_ HV *stash)
24382438

24392439
PERL_ARGS_ASSERT_GV_CHECK;
24402440

2441-
if (!HvARRAY(stash))
2441+
if (!SvOOK(stash))
24422442
return;
24432443

2444-
assert(SvOOK(stash));
2444+
assert(HvARRAY(stash));
24452445

24462446
for (i = 0; i <= (I32) HvMAX(stash); i++) {
24472447
const HE *entry;

0 commit comments

Comments
 (0)