This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: After AvARRAY(), don't use av_store
authorKarl Williamson <khw@cpan.org>
Thu, 27 Jun 2019 15:49:33 +0000 (09:49 -0600)
committerKarl Williamson <khw@cpan.org>
Sat, 7 Dec 2019 22:57:18 +0000 (15:57 -0700)
We are manimpulating the array directly here, so don't revert to going
through the regular interface, as not all the hand-offs have been done

regcomp.c

index ea617db..8a6ea89 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -19763,7 +19763,7 @@ Perl__get_regclass_nonbitmap_data(pTHX_ const regexp *prog,
                     STATIC_ASSERT_STMT(ONLY_LOCALE_MATCHES_INDEX == 1 + INVLIST_INDEX);
                     STATIC_ASSERT_STMT(DEFERRED_USER_DEFINED_INDEX == 1 + ONLY_LOCALE_MATCHES_INDEX);
 
                     STATIC_ASSERT_STMT(ONLY_LOCALE_MATCHES_INDEX == 1 + INVLIST_INDEX);
                     STATIC_ASSERT_STMT(DEFERRED_USER_DEFINED_INDEX == 1 + ONLY_LOCALE_MATCHES_INDEX);
 
-                    av_store(av, INVLIST_INDEX, invlist);
+                    ary[INVLIST_INDEX] = invlist;
                     av_fill(av, (ary[ONLY_LOCALE_MATCHES_INDEX])
                                  ? ONLY_LOCALE_MATCHES_INDEX
                                  : INVLIST_INDEX);
                     av_fill(av, (ary[ONLY_LOCALE_MATCHES_INDEX])
                                  ? ONLY_LOCALE_MATCHES_INDEX
                                  : INVLIST_INDEX);