This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH: [perl #130010] a5540cf breaks texinfo
authorKarl Williamson <khw@cpan.org>
Wed, 9 Nov 2016 20:55:41 +0000 (21:55 +0100)
committerKarl Williamson <khw@cpan.org>
Sat, 12 Nov 2016 08:48:59 +0000 (09:48 +0100)
commiteee4c92039de41d6a277473b2d60e29584f67431
tree0eb4247c362b86359db2b3bf51f504261e24207d
parentee3222e312cbf5cc89df7b3cb3bd2ab5bb4e6507
PATCH: [perl #130010] a5540cf breaks texinfo

When a regular expression is compiled that contains user-defined
properties, the subroutine the user must furnish to implement those
properties may not yet be defined.  To cope with this possibility, the
regex pattern compiler stores the name and package of the subroutine,
and this is to be expanded the first time the property is actually used
during execution.  Once expanded, the property should be immutable, and
so the scalar containing the expansion is marked read-only.  It turns
out that prior to the blamed commit, that read-only-ness was being
bypassed in some instances simply by freeing the scalar, replaced by a
new one.  The commit changed that.  The pattern may contain components
both known at compile time, and deferred until runtime.  The two are
combined at the time of expansion, but that was now running afoul of the
read-only setting.  This commit simply turns off the read-only flag at
the time of expansion, and it's turned on again afterwards.

The next commit will add a test.
utf8.c