From 257c1a92568c276cb401195ec41940c145876cbf Mon Sep 17 00:00:00 2001 From: Nicolas Rochelemagne Date: Fri, 6 Jan 2023 19:22:23 -0500 Subject: [PATCH] Init empty arrays using INITAv This is an issue where the EXPORT_FAIL arrays are not initialized properly. Refs: CPANEL-42007 (cherry picked from commit ace2447249a0c2bfc2c463caa8ae29c8a008002a) Signed-off-by: Nicolas Rochelemagne --- lib/B/C/OverLoad/B/AV.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/B/C/OverLoad/B/AV.pm b/lib/B/C/OverLoad/B/AV.pm index b26b68f43..afc4eaf43 100644 --- a/lib/B/C/OverLoad/B/AV.pm +++ b/lib/B/C/OverLoad/B/AV.pm @@ -191,7 +191,7 @@ sub do_save ( $av, $fullname = undef, $cv = undef, $is_backref = 0 ) { } else { my $max = $av->MAX; - init()->sadd( "av_extend(%s, %d);", $sym, $max ) if $max > -1; + $av->add_to_init( $sym, '', $fill, $fullname ) if $max > -1; } $av->update_sv( $ix, $fullname, { fill => $fill } ); # could be using PADLIST, PADNAMELIST, or AV method for this.