CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Wed, 30 Jul 2025 10:06:32 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20230203194934
location: https://web.archive.org/web/20230203194934/https://perl5.git.perl.org/perl5.git/log/HEAD
server-timing: captures_list;dur=0.567719, exclusion.robots;dur=0.019804, exclusion.robots.policy;dur=0.009056, esindex;dur=0.012713, cdx.remote;dur=413.981905, LoadShardBlock;dur=285.440845, PetaboxLoader3.datanode;dur=159.215383, PetaboxLoader3.resolve;dur=79.689881
x-app-server: wwwb-app203
x-ts: 302
x-tr: 734
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: SERVER=wwwb-app203; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Wed, 30 Jul 2025 10:06:33 GMT
content-type: application/xhtml+xml; charset=utf-8
x-archive-orig-date: Fri, 03 Feb 2023 19:49:34 GMT
x-archive-orig-server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips
x-archive-orig-keep-alive: timeout=5, max=100
x-archive-orig-connection: Keep-Alive
x-archive-orig-x-crawler-transfer-encoding: chunked
x-archive-orig-content-length: 141592
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: iso-8859-1
memento-datetime: Fri, 03 Feb 2023 19:49:34 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Tue, 19 Jan 2021 15:12:01 GMT", ; rel="prev memento"; datetime="Wed, 26 Jan 2022 20:49:17 GMT", ; rel="memento"; datetime="Fri, 03 Feb 2023 19:49:34 GMT", ; rel="last memento"; datetime="Fri, 03 Feb 2023 19:49:34 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: CC-MAIN-2023-06-1674764500074.73-0036/CC-MAIN-20230203185547-20230203215547-00726.warc.gz
server-timing: captures_list;dur=0.495600, exclusion.robots;dur=0.017069, exclusion.robots.policy;dur=0.008136, esindex;dur=0.008665, cdx.remote;dur=195.625931, LoadShardBlock;dur=146.256763, PetaboxLoader3.datanode;dur=134.803157, load_resource;dur=330.097347, PetaboxLoader3.resolve;dur=246.811932
x-app-server: wwwb-app203
x-ts: 200
x-tr: 939
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
perl5.git.perl.org Git - perl5.git/log
This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Correct code-like snippet in documentation
Make it a close-bracket to pair with open-bracket.
Bump $VERSION in Math-Complex .pm files to keep porting tests happy.
Make it a close-bracket to pair with open-bracket.
Bump $VERSION in Math-Complex .pm files to keep porting tests happy.
t/29a_upcopy.t - under parallel builds allow more time for test
Karl has reported that he has issues with t/29a_upcopy.t under parallel
builds. I can not see any file based race conditions, but I can see code using
alarm around a test I can easily imagine would be too short for a loaded box
running many tests in parallel. This patch allows the test to use 20 seconds
instead of 10 if TEST_JOBS or HARNESS_OPTIONS are defined in the environment.
Hopefully this fixes tests on Karls box.
In a previous commit Dave M raised this from 5 to 10 seconds, so lets double
it again and see if Karls errors go away.
In an abundance of caution I also adjusted the other two cases of using
alarm() in this file to use the same logic and produce similar style
error messages.
Karl has reported that he has issues with t/29a_upcopy.t under parallel
builds. I can not see any file based race conditions, but I can see code using
alarm around a test I can easily imagine would be too short for a loaded box
running many tests in parallel. This patch allows the test to use 20 seconds
instead of 10 if TEST_JOBS or HARNESS_OPTIONS are defined in the environment.
Hopefully this fixes tests on Karls box.
In a previous commit Dave M raised this from 5 to 10 seconds, so lets double
it again and see if Karls errors go away.
In an abundance of caution I also adjusted the other two cases of using
alarm() in this file to use the same logic and produce similar style
error messages.
embed.pl - the 's', 'S', 'i' and 'I' flags are mutually exclusive
We had a bug where we processed the first one in the flags definition. Sorting
the flags or rearranging them changes the output, which shouldn't happen.
This also fixes the handling and specification of PerlEnv_putenv(), which was
marked "si" when it should have been marked "i". This required changing its
implementation from a Perl_ prefix to a S_ prefix and regenerating.
I have run embed.pl in a loop with a local patch to shuffle the flags to see
if there were any other order dependencies. No output files changed so I
assume with this patch we are free of such bugs.
We had a bug where we processed the first one in the flags definition. Sorting
the flags or rearranging them changes the output, which shouldn't happen.
This also fixes the handling and specification of PerlEnv_putenv(), which was
marked "si" when it should have been marked "i". This required changing its
implementation from a Perl_ prefix to a S_ prefix and regenerating.
I have run embed.pl in a loop with a local patch to shuffle the flags to see
if there were any other order dependencies. No output files changed so I
assume with this patch we are free of such bugs.
File-Find/t - rework tempdir creation and cleanup
Fixes #20734 - in a previous patch I missed the early cleanup call
and the fact that it could result in a race condition. This hopefully
resolves the problem.
These tests files are pretty crufty. It would be nice to see them split
apart so that the "sanity" checks which expect to be run in t/ are
executed in a separate test files from the checks which build a tree to
traverse for testing. A perfect task for a new contributor.
Fixes #20734 - in a previous patch I missed the early cleanup call
and the fact that it could result in a race condition. This hopefully
resolves the problem.
These tests files are pretty crufty. It would be nice to see them split
apart so that the "sanity" checks which expect to be run in t/ are
executed in a separate test files from the checks which build a tree to
traverse for testing. A perfect task for a new contributor.
UNIVERSAL.pm - Use lexical variables in Synopsis
Add `my`, and name variables differently to avoid confusion.
Add `my`, and name variables differently to avoid confusion.
Update autodie to CPAN version 2.36
[DELTA]
2.36 2023-01-30 16:48:23+00:00 UTC
* Remove the use of ' as a package separator.
* Fix spelling errors in POD.
[DELTA]
2.36 2023-01-30 16:48:23+00:00 UTC
* Remove the use of ' as a package separator.
* Fix spelling errors in POD.
Configure - fix handling of quoted gcc output
This patch was submitted in GH issue #20606. When gcc output contains
quoted elements we fail to handle it properly. This tweaks the sed
command to do so.
Fixes #20606.
This patch was submitted in GH issue #20606. When gcc output contains
quoted elements we fail to handle it properly. This tweaks the sed
command to do so.
Fixes #20606.
win32/*akefile - delete before rename
All of the other rename commands in win32/Makefile and win32/GNUmakefile
are guarded by a del statement. This does the equivalent for the
rename command that creates config.sh.
Fixes #20749.
All of the other rename commands in win32/Makefile and win32/GNUmakefile
are guarded by a del statement. This does the equivalent for the
rename command that creates config.sh.
Fixes #20749.
Update Memoize to 1.16
Make the new optree function declarations conditional on PERL_CORE|PERL_USE_VOLATILE_API
Expose {optimize,finalize}_optree() as real API functions
These are required by XS modules which want to create custom
LOGOP-shaped optrees, to ensure that both sides of the tree get
optimised and finalised.
See also
https://github.com/Perl/perl5/issues/20743
These are required by XS modules which want to create custom
LOGOP-shaped optrees, to ensure that both sides of the tree get
optimised and finalised.
See also
https://github.com/Perl/perl5/issues/20743
Update autodie to CPAN version 2.35
[DELTA]
2.35 2023-01-27 16:00:26+00:00 UTC
* Prepare for 5.38 changes to deprecate smartmatch
* Remove +x bit from pm and t files
* CI - Turn off Pod coverage and critic tests below 5.12
[DELTA]
2.35 2023-01-27 16:00:26+00:00 UTC
* Prepare for 5.38 changes to deprecate smartmatch
* Remove +x bit from pm and t files
* CI - Turn off Pod coverage and critic tests below 5.12
pp_hot.c - fix branch reset matches in list context
I am kinda surprised this issue was not picked up by one of our
other test files. I would have expected one of the t/re/regexp.t
based patches to validate list context matches populating the list
properly. But apparently not! So when I fixed branch reset in
fe5492d916201ce31a107839a36bcb1435fe7bf0 I missed the list context
logic. This fixes the oversight. Thanks to Andreas Koenig for the
BBC report on this.
This also changes the code to use SSize_t for various length related
operations, the original code was using I32 which might break on
very very long strings. Thanks to Tony C for pointing that out.
I am kinda surprised this issue was not picked up by one of our
other test files. I would have expected one of the t/re/regexp.t
based patches to validate list context matches populating the list
properly. But apparently not! So when I fixed branch reset in
fe5492d916201ce31a107839a36bcb1435fe7bf0 I missed the list context
logic. This fixes the oversight. Thanks to Andreas Koenig for the
BBC report on this.
This also changes the code to use SSize_t for various length related
operations, the original code was using I32 which might break on
very very long strings. Thanks to Tony C for pointing that out.
Add some closing parens I missed in the first pass
check the IO object exists when writing to IO magic variables
pp_select() ensures that the GV in PL_defoutgv has an IO object
when it the default output is set, but can't prevent that GV
being cleared afterwards, resulting in a seg fault when the
variable is written.
To prevent this, check PL_defoutgv has an IO object before trying
to write to it.
Fixes #20733
pp_select() ensures that the GV in PL_defoutgv has an IO object
when it the default output is set, but can't prevent that GV
being cleared afterwards, resulting in a seg fault when the
variable is written.
To prevent this, check PL_defoutgv has an IO object before trying
to write to it.
Fixes #20733
Put the example after the explanation
Add some examples to `unshift()` docs
dump.c - dump new regexp fields properly
Show the pointer values and their contents. Also show the "MOTHER_RE"
at the *end* of the dump, as otherwise it can be quite hard to read.
This patch also includes stripping out the versioned test adjustments
for regexp related dumps. Devel-Peek is in ext/ so it won't be used on
an older perl and we can just make it correct for the latest state.
The test for the dump of a branch reset pattern is also implicitly
tests whether branch reset pointer table logic is working correctly.
In the process of writing this patch I discovered there was an off by
one error. See 8111bf2fc3870f8146bb46652b66bd517e82b4dd for the fix.
Show the pointer values and their contents. Also show the "MOTHER_RE"
at the *end* of the dump, as otherwise it can be quite hard to read.
This patch also includes stripping out the versioned test adjustments
for regexp related dumps. Devel-Peek is in ext/ so it won't be used on
an older perl and we can just make it correct for the latest state.
The test for the dump of a branch reset pattern is also implicitly
tests whether branch reset pointer table logic is working correctly.
In the process of writing this patch I discovered there was an off by
one error. See 8111bf2fc3870f8146bb46652b66bd517e82b4dd for the fix.
hv_macro.h - fix comment
Some weird typos there, this fixes them to be correct.
Some weird typos there, this fixes them to be correct.
regcomp.c - fix fencepost error duping a regex
In fe5492d916201ce31a107839a36bcb1435fe7bf0 I made a fencepost error
copying the logical_to_parno and related data structures. They all needed a
+1 on their size as the paren counts (logical and physical) as they have
to account for capture buffer 0 which is always present which represents
the entire match.
In fe5492d916201ce31a107839a36bcb1435fe7bf0 I made a fencepost error
copying the logical_to_parno and related data structures. They all needed a
+1 on their size as the paren counts (logical and physical) as they have
to account for capture buffer 0 which is always present which represents
the entire match.
Prepare Module::CoreList for 5.37.9
bump version for 5.37.9
New perldelta for 5.37.9
tick release of 5.37.8 in Porting/release_schedule.pod
update epigraphs.pod
Merge branch 'release-5.37.8' into blead
bisect-runner docs: explain more about bisection
bisect-runner docs: modify example to use 'expect-fail'
Add new release to perlhist
finalize perldelta for 5.37.8
Update Module::CoreList for 5.37.8
Update copyright years
regexec.c - harden internals against missing logical_nparens
We can default a 0 rx->logical_nparens to rx->nparens. If rx->logical_nparens
is zero then either rx->nparens is also zero, or it can be defaulted. This
will fix most re::engine::XXX modules that do not know about the new field,
provided they zero the rx structure during construction. If they don't then
this patch won't hurt anything and we will have to patch them directly.
Also mark re_op_compile() as available to extensions. Marking it as hidden
means that re::engine::PCRE2 and others cannot build.
This patch should go a long way towards fixing issue #20710.
We can default a 0 rx->logical_nparens to rx->nparens. If rx->logical_nparens
is zero then either rx->nparens is also zero, or it can be defaulted. This
will fix most re::engine::XXX modules that do not know about the new field,
provided they zero the rx structure during construction. If they don't then
this patch won't hurt anything and we will have to patch them directly.
Also mark re_op_compile() as available to extensions. Marking it as hidden
means that re::engine::PCRE2 and others cannot build.
This patch should go a long way towards fixing issue #20710.
Export S_ISLNK and S_ISSOCK from POSIX.pm
They are already available in Fcntl.pm, from whence POSIX.pm already
gets all the other S_IS* macros, so this just adds them to the list
of imports (from Fcntl into POSIX) and exports (from POSIX)
They are already available in Fcntl.pm, from whence POSIX.pm already
gets all the other S_IS* macros, so this just adds them to the list
of imports (from Fcntl into POSIX) and exports (from POSIX)
update podlators to 5.01
Update IO::Zlib to 1.14
update Config::Perl::V to 0.35
update JSON::PP to 4.16
regcomp.c - add optimistic eval (*{ ... }) and (**{ ... })
This adds (*{ ... }) and (**{ ... }) as equivalents to (?{ ... }) and
(??{ ... }). The only difference being that the star variants are
"optimisitic" and are defined to never disable optimisations. This is
especially relevant now that use of (?{ ... }) prevents important
optimisations anywhere in the pattern, instead of the older and inconsistent
rules where it only affected the parts that contained the EVAL.
It is also very useful for injecting debugging style expressions to the
pattern to understand what the regex engine is actually doing. The older
style (?{ ... }) variants would change the regex engines behavior, meaning
this was not as effective a tool as it could have been.
Similarly it is now possible to test that a given regex optimisation
works correctly using (*{ ... }), which was not possible with (?{ ... }).
This adds (*{ ... }) and (**{ ... }) as equivalents to (?{ ... }) and
(??{ ... }). The only difference being that the star variants are
"optimisitic" and are defined to never disable optimisations. This is
especially relevant now that use of (?{ ... }) prevents important
optimisations anywhere in the pattern, instead of the older and inconsistent
rules where it only affected the parts that contained the EVAL.
It is also very useful for injecting debugging style expressions to the
pattern to understand what the regex engine is actually doing. The older
style (?{ ... }) variants would change the regex engines behavior, meaning
this was not as effective a tool as it could have been.
Similarly it is now possible to test that a given regex optimisation
works correctly using (*{ ... }), which was not possible with (?{ ... }).
op/fork.t: skip the ulimit fork test under LSAN
This was producing noise, at least on Linux, since the -u limit on
Linux also limits threads.
Fixes #20712
This was producing noise, at least on Linux, since the -u limit on
Linux also limits threads.
Fixes #20712
Fix typo in older perldelta
Signed-off-by: lilinjie <lilinjie@uniontech.com>
Committer: Li Linjie is now a Perl author.
Run Porting/updateAUTHORS.pl to update .mailmap
Signed-off-by: lilinjie <lilinjie@uniontech.com>
Committer: Li Linjie is now a Perl author.
Run Porting/updateAUTHORS.pl to update .mailmap
Configure: Add various C99 compatibility improvements
Two C99 compatibility issues are fixed by these changes: Return
types are made explicit where they previously defaulted to int,
and all called functions are now declared explicitly (either by
including additional headers, or by adding prototypes manually).
This avoids implict ints and implicit function declarations,
both legacy C language features removed in the 1999 revision
of the language.
Verified with an instrumented GCC compiler on GNU/Linux.
Two C99 compatibility issues are fixed by these changes: Return
types are made explicit where they previously defaulted to int,
and all called functions are now declared explicitly (either by
including additional headers, or by adding prototypes manually).
This avoids implict ints and implicit function declarations,
both legacy C language features removed in the 1999 revision
of the language.
Verified with an instrumented GCC compiler on GNU/Linux.
Peter Levine is now a Perl author.
Add parameter types to declarations for clang-16
ANSI C style function declarations without parameter types are errors with clang-16.
ANSI C style function declarations without parameter types are errors with clang-16.
bisect-runner.pl: When did warnings clear up
Illustrate bisection to identify commit at which run-time warnings
ceased being emitted from a program.
Illustrate bisection to identify commit at which run-time warnings
ceased being emitted from a program.
pp_multiconcat: don't set svpv_p to an invalid pointer
When svpv_base == svpv_buf, svpv_p would be set to point before the
buffer, which is undefined.
This appears to be what gcc 13 is complaining about in #20678,
despite that report including what appears to be a completely valid
address, on a line where the value of svpv_p is now within the range
of svpv_buf.
An intermediate approach to this used:
temp = svpv_p;
if (svpv_p++ == svpv_end)
break
but this is also incorrect, since svpv_p would end up as an invalid
pointer, though gcc UBSAN didn't pick that up.
Fixes #20678.
When svpv_base == svpv_buf, svpv_p would be set to point before the
buffer, which is undefined.
This appears to be what gcc 13 is complaining about in #20678,
despite that report including what appears to be a completely valid
address, on a line where the value of svpv_p is now within the range
of svpv_buf.
An intermediate approach to this used:
temp = svpv_p;
if (svpv_p++ == svpv_end)
break
but this is also incorrect, since svpv_p would end up as an invalid
pointer, though gcc UBSAN didn't pick that up.
Fixes #20678.
Dagfinn Ilmari Mannsåker [Mon, 16 Jan 2023 14:07:52 +0000 (14:07 +0000)]
Remove full stop in the 'try' feature heading
None of the other headings in feature.pm have full stops.
None of the other headings in feature.pm have full stops.
Override *.h files as C with Linguist
GitHub classifies 23 files as C++ for some reason.
https://github.com/Perl/perl5/search?q=language%3AC%2B%2B&type=code
I believe Perl doesn't contain C++ code, and C++ headers can have a distinguishable .hh, .hpp, .hxx, and .h++ extensions.
GitHub classifies 23 files as C++ for some reason.
https://github.com/Perl/perl5/search?q=language%3AC%2B%2B&type=code
I believe Perl doesn't contain C++ code, and C++ headers can have a distinguishable .hh, .hpp, .hxx, and .h++ extensions.
regcomp_study.c - disable CURLYX optimizations when EVAL has been seen anywhere
Historically we disabled CURLYX optimizations when they
*contained* an EVAL, on the assumption that the optimization might
affect how many times, etc, the eval was called. However, this is
also true for CURLYX with evals *afterwards*. If the CURLYN or CURLYM
optimization can prune off the search space, then an eval afterwards
will be affected. An when you take into account GOSUB, it means that
an eval in front might be affected by an optimization after it.
So for now we disable CURLYN and CURLYM in any pattern with an EVAL.
Historically we disabled CURLYX optimizations when they
*contained* an EVAL, on the assumption that the optimization might
affect how many times, etc, the eval was called. However, this is
also true for CURLYX with evals *afterwards*. If the CURLYN or CURLYM
optimization can prune off the search space, then an eval afterwards
will be affected. An when you take into account GOSUB, it means that
an eval in front might be affected by an optimization after it.
So for now we disable CURLYN and CURLYM in any pattern with an EVAL.
regcomp.c - increase size of CURLY nodes so the min/max is a I32
This allows us to resolve a test inconsistency between CURLYX and CURLY
and CURLYM, which have different maximums. We use I32 and not U32 because
the existing count logic uses -1 internally and using an I32 for the min/max
prevents warnings about comparing signed and unsigned values when the
count is compared against the min or max.
This allows us to resolve a test inconsistency between CURLYX and CURLY
and CURLYM, which have different maximums. We use I32 and not U32 because
the existing count logic uses -1 internally and using an I32 for the min/max
prevents warnings about comparing signed and unsigned values when the
count is compared against the min or max.
regexec.c - fix accept in CURLYX/WHILEM construct.
The ACCEPT logic didnt know how to handle WHILEM, which for
some reason does not have a next_off defined. I am not sure why.
This was revealed by forcing CURLYX optimisations off. This includes
a patch to test what happens if we embed an eval group in the tests
run by regexp.t when run via regexp_normal.t, which disabled CURLYX ->
CURLYN and CURLYM optimisations and revealed this issue.
This adds t/re/regexp_normal.t which test "normalized" forms of
the patterns in t/re/re_tests by munging them in various ways
to see if they still behave as expected. For instance injecting
a (?{}) can disable optimisations.
The ACCEPT logic didnt know how to handle WHILEM, which for
some reason does not have a next_off defined. I am not sure why.
This was revealed by forcing CURLYX optimisations off. This includes
a patch to test what happens if we embed an eval group in the tests
run by regexp.t when run via regexp_normal.t, which disabled CURLYX ->
CURLYN and CURLYM optimisations and revealed this issue.
This adds t/re/regexp_normal.t which test "normalized" forms of
the patterns in t/re/re_tests by munging them in various ways
to see if they still behave as expected. For instance injecting
a (?{}) can disable optimisations.
regexec.c - fix memory leak in EVAL.
EVAL was calling regcppush twice per invocation, once before executing the
callback, and once after. But not regcppop'ing twice. So each time we
would accumulate an extra "frame" of data. This is/was hidden somewhat by
the way we eventually "blow" the stack, so the extra data was just thrown
away at the end.
This removes the second set of pushes so that the save stack stays a stable
size as it unwinds from each failed eval.
We also weren't cleaning up after a (?{...}) when we failed to match to its
right. This unwinds the stack and restores the parens properly.
This adds tests to check how the save stack grows during patterns using
(?{ ... }) and (??{ ... }) and ensure that when we backtrack and re-execute
the EVAL again it cleans up the stack as it goes.
EVAL was calling regcppush twice per invocation, once before executing the
callback, and once after. But not regcppop'ing twice. So each time we
would accumulate an extra "frame" of data. This is/was hidden somewhat by
the way we eventually "blow" the stack, so the extra data was just thrown
away at the end.
This removes the second set of pushes so that the save stack stays a stable
size as it unwinds from each failed eval.
We also weren't cleaning up after a (?{...}) when we failed to match to its
right. This unwinds the stack and restores the parens properly.
This adds tests to check how the save stack grows during patterns using
(?{ ... }) and (??{ ... }) and ensure that when we backtrack and re-execute
the EVAL again it cleans up the stack as it goes.
regcomp_trie.c - use the indirect types so we are safe to changes
We shouldnt assume that a TRIEC is a regcomp_charclass. We have a per
opcode type exactly for this type of use, so lets use it.
We shouldnt assume that a TRIEC is a regcomp_charclass. We have a per
opcode type exactly for this type of use, so lets use it.
regcomp.c - add whitespace to binary operation
The tight & is hard to read.
The tight & is hard to read.
regcomp.h - get rid of EXTRA_STEP defines
They are unused these days.
They are unused these days.
regexec.c - rework CLOSE_CAPTURE() to take rex as an arg to enable reuse.
This also splits up CLOSE_CAPTURE() into two parts, with the important parts
implemented by CLOSE_ANY_CAPTURE(), and the debugging parts in
CLOSE_CAPTURE(). This allows it to be used in contexts where the regexp
structure isn't set up under the name 'rex', and where the debugging output it
includes might not be relevant or possible to produce.
This encapsulates all the places that "close" a capture buffer, and ensures
that they are closed properly. One important case in particular cannot use
CLOSE_CAPTURE() directly, as it does not have a 'rex' variable in scope (it is
called prog in this function), nor the debugging context used in normal
execution of CLOSE_CAPTURE(). Using CLOSE_ANY_CAPTURE() instead means all the
main points that update capture buffer state use the same macro API.
This also splits up CLOSE_CAPTURE() into two parts, with the important parts
implemented by CLOSE_ANY_CAPTURE(), and the debugging parts in
CLOSE_CAPTURE(). This allows it to be used in contexts where the regexp
structure isn't set up under the name 'rex', and where the debugging output it
includes might not be relevant or possible to produce.
This encapsulates all the places that "close" a capture buffer, and ensures
that they are closed properly. One important case in particular cannot use
CLOSE_CAPTURE() directly, as it does not have a 'rex' variable in scope (it is
called prog in this function), nor the debugging context used in normal
execution of CLOSE_CAPTURE(). Using CLOSE_ANY_CAPTURE() instead means all the
main points that update capture buffer state use the same macro API.
regcomp_study.c - Add a way to disable CURLYX optimisations
Also break up the condition so there is one condition per line so
it is more readable, and fold repeated binary tests together. This
makes it more obvious what the expression is doing.
Also break up the condition so there is one condition per line so
it is more readable, and fold repeated binary tests together. This
makes it more obvious what the expression is doing.
t/re/re_rests - extend test to show more buffers
This is a tricky test, showing more buffers makes it a bit easier
to understand if you break it. (Guess what I did?)
This is a tricky test, showing more buffers makes it a bit easier
to understand if you break it. (Guess what I did?)
Porting/updateAUTHORS.pl: Suggested `git config` command is wrong
When you run tests in a repository that has local modifications
`t/porting/authors.t` checks if your git is correctly configured
with your identity. However, the suggested commands don't work,
because `git config` doesn't need a `--set` flag to set options.
This patch removes the `--set` from the suggested commands which is
not necessary to set the variables in the local git repository. For
comparison, if you run `git commit` without your identity set up, it
suggests:
```
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
```
When you run tests in a repository that has local modifications
`t/porting/authors.t` checks if your git is correctly configured
with your identity. However, the suggested commands don't work,
because `git config` doesn't need a `--set` flag to set options.
This patch removes the `--set` from the suggested commands which is
not necessary to set the variables in the local git repository. For
comparison, if you run `git commit` without your identity set up, it
suggests:
```
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
```
embed.pl - add a way to declare a parameter should be non-zero
This autogenerates the required asserts to validate a parameter is non-zero.
It uses it to replace the check in regrepeat() as a first example.
This autogenerates the required asserts to validate a parameter is non-zero.
It uses it to replace the check in regrepeat() as a first example.
Expose op_force_list() as a real API function; use it directly in op.c
Correct sort docs about value of the sort func.
get_{av,hv} should ignore SVf_UTF8 when testing if flags == 0
t/test.pl - assign caller() to separate vars in _where()
_where() is a heavily used, small subroutine within test.pl. It currently
assigns all eleven of caller()'s return values to array elements, then
uses only the second and third of these to construct a return string.
This commit changes the assignment to use separate variables, which ends
up being more efficient.
Benchmarking suggests that _where() is about 30% faster as a result.
The overhead of ok( ... ) calls is reduced by about 10%.
_where() is a heavily used, small subroutine within test.pl. It currently
assigns all eleven of caller()'s return values to array elements, then
uses only the second and third of these to construct a return string.
This commit changes the assignment to use separate variables, which ends
up being more efficient.
Benchmarking suggests that _where() is about 30% faster as a result.
The overhead of ok( ... ) calls is reduced by about 10%.
regexec.c - avoid calling regrepeat when the max is 0
When we have a max quantifier of 0, then the quantified
item is essentially a NOTHING reop. Regardless, we do not
need to call regrepeat, and doing so confuses some of the
logic it contains. Simply avoiding calling regrepeat()
fixes the underlying issue, and avoids the broken code.
This fixes GH Issue #20690.
When we have a max quantifier of 0, then the quantified
item is essentially a NOTHING reop. Regardless, we do not
need to call regrepeat, and doing so confuses some of the
logic it contains. Simply avoiding calling regrepeat()
fixes the underlying issue, and avoids the broken code.
This fixes GH Issue #20690.
Add myself as author
Fix typos
regcomp_internal.h: Fix leak in regex tests
Commit fe5492d916201ce31a107839a36bcb1435fe7bf0 introduced leaks when a
regex compilation fails. This commit uses the standard method we have
to deal with these kinds of things.
Commit fe5492d916201ce31a107839a36bcb1435fe7bf0 introduced leaks when a
regex compilation fails. This commit uses the standard method we have
to deal with these kinds of things.
POSIX.pod: Clarify mbtowc(), wctomb() pod
Fix PerlEnv_putenv threaded compilation on Windows
A second compilation of a workspace would fail. The first one would
succeed because miniperl was being used, which isn't threaded.
A second compilation of a workspace would fail. The first one would
succeed because miniperl was being used, which isn't threaded.
Don't panic if can't destroy mutex during global destruction
It's going to be destroyed anyway; this just obscures what the real
failure might be.
It's going to be destroyed anyway; this just obscures what the real
failure might be.
Syntax highlight configpm
For enhancing the source readability in GitHub:
cf. https://raw.githubusercontent.com/Perl/perl5/blead/PACKAGING
For enhancing the source readability in GitHub:
cf. https://raw.githubusercontent.com/Perl/perl5/blead/PACKAGING
regcomp.c etc - rework branch reset so it works properly
Branch reset was hacked in without much thought about how it might interact
with other features. Over time we added named capture and recursive patterns
with GOSUB, but I guess because branch reset is somewhat esoteric we didnt
notice the accumulating issues related to it.
The main problem was my original hack used a fairly simple device to give
multiple OPEN/CLOSE opcodes the same target buffer id. When it was introduced
this was fine. When GOSUB was added later however, we overlooked at that this
broke a key part of the book-keeping for GOSUB.
A GOSUB regop needs to know where to jump to, and which close paren to stop
at. However the structure of the regexp program can change from the time the
regop is created. This means we keep track of every OPEN/CLOSE regop we
encounter during parsing, and when something is inserted into the middle of
the program we make sure to move the offsets we store for the OPEN/CLOSE data.
This is essentially keyed and scaled to the number of parens we have seen.
When branch reset is used however the number of OPEN/CLOSE regops is more than
the number of logical buffers we have seen, and we only move one of the
OPEN/CLOSE buffers that is in the branch reset. Which of course breaks things.
Another issues with branch reset is that it creates weird artifacts like this:
/(?|(?<a>a)|(?<b>b))(?&a)(?&b)/ where the (?&b) actually maps to the (?<a>a)
capture buffer because they both have the same id. Another case is that you
cannot check if $+{b} matched and $+{a} did not, because conceptually they
were the same buffer under the hood.
These bugs are now fixed. The "aliasing" of capture buffers to each other is
now done virtually, and under the hood each capture buffer is distinct. We
introduce the concept of a "logical parno" which is the user visible capture
buffer id, and keep it distinct from the true capture buffer id. Most of the
internal logic uses the "true parno" for its business, so a bunch of problems
go away, and we keep maps from logical to physical parnos, and vice versa,
along with a map that gives use the "next physical parno with the same
logical parno". Thus we can quickly skip through the physical capture buffers
to find the one that matched. This means we also have to introduce a
logical_total_parens as well, to complement the already existing total_parens.
The latter refers to the true number of capture buffers. The former represents
the logical number visible to the user.
It is helpful to consider the following table:
Logical: $1 $2 $3 $2 $3 $4 $2 $5
Physical: 1 2 3 4 5 6 7 8
Next: 0 4 5 7 0 0 0 0
Pattern: /(pre)(?|(?<a>a)(?<b>b)|(?<c>c)(?<d>d)(?<e>e)|(?<f>))(post)/
The names are mapped to physical buffers. So $+{b} will show what is in
physical buffer 3. But $3 will show whichever of buffer 3 or 5 matched.
Similarly @{^CAPTURE} will contain 5 elements, not 8. But %+ will contain all
6 named buffers.
Since the need to map these values is rare, we only store these maps when they
are needed and branch reset has been used, when they are NULL it is assumed
that physical and logical buffers are identical.
Currently the way this change is implemented will likely break plug in regexp
engines because they will be missing the new logical_total_parens field at
the very least. Given that the perl internals code is somewhat poorly
abstracted from the regexp engine, with parts of the abstraction leaking out,
I think this is acceptable. If we want to make plug in regexp engines work
properly IMO we need to add some more hooks that they need to implement than
we currently do. For instance mg.c does more work than it should. Given there
are only a few plug in regexp engines and that it is specialized work, I
think this is acceptable. We can work with the authors to refine the API
properly later.
Branch reset was hacked in without much thought about how it might interact
with other features. Over time we added named capture and recursive patterns
with GOSUB, but I guess because branch reset is somewhat esoteric we didnt
notice the accumulating issues related to it.
The main problem was my original hack used a fairly simple device to give
multiple OPEN/CLOSE opcodes the same target buffer id. When it was introduced
this was fine. When GOSUB was added later however, we overlooked at that this
broke a key part of the book-keeping for GOSUB.
A GOSUB regop needs to know where to jump to, and which close paren to stop
at. However the structure of the regexp program can change from the time the
regop is created. This means we keep track of every OPEN/CLOSE regop we
encounter during parsing, and when something is inserted into the middle of
the program we make sure to move the offsets we store for the OPEN/CLOSE data.
This is essentially keyed and scaled to the number of parens we have seen.
When branch reset is used however the number of OPEN/CLOSE regops is more than
the number of logical buffers we have seen, and we only move one of the
OPEN/CLOSE buffers that is in the branch reset. Which of course breaks things.
Another issues with branch reset is that it creates weird artifacts like this:
/(?|(?<a>a)|(?<b>b))(?&a)(?&b)/ where the (?&b) actually maps to the (?<a>a)
capture buffer because they both have the same id. Another case is that you
cannot check if $+{b} matched and $+{a} did not, because conceptually they
were the same buffer under the hood.
These bugs are now fixed. The "aliasing" of capture buffers to each other is
now done virtually, and under the hood each capture buffer is distinct. We
introduce the concept of a "logical parno" which is the user visible capture
buffer id, and keep it distinct from the true capture buffer id. Most of the
internal logic uses the "true parno" for its business, so a bunch of problems
go away, and we keep maps from logical to physical parnos, and vice versa,
along with a map that gives use the "next physical parno with the same
logical parno". Thus we can quickly skip through the physical capture buffers
to find the one that matched. This means we also have to introduce a
logical_total_parens as well, to complement the already existing total_parens.
The latter refers to the true number of capture buffers. The former represents
the logical number visible to the user.
It is helpful to consider the following table:
Logical: $1 $2 $3 $2 $3 $4 $2 $5
Physical: 1 2 3 4 5 6 7 8
Next: 0 4 5 7 0 0 0 0
Pattern: /(pre)(?|(?<a>a)(?<b>b)|(?<c>c)(?<d>d)(?<e>e)|(?<f>))(post)/
The names are mapped to physical buffers. So $+{b} will show what is in
physical buffer 3. But $3 will show whichever of buffer 3 or 5 matched.
Similarly @{^CAPTURE} will contain 5 elements, not 8. But %+ will contain all
6 named buffers.
Since the need to map these values is rare, we only store these maps when they
are needed and branch reset has been used, when they are NULL it is assumed
that physical and logical buffers are identical.
Currently the way this change is implemented will likely break plug in regexp
engines because they will be missing the new logical_total_parens field at
the very least. Given that the perl internals code is somewhat poorly
abstracted from the regexp engine, with parts of the abstraction leaking out,
I think this is acceptable. If we want to make plug in regexp engines work
properly IMO we need to add some more hooks that they need to implement than
we currently do. For instance mg.c does more work than it should. Given there
are only a few plug in regexp engines and that it is specialized work, I
think this is acceptable. We can work with the authors to refine the API
properly later.
handy.h - add NewCopy() macro to combine New and Copy.
test.pl - add support for rtriming fresh perl output
This makes it easier to do regexp debug tests, where we don't care
about trailing whitespace.
It also fixes the line number reporting for fresh_perl_is() and
fresh_perl_like() so that it shows the actual place where the line
number is located, and it changes the relevant code to work properly
with external $Level overrides.
This makes it easier to do regexp debug tests, where we don't care
about trailing whitespace.
It also fixes the line number reporting for fresh_perl_is() and
fresh_perl_like() so that it shows the actual place where the line
number is located, and it changes the relevant code to work properly
with external $Level overrides.
Replace FreeBSD URL's with new HTTPS ones
Hint should advise using 'make regen'
Per discussion by @demerphq in
https://github.com/Perl/perl5/pull/20682#issuecomment-1377536039. The
'regen' programs should be run with your installed 'perl'.
Use single quote in heredoc, as $_ is no longer being interpolated (per
@JRaspass in
https://github.com/Perl/perl5/pull/20683#discussion_r1066294815).
Per discussion by @demerphq in
https://github.com/Perl/perl5/pull/20682#issuecomment-1377536039. The
'regen' programs should be run with your installed 'perl'.
Use single quote in heredoc, as $_ is no longer being interpolated (per
@JRaspass in
https://github.com/Perl/perl5/pull/20683#discussion_r1066294815).
Correct one character typo appearing in lib/feature.pm
Since lib/feature.pm is a generated file, the actual changes are made in
regen/feature.pl, followed by 'make regen' to regenerate lib/feature.pm
(and then followed by 'make test_porting') to confirm.
Since lib/feature.pm is a generated file, the actual changes are made in
regen/feature.pl, followed by 'make regen' to regenerate lib/feature.pm
(and then followed by 'make test_porting') to confirm.
regexec engine - wrap and replace RX_OFFS() with better abstractions
RX_OFFS() exposes a bit too much about how capture buffers are represented.
This adds RX_OFFS_START() and RX_OFFS_END() and RX_OFFS_VALID() to replace
most of the uses of the RX_OFFS() macro or direct access to the rx->off[]
array. (We add RX_OFFSp() for those rare cases that should have direct
access to the array.) This allows us to replace this logic with more
complicated macros in the future. Pretty much anything using RX_OFFS() is
going to be broken by future changes, so changing the define allows us to
track it down easily.
Not all use of the rx->offs[] array are converted; some uses are required
for the regex engine internals, but anything outside of the regex engine
should be using the replacement macros, and most things in the regex internals
should use it also.
RX_OFFS() exposes a bit too much about how capture buffers are represented.
This adds RX_OFFS_START() and RX_OFFS_END() and RX_OFFS_VALID() to replace
most of the uses of the RX_OFFS() macro or direct access to the rx->off[]
array. (We add RX_OFFSp() for those rare cases that should have direct
access to the array.) This allows us to replace this logic with more
complicated macros in the future. Pretty much anything using RX_OFFS() is
going to be broken by future changes, so changing the define allows us to
track it down easily.
Not all use of the rx->offs[] array are converted; some uses are required
for the regex engine internals, but anything outside of the regex engine
should be using the replacement macros, and most things in the regex internals
should use it also.
Math::Trig: POD correction
For: https://rt.cpan.org/Ticket/Display.html?id=114105
For: https://rt.cpan.org/Ticket/Display.html?id=114105
perlport: note the new behavior of symlink with / paths
win32_symlink(): we replace any /, we no longer need to check for them
win32_symlink: correctly handle linking to abs path to a directory
Fixes #20533
Fixes #20533
File::Find: handle \ in symbolic links on Win32
on win32 translate / to \ in symlink targets
Windows, or at least NTFS, doesn't appear to follow symlinks
where the target contains the POSIX directory separator "/".
To fix that translate any / to \ in symlink targets. This may
break code that checks the symlink target macthes a value set,
but I think it's more likely to fix code that blindly uses /
than break code that looks at the symlink target they just set.
Fixes #20506
Windows, or at least NTFS, doesn't appear to follow symlinks
where the target contains the POSIX directory separator "/".
To fix that translate any / to \ in symlink targets. This may
break code that checks the symlink target macthes a value set,
but I think it's more likely to fix code that blindly uses /
than break code that looks at the symlink target they just set.
Fixes #20506
make win32_lstat() return the length of the link in st_size
This is reflected in the result of lstat() in perl.
This matches POSIX behaviour.
Fixed #20476
This is reflected in the result of lstat() in perl.
This matches POSIX behaviour.
Fixed #20476
regcomp.pl - fixup intflags debug data to handle gaps properly
We were not handling gaps in the sequence properly, and effectively
showing the wrong flag names or missing the last flag. Now we die if there
are any collisions or if any of the PREGf defines set more than one bit.
This also adds some crude tests to validate that intflags serialization is
working properly.
Note, extflags handles more complex scenarios and seems to handle this
gracefully already, hence the reason I haven't touched it as well.
This also tweaks a comment in lexical_debug.t which part of this was
cribbed from.
We were not handling gaps in the sequence properly, and effectively
showing the wrong flag names or missing the last flag. Now we die if there
are any collisions or if any of the PREGf defines set more than one bit.
This also adds some crude tests to validate that intflags serialization is
working properly.
Note, extflags handles more complex scenarios and seems to handle this
gracefully already, hence the reason I haven't touched it as well.
This also tweaks a comment in lexical_debug.t which part of this was
cribbed from.
Makefile.SH - fix 'reonly' Makefile target to test ext/re/t/*.t properly
The .. in front of the ext/ required as the list is constructed
relative to the t/ directory of the repo.
This also enables "full steam ahead" mode when parallel jobs are
enabled. This target only tests a subset of our functionality, running
in normal mode and separating core tests from ext/ tests just slows
things down for no value.
The .. in front of the ext/ required as the list is constructed
relative to the t/ directory of the repo.
This also enables "full steam ahead" mode when parallel jobs are
enabled. This target only tests a subset of our functionality, running
in normal mode and separating core tests from ext/ tests just slows
things down for no value.
av.c - av_store() do the refcount dance around magic av's
The api for av_store() says it is the callers responsibility to call
SvREFCNT_inc() on the stored item after the store is successful.
However inside of av_store() we store the item in the C level array before we
trigger magic. To a certain extent this is required because mg_set(av) needs
to be able to see the newly stored item.
But if the mg_set() or other magic associated with the av_store() operation
fails, we would end up with a double free situation, as we will long jump up
the stack above and out of the call to av_store(), freeing the mortal as we go
(via Perl_croak()), but leaving the reference to the now freed pointer in the
array. When the next SV is allocated the reference will be reused, and then we
are in a double free scenario.
I see comments in pp_aassign talking about defusing the temps stack for the
parameters it is passing in, and things like this, which at first looked
related. But that commentary doesn't seem that relevant to me, as this bug
could happen any time a scalar owned by one data structure was copied into an
array with set magic which could die. Eg, I can easily imagine XS code that
expected code like this (assume it handles magic properly) to work:
SV **svp = av_fetch(av1,0,1);
if (av_store(av2,0,*svp))
SvREFCNT_inc(*svp);
but if av2 has set magic and it dies the end result will be that both av1 and
av2 contain a visible reference to *svp, but its refcount will be 1. So I think
this is a bug regardless of what pp_aassign does.
This fixes https://github.com/Perl/perl5/issues/20675
The api for av_store() says it is the callers responsibility to call
SvREFCNT_inc() on the stored item after the store is successful.
However inside of av_store() we store the item in the C level array before we
trigger magic. To a certain extent this is required because mg_set(av) needs
to be able to see the newly stored item.
But if the mg_set() or other magic associated with the av_store() operation
fails, we would end up with a double free situation, as we will long jump up
the stack above and out of the call to av_store(), freeing the mortal as we go
(via Perl_croak()), but leaving the reference to the now freed pointer in the
array. When the next SV is allocated the reference will be reused, and then we
are in a double free scenario.
I see comments in pp_aassign talking about defusing the temps stack for the
parameters it is passing in, and things like this, which at first looked
related. But that commentary doesn't seem that relevant to me, as this bug
could happen any time a scalar owned by one data structure was copied into an
array with set magic which could die. Eg, I can easily imagine XS code that
expected code like this (assume it handles magic properly) to work:
SV **svp = av_fetch(av1,0,1);
if (av_store(av2,0,*svp))
SvREFCNT_inc(*svp);
but if av2 has set magic and it dies the end result will be that both av1 and
av2 contain a visible reference to *svp, but its refcount will be 1. So I think
this is a bug regardless of what pp_aassign does.
This fixes https://github.com/Perl/perl5/issues/20675
update_authors.t - fixup shallow clone guards
We were not testing for errors from rev-parse, and we were improperly
passsing in a range and the --verify mode does not expect a range,
it expects a specific commit.
This changes the test to check each end of the commit range, and to
check for errors. It also uses the {commit} notation to check if the
objects actually are commits.
We were not testing for errors from rev-parse, and we were improperly
passsing in a range and the --verify mode does not expect a range,
it expects a specific commit.
This changes the test to check each end of the commit range, and to
check for errors. It also uses the {commit} notation to check if the
objects actually are commits.
Fix name within (restored) pod/perl5370delta
restore pod/perl5370delta.pod
Somehow, in commit 60fa4bd4b1ac the perldelta template was copied into
perl5370delta.pod instead of perldelta.pod. This commit restores the
content just before that commit, which reflects what was in the actual 5.37.0
release.
Somehow, in commit 60fa4bd4b1ac the perldelta template was copied into
perl5370delta.pod instead of perldelta.pod. This commit restores the
content just before that commit, which reflects what was in the actual 5.37.0
release.
CI linux-i386: Replace checkout@v1 with git cmds
For linux-i386 we are/were using checkout@v1 because checkout@v2/checkout@v3
do not work inside a i386-container.
checkout@v1 however has some issues[^1] with shallow clones (`fetch-depth: 1`):
- it cause race conditions[^2]
- it makes it impossible to re-run an older job
Options we have Today:
- clone with full history: this is slow *and* influences some of the (porting)
tests.
- ditch checkout@v1 and manually clone it: we already do this for cygwin
and it's faster: 58s (for checkout@v1) vs 7s when doing it ourselves[^3].
-> Ditch checkout@v1.
[^1]: Upstream report: https://github.com/actions/runner/issues/2357
[^2]: `git clone` fails when new commits are pushed between the start of
the CI run and the start of the linux-i386 job. With our CI config
that is a time-frame of about 10 minutes (since that is how long
the 'Sanity check' takes).
[^3]: checkout@v1 always fetches *all* tags and *all* branches.
For linux-i386 we are/were using checkout@v1 because checkout@v2/checkout@v3
do not work inside a i386-container.
checkout@v1 however has some issues[^1] with shallow clones (`fetch-depth: 1`):
- it cause race conditions[^2]
- it makes it impossible to re-run an older job
Options we have Today:
- clone with full history: this is slow *and* influences some of the (porting)
tests.
- ditch checkout@v1 and manually clone it: we already do this for cygwin
and it's faster: 58s (for checkout@v1) vs 7s when doing it ourselves[^3].
-> Ditch checkout@v1.
[^1]: Upstream report: https://github.com/actions/runner/issues/2357
[^2]: `git clone` fails when new commits are pushed between the start of
the CI run and the start of the linux-i386 job. With our CI config
that is a time-frame of about 10 minutes (since that is how long
the 'Sanity check' takes).
[^3]: checkout@v1 always fetches *all* tags and *all* branches.
dist/threads - bump version
The way CI works it is easy to merge a patch that will lead to
a cmp_version test fail. If two people modify the same file, bump
it to the same new version, then there will be no conflict nor test
fail, until it is merged at which point it will fail because the
code has changed but the version hasn't.
This is a quickie fixup when I got hit by this today with threads.
The way CI works it is easy to merge a patch that will lead to
a cmp_version test fail. If two people modify the same file, bump
it to the same new version, then there will be no conflict nor test
fail, until it is merged at which point it will fail because the
code has changed but the version hasn't.
This is a quickie fixup when I got hit by this today with threads.
regcomp.c - make sure CURLYM closes the capture buffer after each match
We have to close the paren immediately after each time we
match A, or conditional patterns will break.
An alternative and possibly more efficient solution would be to block
CURLYX -> CURLYM conversion when the inside contains a conditional check
just like we do with EVAL.
Fixes #7754 aka https://github.com/Perl/perl5/issues/7754
We have to close the paren immediately after each time we
match A, or conditional patterns will break.
An alternative and possibly more efficient solution would be to block
CURLYX -> CURLYM conversion when the inside contains a conditional check
just like we do with EVAL.
Fixes #7754 aka https://github.com/Perl/perl5/issues/7754
regcomp.c - in regdupe_internal() set up "in program" stclass properly
We were only handling "synthetic start classes", not ones that are in
the program itself, because those dont have an entry in the data array.
So after copying the program after ruling out that the regstclass is
synthetic we can assume that if its non-null it points into the program
itself, and simply set it up the copy accordingly.
Fixes https://github.com/Perl/perl5/issues/9373
We were only handling "synthetic start classes", not ones that are in
the program itself, because those dont have an entry in the data array.
So after copying the program after ruling out that the regstclass is
synthetic we can assume that if its non-null it points into the program
itself, and simply set it up the copy accordingly.
Fixes https://github.com/Perl/perl5/issues/9373