platform/upstream/perl.git
11 years agoTest that __PACKAGE__ is read-only
Father Chrysostomos [Sun, 4 Aug 2013 06:08:42 +0000 (23:08 -0700)]
Test that __PACKAGE__ is read-only

I.e., test that this bug is fixed:

$ perl -e 'for(1..10){for(__PACKAGE__){warn $_; $_++}}'
main at -e line 1.
maio at -e line 1.
maip at -e line 1.
maiq at -e line 1.
mair at -e line 1.
mais at -e line 1.
mait at -e line 1.
maiu at -e line 1.
maiv at -e line 1.
maiw at -e line 1.

for my$p(__PACKAGE__){$p++for+1..55664
,;!print"Just another \u$p hacker,\n"}

11 years agoRevert "[perl #119043] Exempt shared hash key consts from ro"
Father Chrysostomos [Sun, 4 Aug 2013 06:08:08 +0000 (23:08 -0700)]
Revert "[perl #119043] Exempt shared hash key consts from ro"

This reverts commit ba36554e02872e48d146177a57a9cfb154727fae.

It turns out it reinstates bugs like this:

$ perl -e 'for(1..10){for(__PACKAGE__){warn $_; $_++}}'
main at -e line 1.
maio at -e line 1.
maip at -e line 1.
maiq at -e line 1.
mair at -e line 1.
mais at -e line 1.
mait at -e line 1.
maiu at -e line 1.
maiv at -e line 1.
maiw at -e line 1.

11 years ago_perl_abs_path() symlink tests fail on QNX Neutrino
Chris 'BinGOs' Williams [Fri, 2 Aug 2013 22:53:15 +0000 (23:53 +0100)]
_perl_abs_path() symlink tests fail on QNX Neutrino

11 years agoResolve File::Spec test failures on QNX Neutrino
Chris 'BinGOs' Williams [Fri, 2 Aug 2013 21:47:56 +0000 (22:47 +0100)]
Resolve File::Spec test failures on QNX Neutrino

11 years agoAdd note about regenerating META files when updating CPAN-Meta
Chris 'BinGOs' Williams [Fri, 2 Aug 2013 16:39:57 +0000 (17:39 +0100)]
Add note about regenerating META files when updating CPAN-Meta

11 years agoUpdate CPAN-Meta to CPAN version 2.132140
Chris 'BinGOs' Williams [Fri, 2 Aug 2013 16:34:19 +0000 (17:34 +0100)]
Update CPAN-Meta to CPAN version 2.132140

  [DELTA]

2.132140  2013-08-02 11:54:17 America/New_York

  [DOCUMENTATION]

  - Fixed some typos in CPAN::Meta::Spec

  [OTHER]

  - migrated repository to Perl-Toolchain-Gang organization on Github and
    updated metadata accordingly

11 years agoRegression tests for 4 cases reported by Philip Hazel++.
James E Keenan [Tue, 30 Jul 2013 01:31:28 +0000 (21:31 -0400)]
Regression tests for 4 cases reported by Philip Hazel++.

With revisions per suggestion by demerphq++.
For: RT #119069, 119071, 119073, 119075

11 years agoprevent a precedence warning on clang
Tony Cook [Fri, 2 Aug 2013 01:27:10 +0000 (11:27 +1000)]
prevent a precedence warning on clang

Dumper.xs:245:29: warning: '&&' within '||' [-Wlogical-op-parentheses]
                   ((k >= 7 && k <= 10 || k == 12 || k == 13 || k == 27)
                     ~~~~~~~^~~~~~~~~~ ~~
Dumper.xs:245:29: note: place parentheses around the '&&' expression to silence
      this warning
                   ((k >= 7 && k <= 10 || k == 12 || k == 13 || k == 27)

11 years agoregcomp.c: Silence clang compiler warning
Karl Williamson [Thu, 1 Aug 2013 20:19:34 +0000 (14:19 -0600)]
regcomp.c: Silence clang compiler warning

There is no pre-canned format for printing STRLEN variables.  This
commit casts to UV and uses %"UVuf".

11 years agoUpdate Scalar-List-Utils to CPAN version 1.29
Chris 'BinGOs' Williams [Thu, 1 Aug 2013 20:07:00 +0000 (21:07 +0100)]
Update Scalar-List-Utils to CPAN version 1.29

  [DELTA]

1.29 -- Thu Aug 01 13:40 UTC 2013

  * Bugfix to pairmap/pairgrep when stack moves beneath them during operation

1.28 -- Thu Aug 01 12:19 UTC 2013
  -- BROKEN; do not use. See 1.29

  * Added pairgrep, pairmap, pairs (inspired by List::Pairwise)
  * Added pairkeys and pairvalues

11 years agodump.c: White-space only
Karl Williamson [Thu, 1 Aug 2013 19:05:36 +0000 (13:05 -0600)]
dump.c: White-space only

Indent and wrap lines to correspond with newly formed block

11 years agoExtend sv_dump() to dump SVt_INVLIST
Karl Williamson [Tue, 23 Jul 2013 16:48:20 +0000 (10:48 -0600)]
Extend sv_dump() to dump SVt_INVLIST

This changes the previously unused _invlist_dump() function to be called
from sv_dump() to dump inversion list scalars.  The format for regular
SVt_PVs doesn't give human-friendly output for these.

Since these lists are currently not visible outside the Perl core, the
format is documented only in comments in the function itself.

11 years agoversion's test files are not excluded from blead
Steve Hay [Thu, 1 Aug 2013 12:43:21 +0000 (13:43 +0100)]
version's test files are not excluded from blead

They were added long ago by 543eec9e19.

11 years agoSet a large thread stack when running the regex tests in a thread.
Nicholas Clark [Tue, 30 Jul 2013 17:59:48 +0000 (19:59 +0200)]
Set a large thread stack when running the regex tests in a thread.

For testing ithreads cloning, all the regex tests are run twice. Once
"normally", and once in a child ithread, to verify that all regex
constructions can be cloned.

The recently added tests for backreferences starting with 8 or 9 causes a
lot of C recursion in the child thread, enough to bust the default thread
stack size on (at least) HP-UX. So set a large explicit thread stack size.
It doesn't matter that it's large, as we are only running one child thread.

11 years agoUse undef rather than 'undef' for Devel::PPPort's UPSTREAM status
Steve Hay [Thu, 1 Aug 2013 08:10:46 +0000 (09:10 +0100)]
Use undef rather than 'undef' for Devel::PPPort's UPSTREAM status

All other undefined UPSTREAM statuses are undef rather than 'undef'
already, which causes core-cpan-diff to emit 'upstream is: UNKNOWN!'
rather than 'upstream is: undef', which is probably the intended effect
since it indicates the status is not known rather than specifically
undefined.

11 years agoNote that three more test files are excluded from XSLoader
Steve Hay [Thu, 1 Aug 2013 07:58:30 +0000 (08:58 +0100)]
Note that three more test files are excluded from XSLoader

11 years agoPATCH: [perl #119101] Extraneous warnings in Parse::ErrorString::Perl
Karl Williamson [Wed, 31 Jul 2013 21:05:43 +0000 (15:05 -0600)]
PATCH: [perl #119101] Extraneous warnings in Parse::ErrorString::Perl

(Since 5.18.0)

This is from https://rt.cpan.org/Ticket/Display.html?id=87458.

Working on this ticket caused me to be more certain of the advisability
of the deprecation message that was added in v5.18.0, and which was
inappropriately being raised in the test suite for this module.

The message notes that escaping the metacharacter '{', '[', or '(')
doesn't actually do anything in a pattern whose delimiters are {} [] or
() respectively.

The code in question looked something like

    my $pat = "m{\Q$foo}";
    ...
    eval "$bar =~ $pat";

where $foo comes from somewhere else and contained something like
\x{61}.  The message should not be raised because the \Q changes that to
\\x\{61\}, and so the \x loses its special meaning as well, and the left
brace is not a metacharacter in this context.  The solution is to look
at all the backslashes before the 'x' and only raise the message if
there are an odd number of them.

But, if $foo had been something like "bar{3}", the \Q would have
transformed that into "bar\{3\}.  In the code above, this matches
"b" followed by "a" followed by 3 "r"s.

Similarly for [] and ().

    my $foo = "(abc)";
    my $pat = "m(\Q$foo)";
    ...
    eval "$bar =~ $pat";

will not match the parens in $foo literally, but treat them as marking a
group.

The bottom line is that currently you cannot rely on \Q to properly
quote in a regex pattern in which the delimiters are mirrored
metacharacters.  The only current safe mirrored delimiters are <>, which
are not metacharacters.  Starting in 5.18.0, there is a default-on
message that catches this.  Starting with this commit, certain false
positives have been removed, and I know of none other.

11 years agoHandle /[#]/ and /[(?#]/ with code blocks
David Mitchell [Wed, 31 Jul 2013 21:41:17 +0000 (22:41 +0100)]
Handle /[#]/ and /[(?#]/ with code blocks

This is a regression in 5.18.0.

In something like /[#](?{})/x, the perl toker incorrectly sees the '#' as a
comment and skips the code block without parsing it.

11 years agopp_match(): remove some superfluous braces
David Mitchell [Wed, 31 Jul 2013 09:29:49 +0000 (10:29 +0100)]
pp_match(): remove some superfluous braces

11 years agopp_match(): only look up pos() magic once
David Mitchell [Wed, 31 Jul 2013 09:13:31 +0000 (10:13 +0100)]
pp_match(): only look up pos() magic once

Currently before matching, we see whether the SV has any pos() magic
attached; then after the match we look it up again to update pos().
Instead just remember the previous value of mg and reuse it where
possible.

11 years agopp_match(): remove redundant condition
David Mitchell [Wed, 31 Jul 2013 09:08:18 +0000 (10:08 +0100)]
pp_match(): remove redundant condition

a successful match always sets $-[0] now, so there's no need to check
whether its set

11 years agoFix ordering of modules and pragmata in perldelta.pod
Steve Hay [Wed, 31 Jul 2013 07:52:51 +0000 (08:52 +0100)]
Fix ordering of modules and pragmata in perldelta.pod

11 years agoUpgrade parent from 0.225 to 0.226
Steve Hay [Wed, 31 Jul 2013 07:51:36 +0000 (08:51 +0100)]
Upgrade parent from 0.225 to 0.226

11 years agoperlsub: constant -> inlinable
Father Chrysostomos [Wed, 31 Jul 2013 03:09:36 +0000 (20:09 -0700)]
perlsub: constant -> inlinable

This was brought up in ticket #109744.  I cannot change the header of
the section, as it will break links.  But at least we can avoid
stressing the constancy as much.

11 years agoRemove semicolon from inline TYPEMAP in perlxstut example.
Nathan Trapuzzano [Tue, 30 Jul 2013 23:10:20 +0000 (19:10 -0400)]
Remove semicolon from inline TYPEMAP in perlxstut example.

11 years agoregcomp.c: Fix yet another C89 problem
Karl Williamson [Wed, 31 Jul 2013 00:29:37 +0000 (18:29 -0600)]
regcomp.c: Fix yet another C89 problem

In my haste to get a42823ac3c233f0a9b8aefaac74a3b1e1600e6f6 out, I
neglected to see this second instance of a improperly placed
declaration.

11 years agoregcomp.c: Properly declare variable with C89
Karl Williamson [Tue, 30 Jul 2013 23:00:27 +0000 (17:00 -0600)]
regcomp.c: Properly declare variable with C89

Commit 89d3fa0ee43d5c7489581a62b3d662c316bfcb43 introduced a syntax
error under C89 compilers, as it removed braces so a declaration wasn't
the first thing in a block.  This adds a declaration in the proper
place.

11 years agoRT #118213: handle $r=qr/.../; /$r/p properly
David Mitchell [Tue, 30 Jul 2013 15:16:35 +0000 (16:16 +0100)]
RT #118213: handle $r=qr/.../; /$r/p properly

In the case where a qr// regex is directly used by PMOP (rather than being
interpolated with some other stuff and a new regex created, such as
/a$r/p), then the PMf_KEEPCOPY flag will be set on the PMOP, but the
corresponding RXf_PMf_KEEPCOPY flag *won't* be set on the regex.

Since most of the regex handling for copying the string and extracting out
${^PREMATCH} etc is done based on the RXf_PMf_KEEPCOPY flag in the regex,
this is a bit of a problem.

Prior to 5.18.0 this wasn't so noticeable, since various other bugs around
//p handling meant that ${$PREMATCH} etc often accidentally got set
anyway. 5.18.0 fixed these bugs, and so as a side-effect, exposed the
PMOP verses regex flag issue. In particular, this stopped working in
5.18.0:

    my $pat = qr/a/;
    'aaaa' =~ /$pat/gp or die;
    print "MATCH=[${^MATCH}]\n";

(prints 'a' in 5.16.0, undef in 5.18.0).
The presence /g caused the engine to copy the string anyway by luck.

We can't just set the RXf_PMf_KEEPCOPY flag on the regex if we see the
PMf_KEEPCOPY flag on the PMOP, otherwise stuff like this will be wrong:

    $r = qr/..../;
    /$r/p;  # set RXf_PMf_KEEPCOPY on $r
    /$r/; # does a /p match by mistake

Since for 5.19.x onwards COW is enabled by default (and cheap copies are
always made regardless of /p), then this fix is mainly for PERL_NO_COW
builds and for backporting to 5.18.x. (Although it still applies to
strings that can't be COWed for whatever reason).

Since we can't set a flag in the rx, we fix this by:

1) when calling the regex engine (which may attempt to copy part or all of
the capture string), make sure we pass REXEC_COPY_STR, but neither of
REXEC_COPY_SKIP_PRE, REXEC_COPY_SKIP_POST when we call regexec() from
pp_match or pp_subst when the corresponding PMOP has PMf_KEEPCOPY set.

2) in Perl_reg_numbered_buff_fetch() etc, check for PMf_KEEPCOPY in
PL_curpm as well as for RXf_PMf_KEEPCOPY in the current rx before deciding
whether to process ${^PREMATCH} etc.

As well as adding new tests to t/re/reg_pmod.t, I also changed the
string to be matched against from being '12...' to '012...', to ensure that
the lengths of ${^PREMATCH}, ${^MATCH}, ${^POSTMATCH} would all be
different.

11 years agoregcomp.c: Remove extraneous debug info
Karl Williamson [Tue, 30 Jul 2013 17:27:20 +0000 (11:27 -0600)]
regcomp.c: Remove extraneous debug info

Prior to this commit the prhase {unicode} was emitted to mark what a
bracketed character class matched that wasn't in that classes bitmap.
This was oftern accompanied by another phrase that gave further
details.  Since everything is {unicode}, the first phrase isn't very
helpful.  Now it is changed to {utf8} for those things that won't match
unless the target string is in utf8 (this includes some upper latin1
code points under /d matches), or {outside bitmap} for where utf8 isn't
necessasily required (this happens for user-defined Unicode properties
that aren't known at compile time).

11 years agoregcomp.c: White-space only
Karl Williamson [Tue, 30 Jul 2013 17:21:11 +0000 (11:21 -0600)]
regcomp.c: White-space only

Outdent code which the previous commit removed from a block.

11 years agoregcomp.c: Remove redundant code
Karl Williamson [Tue, 30 Jul 2013 17:16:56 +0000 (11:16 -0600)]
regcomp.c: Remove redundant code

This code is redundant, attempting to output what isn't returned in 'lv'
by reglcass_swash(), but that function makes sure that 'lv' contains
everything it should, so we ended up processing (and outputting) the
same data twice.

11 years agoregexec.c: Add, clarify comments
Karl Williamson [Tue, 30 Jul 2013 16:51:35 +0000 (10:51 -0600)]
regexec.c: Add, clarify comments

11 years agoregcomp.c: Change Debug output of char classes
Karl Williamson [Sun, 28 Jul 2013 01:10:27 +0000 (19:10 -0600)]
regcomp.c: Change Debug output of char classes

This commit causes the debug output that was formerly "\x4ff", for
example to be \x{4f}f.  It always puts braces around the hex to separate
it from other characters.

11 years agoregcomp.c: Debug output clearer ranges
Karl Williamson [Sun, 28 Jul 2013 00:45:18 +0000 (18:45 -0600)]
regcomp.c: Debug output clearer ranges

It's not immediately obvious what the character class [!-~] matches.
Better is its equivalent: [\x21-\x7e].  This commit changes the debug
output to be the latter for character class matches, while retaining the
current behavior where it is clear what the range matches, in, e.g.,
[J-R].  Ranges like [A-z] include more than just alphabetics, so they
are now output as [\x41-\x7a].  (Debug output is done, for example, when
the command line option -Dr is specified.)

11 years agoregcomp.c: White-space only
Karl Williamson [Sun, 28 Jul 2013 00:21:40 +0000 (18:21 -0600)]
regcomp.c: White-space only

This indents properly to correspond to a newly formed block

11 years agoregcomp.c: Change debug output to use \t, etc instead of hex
Karl Williamson [Sun, 28 Jul 2013 00:19:29 +0000 (18:19 -0600)]
regcomp.c: Change debug output to use \t, etc instead of hex

It is easier to read the standard abbreviations \t, \n, etc than the hex
equivalents, \x09, ...

11 years agoregcomp.c: Extract duplicated code into single fcn
Karl Williamson [Sun, 28 Jul 2013 00:14:12 +0000 (18:14 -0600)]
regcomp.c: Extract duplicated code into single fcn

This code that appears twice is nearly duplicate.

11 years agoRegen t/porting/known_pod_issues.dat.
Karl Williamson [Tue, 30 Jul 2013 17:39:02 +0000 (11:39 -0600)]
Regen t/porting/known_pod_issues.dat.

This silences a warning that shows up under pedantic mode

11 years agoregcomp.c: Fix potential scalar leak
Karl Williamson [Fri, 26 Jul 2013 20:26:27 +0000 (14:26 -0600)]
regcomp.c: Fix potential scalar leak

The lines in this code were reversed.  We need to check something before
overwriting it, rather than the other way around.  The result would be
that under certain circumstances a SV would not get freed.  Those
circumstances are very limited: the first of the three parameters to
this function is not empty, but the 2nd is, and the output (3rd
parameter) is to overwrite the 2nd.  I found this bug by code reading; I
have searched the code space and there are no current calls to it that
have this parameter configuration, therefore there is no test that can
be added to trigger it.

11 years agoregcomp.c: Change #ifdef
Karl Williamson [Thu, 25 Jul 2013 02:02:40 +0000 (20:02 -0600)]
regcomp.c: Change #ifdef

This function is currently #ifdef'd out.  Change it so that enabling it
in embed.fnc automatically enables it here as well, making a 2 step
process into just a single step.

11 years agoMention the 'make clean' makefile target [perl #38307].
Andy Dougherty [Tue, 30 Jul 2013 14:57:32 +0000 (10:57 -0400)]
Mention the  'make clean' makefile target [perl #38307].

Mention the 'make clean' target in INSTALL.  It cleans up a lot,
but not everything.  Since perl is used extensively in its own
build process, it may involve attempting to build perl in order
to clean up.  Alternatively, we could just make 'clean' an
alias for 'realclean'.

11 years agoRemove four Module-Build files which were removed in 4.006 but left in core
Steve Hay [Tue, 30 Jul 2013 15:16:29 +0000 (16:16 +0100)]
Remove four Module-Build files which were removed in 4.006 but left in core

11 years agoUpgrade Config-Perl-V from 0.18 to 0.19
Steve Hay [Tue, 30 Jul 2013 13:19:20 +0000 (14:19 +0100)]
Upgrade Config-Perl-V from 0.18 to 0.19

11 years agoSkip trailing constants when searching pads
Father Chrysostomos [Tue, 30 Jul 2013 03:40:24 +0000 (20:40 -0700)]
Skip trailing constants when searching pads

Under ithreads, constants and GVs are stored in the pad.

When names are looked up up in a pad, the search begins at the end and
works its way toward the beginning, so that an $x declared later masks
one declared earlier.

If there are many constants at the end of the pad, which can happen
for generated code such as lib/unicore/TestProp.pl (which has about
100,000 lines and over 500,000 pad entries for constants at the
end of the file scope’s pad), it can take a long time to search
through them all.

Before commit 325e1816, constants used &PL_sv_undef â€˜names’.  Since
that is the default value for array elements (when viewed directly
through AvARRAY, rather than av_fetch), the pad allocation code did
not even bother storing the â€˜name’ for these.  So the name pad (aka
padnamelist) was not extended, leaving just 10 entries or so in the
case of lib/unicore/TestProp.pl.

Commit 325e1816 make pad constants have &PL_sv_no names, so the
name pad would be implicitly extended as a result of storing
&PL_sv_no, causing a huge slowdown in t/re/uniprops.t (which runs
lib/unicore/TestProp.pl) under threaded builds.

Now, normally the name pad *does* get extended to match the pad,
in pad_tidy, but that is skipped for string eval (and required
file scope, of course).  Hence, wrapping the contents of
lib/unicore/TestProp.pl in a sub or adding â€˜my $x’ to end of it will
cause the same slowdown before 325e1816.

lib/unicore/TestProp.pl just happened to be written (ok, generated) in
such a way that it ended up with a small name pad.

This commit fixes things to make them as fast as before by recording
the index of the last named variable in the pad.  Anything following
that is disregarded in pad lookup and search begins with the last
named variable.  (This actually does make things faster before for
subs with many trailing constants in the pad.)

This is not a complete fix.  Adding â€˜my $x’ to the end of a large file
like lib/unicore/TestProp.pl will make it just as slow again.

Ultimately we need another algorithm, such as a binary search.

11 years agoNote that five new meta/pod tests are excluded from the Filter distro
Steve Hay [Tue, 30 Jul 2013 12:28:17 +0000 (13:28 +0100)]
Note that five new meta/pod tests are excluded from the Filter distro

11 years agoConfig-Perl-V 0.19 released
H.Merijn Brand [Tue, 30 Jul 2013 13:06:19 +0000 (15:06 +0200)]
Config-Perl-V 0.19 released

11 years agoNo need to prefix $(LDLIBPTH) when running $(CC) to link perl and miniperl.
Nicholas Clark [Fri, 27 Apr 2012 15:56:34 +0000 (17:56 +0200)]
No need to prefix $(LDLIBPTH) when running $(CC) to link perl and miniperl.

When perl is build with a shared perl library, $(LDLIBPTH) is used to prefix
the appropriate LD_LIBRARY_PATH=... before commands in the Makefile so that
the uninstalled ./perl will be able to find it.

Commit c4f23d77f4b3486a (in May 1998) added the code for LDLIBPTH, but also
added it to the default command line used to invoke $(CC) to link perl and
miniperl. These commands don't need to run ./perl, hence the use of
$(LDLIBPTH) is superfluous here. Removing it makes the code simpler.

$(LDLIBPTH) was first removed in commit d182087b9c1b8811 (April 2003), but
that change was reverted by commit f913803b6e67ae4c (in Aug 2003) as part of
an attempt to fix problems reported by a perl smoker on a platform where the
C compiler is actually a Perl wrapper script. However, from subsequent
discussion it seems that the reversion didn't actually fix the problem, and
both the documentation of LD_LIBRARY_PATH and attempting to replicate the
smoker's setup suggest that this particular change is independent of the
problem. I can't replicate the smoker's reported problems building a shared
library perl with (or without) this commit on a current Power Linux machine
using a Perl script to wrap the C compiler, where the #! line on that Perl
script is an install of perl 5.8.0 also using a shared perl library. Hence
I'm confident that this change is independent of the true cause of the
smoker's problems. See the discussion in RT #23212 for more details.

11 years agoUpdate Socket from 2.010 to 2.011
Steve Hay [Mon, 29 Jul 2013 16:56:12 +0000 (17:56 +0100)]
Update Socket from 2.010 to 2.011

11 years ago[perl #118525] make it work on threaded builds
Tony Cook [Tue, 30 Jul 2013 04:41:56 +0000 (14:41 +1000)]
[perl #118525] make it work on threaded builds

11 years agoperldelta for 486b1e7f0
Tony Cook [Mon, 29 Jul 2013 23:50:23 +0000 (09:50 +1000)]
perldelta for 486b1e7f0

11 years agoCvGV is no longer a simple struct member access
Tony Cook [Thu, 25 Jul 2013 02:09:00 +0000 (12:09 +1000)]
CvGV is no longer a simple struct member access

The same slot is also used for the NAME_HEK for lexical subs, so:

- split B::CV::GV out into its own function that uses the CvGV macro

- add B::CV::NAME_HEK so the name of a lexical sub can be fetched

11 years agoDocument $DynaLoader::dl_dlext, per sisyphus++.
James E Keenan [Sat, 27 Jul 2013 02:10:58 +0000 (22:10 -0400)]
Document $DynaLoader::dl_dlext, per sisyphus++.

With one modification suggested by Andy Dougherty; version bump to 1.19.

For: RT #119031

11 years agoAdd Aristotle to the list of The Keepers of the Pumpkin
Steve Hay [Mon, 29 Jul 2013 17:06:37 +0000 (18:06 +0100)]
Add Aristotle to the list of The Keepers of the Pumpkin

11 years agoPhilip Boulain is now a perl AUTHOR, and bump a version
Tony Cook [Mon, 29 Jul 2013 06:34:07 +0000 (16:34 +1000)]
Philip Boulain is now a perl AUTHOR, and bump a version

11 years agoReap child in case where exception has been thrown
Philip Boulain [Mon, 3 Sep 2012 14:16:26 +0000 (15:16 +0100)]
Reap child in case where exception has been thrown

If open3 throws due to an issue such as an exec failure, the caller
cannot know the child PID to wait for. Therefore it is our
responsibility to reap it.

Also update POD, since on some platforms exec failures now ARE raised as
exceptions (since perlbug #72016).

11 years agoRefactor ext/Pod-Functions/Functions_pm.PL to use Test::More instead of making TAP...
Colin Kuskie [Wed, 3 Oct 2012 00:13:02 +0000 (17:13 -0700)]
Refactor ext/Pod-Functions/Functions_pm.PL to use Test::More instead of making TAP by hand.

11 years ago[perl #52000] use PL_exit_flags in the test so it works non-threaded
Tony Cook [Mon, 29 Jul 2013 06:04:29 +0000 (16:04 +1000)]
[perl #52000] use PL_exit_flags in the test so it works non-threaded

11 years ago[perl #52000] Warn/abort on attempted perl exit
Tony Cook [Mon, 29 Jul 2013 05:44:15 +0000 (15:44 +1000)]
[perl #52000] Warn/abort on attempted perl exit

11 years ago[perl #52000] add perldiag entries for the new warnings
Tony Cook [Mon, 29 Jul 2013 05:38:58 +0000 (15:38 +1000)]
[perl #52000] add perldiag entries for the new warnings

11 years agoJohn Gardiner Myers is now a perl AUTHOR
Tony Cook [Mon, 29 Jul 2013 05:36:26 +0000 (15:36 +1000)]
John Gardiner Myers is now a perl AUTHOR

11 years ago[perl #52000] Warn/abort on attempted perl exit
John Gardiner Myers [Mon, 29 Jul 2013 05:33:09 +0000 (15:33 +1000)]
[perl #52000] Warn/abort on attempted perl exit

11 years ago[perl #114964] Correct 'ref' func POD to fix bad behavior around 'class matching'
Tony Cook [Mon, 29 Jul 2013 04:24:58 +0000 (14:24 +1000)]
[perl #114964] Correct 'ref' func POD to fix bad behavior around 'class matching'

11 years agomention reftype too
Tony Cook [Mon, 29 Jul 2013 04:23:07 +0000 (14:23 +1000)]
mention reftype too

11 years agoBrendan Byrd is now a perl AUTHOR
Tony Cook [Mon, 29 Jul 2013 04:09:58 +0000 (14:09 +1000)]
Brendan Byrd is now a perl AUTHOR

11 years agoCorrect 'ref' func POD to fix bad behavior around "class matching"
Brendan Byrd [Wed, 19 Sep 2012 14:32:40 +0000 (10:32 -0400)]
Correct 'ref' func POD to fix bad behavior around "class matching"

11 years agocomments only, explain the different ONE_AT_A_TIME algos
Daniel Dragan [Sat, 27 Jul 2013 02:01:00 +0000 (22:01 -0400)]
comments only, explain the different ONE_AT_A_TIME algos

Seeing 3 hash algos with the same name is confusing. If they are the same
name ("one at a time"), then why are there 3 different ones? What are the
differences (without reading the code)? What are the pros and cons of each?
INSTALL lists the ONE_AT_A_TIME algos as existing, but doesn't explain why
there are 3 of them. Patch with jkeenan suggestions.

11 years agoperldelta for 2f222bbd/#119051 (\&$glob crashing)
Father Chrysostomos [Sun, 28 Jul 2013 21:12:28 +0000 (14:12 -0700)]
perldelta for 2f222bbd/#119051 (\&$glob crashing)

11 years ago[perl #119055] Make qq with no vars read-only
Father Chrysostomos [Sun, 28 Jul 2013 21:10:10 +0000 (14:10 -0700)]
[perl #119055] Make qq with no vars read-only

In commit 2484f8db I stopped constant folding from changing the read-
onliness of expressions like 1+2, which should return mutable values,
seeing that ${\1}+2 returns a mutable value.  (After all, constant
folding is supposed to be solely an optimisation, without changing
behaviour.)

This is accomplished by turning on the PADTMP flag, which tells opera-
tors like \ to copy the scalar.

I did not realise at the time that some qq strings like "hello\n" and
qq "foo" (but not just "foo") are implemented using constant folding.
The lexer outputs something like stringify("foo"), which is compiled
down to a stringify op with a constant ("foo") as its only child.

In this case we really do want qq"foo" to be treated as a single con-
stant.  That it is implemented using folding while "foo" is not is an
implementation detail we should hide.

So turn off the PADTMP flag when folding a stringify op.

11 years agoExempt clang from -Wunused-value when run as cc
Father Chrysostomos [Sun, 28 Jul 2013 20:21:24 +0000 (13:21 -0700)]
Exempt clang from -Wunused-value when run as cc

We already have an exception for it when called as clang or clang-1.2.3,
but not when called as cc or anything else.  Mac OS X Mountain Lion
therefore ends up spitting out lots of warnings, as cc is a symlink
to clang.

11 years ago[perl #119043] Exempt shared hash key consts from ro
Father Chrysostomos [Sun, 28 Jul 2013 20:19:33 +0000 (13:19 -0700)]
[perl #119043] Exempt shared hash key consts from ro

Commit 19130678b4 stopped copy-on-write scalars from being exempt from
readonliness in ck_svconst (called for every OP_CONST).  That was for
the sake of consistency.

It turns out this breaks CPAN modules, so change it back, but only for
shared hash key scalars, not other COW scalars.

This is an historical artefact left over from when copy-on-write used
the read-only flag without the scalar actually being read-only.

11 years ago[perl #119045] Make list constant mutable again
Father Chrysostomos [Sun, 28 Jul 2013 20:01:59 +0000 (13:01 -0700)]
[perl #119045] Make list constant mutable again

This broke CPAN.  Maybe we need to rethink this....

11 years ago[perl #119051] Fix crash with \&$glob_copy
Father Chrysostomos [Sun, 28 Jul 2013 19:35:47 +0000 (12:35 -0700)]
[perl #119051] Fix crash with \&$glob_copy

$ref = *Foo::nosub;
\&$ref;

The assignment creates a glob copy (coercible glob; one that down-
grades back to a simple scalar when assigned to).

\&$ref autovivifies a stub in that glob.  The CvGV pointer ends up
pointing to $ref, rather than *Foo::nosub.  $ref can easily cease
being a glob.  So crashes happen.

Stub autovivification used to stringify the glob, look it up again by
name, and then vivify the stub in the glob.

In commit 186a5ba82d584 I removed what seemed like a waste of CPU
cycles, but apparently it served some purpose.  The lookup caused CvGV
to point to *Foo::nosub, rather than $x.

This commit restores the stringfy-and-lookup if the glob is coercible
(SvFAKE).  It goes a little further and turns off the SvFAKE flag if
the glob just looked up is also FAKE.

It turns out this bug is old, and has been triggerable via glob copies
in stash elements for a long time.  186a5ba82d584 made it easier to
trigger the bug (so it is a regression from 5.16).

11 years ago[MERGE] refactor pp_match(), pp_subst(), regexec()
David Mitchell [Sun, 28 Jul 2013 13:09:44 +0000 (14:09 +0100)]
[MERGE] refactor pp_match(), pp_subst(), regexec()

Notionally the regexec engine has a well-defined API.
In practice, the caller of regexec() (typically pp_match() or pp_subst()),
is required to do a lot of set-up before calling regexec(), and some
post-processing afterwards; in particular to handle \G, to handle intuit,
and to set up $& correctly after an intuit-only match.

The series of commits in this branch refactors the code around these three
functions so that all the regex "knowledge"  is now contained within
regexec() rather than in the calling pp functions. At the same, time the
pp functions have been heavily cleaned up and simplified where possible.
This reduces the LOC in pp_match() from 305 to 186.

The most visible refactorisation changes are that:

* the call to intuit is now done from regexec() rather than from pp*;

* ditto the setting of $& on intuit-only matches;

* all the extra setup for \G is now in a single block of code in regexec(),
  rather than being distributed haphazardly across all 3 functions;

Along the way various things have been improved and bugs have been fixed:

* intuit-only matches had been inadvertently disabled when COW was enabled;
  this now fixed. (An intuit-only match is where intuit finding a suitable
  start position is sufficient to determine that the pattern has matched,
  e.g. a fixed string pattern /abc/ without captures);

* intuit-only substitutions had never been enabled; they are now;
  e.g /s/foo/bar/g

* formerly, intuit was skipped in the presence of anchored \G; this is no
  longer the case, so that something like "aaaa" =~ /\G.*xx/ now fails
  quickly due to the missing "xx";

* the COW code will try to reuse the COW copy SV on subsequent captures on
  the same regex and string, rather than freeing and reallocating.

* substitutions will no longer permit themselves to iterate "backwards",
  e.g. with s/.(?=.\G)/x/g;

* some obscure utf8 issues with s/// have been fixed;

* some bugs with \G fixed (and probably new ones added)

11 years agoregexec(): add quick-fail test for anchored \G
David Mitchell [Sun, 21 Jul 2013 10:57:22 +0000 (11:57 +0100)]
regexec(): add quick-fail test for anchored \G

under anchored \G, e.g. /ab\G/, we know that the start of the match must
be at (ganch-gofs); so fail quickly if that's off the beginning of the
string; or use it as the start point otherwise.

11 years agoregexec: swap ganch setting and gofs offsetting
David Mitchell [Sun, 21 Jul 2013 10:31:21 +0000 (11:31 +0100)]
regexec: swap ganch setting and gofs offsetting

These two block of code are currently independent of each other, but swap
them round so that the calculated ganch value will be available for more
more clever gofs offset processing.

11 years agofix COW match capture optimisation
David Mitchell [Sat, 20 Jul 2013 15:16:10 +0000 (16:16 +0100)]
fix COW match capture optimisation

When an SV matches, a new SV is created which is a COW copy of the original
SV, and stored in prog->saved_copy, then prog->subbeg is set to point to
the (shared) PVX buffer.

Earlier in this branch I introduced an optimisation that skipped freeing
the old saved_copy and creating a new COW SV each time, if the old
saved_copy SV was already a shared copy of the SV being matched.

So far so good, except that I implemented it wrongly: if non-COW
matches (which malloc() subbeg) are interspersed with COW matches,
then the subbeg of the COW and the malloced subbeg get mixed up and
AddressSanitizer throws a wobbly.

The fix is simple: in the optimised branch, we still need to free subbeg
if RXp_MATCH_COPIED is true, then reassign it.

11 years agoregexec(): avoid uninit use of var
David Mitchell [Fri, 19 Jul 2013 21:00:23 +0000 (22:00 +0100)]
regexec(): avoid uninit use of var

clang pointed out that

    if (...)
goto phooey;
    oldsave = PL_savestack_ix;
    ...
  phooey:
    LEAVE_SCOPE(oldsave);

could use oldsave uninitialised. clang 1, dave 0.

11 years agofix /test_bootstrap.t under -DPERL_NO_COW
David Mitchell [Fri, 19 Jul 2013 20:44:32 +0000 (21:44 +0100)]
fix /test_bootstrap.t under -DPERL_NO_COW

These tests check whether "require test.pl" inadvertently use $& etc.
They do that by doing a simple pattern match "Perl/ =~ /Perl/, then
checking that eval '$&' returns undef.

This has always been a dodgy thing o rely on. It turns out that under
5.18.0, whether eval '$&' was undef depended on whether the intuit-only-
match codepath was taken. So:

"Perl" =~ /Perl/;   eval '$&';   # intuit-only match: returned undef
"Perl" =~ /\w+\w*/; eval '$&';   # regexec() match: returned 'Perl'.

In this branch, the same code path is now used for both intuit() and
regexec() matches, so both return 'Perl'.

So, abandon this approach to the test, and instead read in tets.pl and
grep for the test '$&' etc.
Requires  minor fixup to test.pl to avoid a false positive.

11 years agofix build under -DPERL_NO_COW
David Mitchell [Fri, 19 Jul 2013 19:07:56 +0000 (20:07 +0100)]
fix build under -DPERL_NO_COW

An earlier commit in this branch fixed up capturing on intuit-only
matches.
However, the new code grabbed the buffer before setting offs[0].start,
offs[0].end.  Under old-style non-COW, it uses offs[0].start and end to
determine what subset to the buffer to capture. So set them first!

11 years agoregexec(): access extflags directly
David Mitchell [Fri, 19 Jul 2013 17:12:53 +0000 (18:12 +0100)]
regexec(): access extflags directly

Some bits of code that had been moved from pp_match() etc into
regexec() still used the external API to access flags, i.e.

    RX_EXTFLAGS(rx)

Replace those uses with the more direct

    prog->extflags

for consistency with the rest of the code.

11 years agoregexec(): tidy up ganch-setting code
David Mitchell [Fri, 19 Jul 2013 16:44:34 +0000 (17:44 +0100)]
regexec(): tidy up ganch-setting code

Its a bit verbose with tons of debugging statements. Hard to see the wood
for the trees.

11 years agoregexec(): merge the 2 RXf_GPOS_SEEN setup blocks
David Mitchell [Fri, 19 Jul 2013 16:29:01 +0000 (17:29 +0100)]
regexec(): merge the 2 RXf_GPOS_SEEN setup blocks

Change

    if (RXf_GPOS_SEEN) {
        ... adjust startpos ...
    }
    ...
    if (RXf_GPOS_SEEN) {
        ... calculate ganch ...
    }

to

    if (RXf_GPOS_SEEN) {
        ... adjust startpos ...
        ... calculate ganch ...
    }
    ...

Should contain no functional changes.

With this commit (building on many previous ones in this branch), all the
setup for \G is now in one place in regexec(), rather than scattered
across various places in pp_match(), regexec() etc.

11 years agoregexec(): simplify RXf_ANCH_GPOS pos calc
David Mitchell [Fri, 19 Jul 2013 16:10:04 +0000 (17:10 +0100)]
regexec(): simplify RXf_ANCH_GPOS pos calc

There are two bits of code in regexec() that do special handling for
RXf_ANCH_GPOS:

First, after setting ganch from pos(), it does a couple of quick-fail
checks:
    fail if s > ganch
    fail if (ganch - gofs) < strbeg
at this point it also updates s to be ganch - gofs, although confusingly,
s in not subsequently used.

Second, when about to call regtry, it calculates a new  start value
(ignoring the old one, s):

    tmps_s = ganch - gofs;

then checks:
    fail if tmp_s < strbeg

As can be seen, these two sets of tests essentially partially duplicate
each other.

This commit moves all the work to the second block of code, which
simplifies things, and makes the first block of code purely about
calculating ganch.

Note that the new condition added by this commit in the second block,

    fail if s > tmp_s (i.e if s > (ganch - gofs))

subsumes both previous conditions, since
a) it is stronger than s > ganch
b) s will be >= strbeg, so tmp_s >= strbeg

11 years agoregexec(): use regtry(&s) not regtry(&startpos)
David Mitchell [Fri, 19 Jul 2013 15:37:04 +0000 (16:37 +0100)]
regexec(): use regtry(&s) not regtry(&startpos)

regexec() has several cases such as anchored, floating etc, and for each
of these it will call regtry() one or more times to match at likely
starting positions. In all cases but one, it calls regtry(&s), where
s is the current start position that moves as we try new positions. In
the one final case it uses startpos instead, which is supposed to be static.
The actual code looks like:

    if (s == startpos && regtry(&startpos))

which might seem harmless, but under things like (*COMMIT), regtry can
update the pointer value (which is why its address is taken). So in this
(obscure) case, the wrong pointer gets updated.

11 years agos/.(?=.\G)/X/g: refuse to go backwards
David Mitchell [Tue, 16 Jul 2013 15:31:04 +0000 (16:31 +0100)]
s/.(?=.\G)/X/g: refuse to go backwards

On something like:

    $_ = "123456789";
    pos = 6;
    s/.(?=.\G)/X/g;

each iteration could in theory start with pos one character to the left
of the previous position, and with the substitution replacing bits that
it has already replaced.  Since that way madness lies, ban any attempt by
s/// to substitute to the left of a previous position.

To implement this, add a new flag to regexec(), REXEC_FAIL_ON_UNDERFLOW.
This tells regexec() to return failure even if the match itself succeeded,
but where the start of $& is before the passed stringarg point.

This change caused one existing test to fail (which was added about a year
ago):

    $_="abcdef";
    s/bc|(.)\G(.)/$1 ? "[$1-$2]" : "XX"/ge;
    print; # used to print "aXX[c-d][d-e][e-f]"; now prints "aXXdef"

I think that that test relies on ambiguous behaviour, and that my change
makes things saner.

Note that s/// with \G is generally very under-tested.

11 years agopp_subst: don't use REXEC_COPY_STR on 2nd match
David Mitchell [Mon, 15 Jul 2013 20:57:34 +0000 (21:57 +0100)]
pp_subst: don't use REXEC_COPY_STR on 2nd match

pp_subst() sets the REXEC_COPY_STR flag on the first match. On the second
and subsequent matches, it doesn't set it in two out three of the branches
(including pp_susbstcont) where it calls CALLREGEXEC().
The one place where it *does* set it is a (harmless) mistake, since regexec
ignores REXEC_COPY_STR if REXEC_NOT_FIRST is set (which is it is, on all 3
brnanches).

So unset REXEC_COPY_STR in the third branch too, for consistency

11 years agopp_subst: combine 3 small elsif blocks into 1
David Mitchell [Mon, 15 Jul 2013 20:24:02 +0000 (21:24 +0100)]
pp_subst: combine 3 small elsif blocks into 1

and slightly reduce the scope of the temporary i var.

11 years agopp_subst: remove one use of 'm' local var
David Mitchell [Mon, 15 Jul 2013 20:10:47 +0000 (21:10 +0100)]
pp_subst: remove one use of 'm' local var

11 years agopp_subst: reduce scope of 'i' variable
David Mitchell [Mon, 15 Jul 2013 20:00:49 +0000 (21:00 +0100)]
pp_subst: reduce scope of 'i' variable

it's just used a temporary var in a few blocks; declare it individually
in each block rather than being scoped to the whole function.

11 years agopp_subst: reduce scope of 'm' var
David Mitchell [Mon, 15 Jul 2013 19:37:44 +0000 (20:37 +0100)]
pp_subst: reduce scope of 'm' var

its mainly just a temporary local var; declare it individually within each
scope that makes use of it.

11 years agopp_subst: set/use s,m vars near where they're used
David Mitchell [Mon, 15 Jul 2013 19:17:51 +0000 (20:17 +0100)]
pp_subst: set/use s,m vars near where they're used

This should be just a cosmetic change; but basically change stuff like

    m = orig;
    s = foo();
    ... lots of lines not using s or m ...
    bar(m,s)
    ... more stuff using s ...

to

    ... lots of lines not using s or m ...
    s = foo();
    bar(orig,s)
    ... more stuff using s ...

This is part of few commits to generally clean up the scope and
comprehensibility of the vars within pp_subst

11 years agopp_subst: reduce scope of 'd' variable
David Mitchell [Mon, 15 Jul 2013 18:54:53 +0000 (19:54 +0100)]
pp_subst: reduce scope of 'd' variable

It's just used as a temporary value in two branches;
so make it a local var in each of those branches.

11 years agopp_subst: cosmetic re-arrangement of vars
David Mitchell [Mon, 15 Jul 2013 18:16:10 +0000 (19:16 +0100)]
pp_subst: cosmetic re-arrangement of vars

since 'orig' always points to the start of the string, while 's' varies,
change

    s = SvPV_nomg(...);
    ...other stuff using value of s ...
    orig = s
    ...

to

    orig = SvPV_nomg(...);
    ...other stuff using value of orig ...
    s = orig
    ...

No functional change, just reduces the cognitive load slightly

also adds some comments as to what force_on_match is about.

11 years agoregexec(): fix ganch and till settings
David Mitchell [Sat, 13 Jul 2013 20:18:50 +0000 (21:18 +0100)]
regexec(): fix ganch and till settings

Since startpos is now the \G-adjusted start position, use the real start
position instead (stringarg) when setting reginfo->till, and when setting
ganch in the non-pos case.

This stops this infinitely looping:

    $_ = "x"; pos = 1; @a = /x\G/g

11 years agoregexec(): skip second intuit() call
David Mitchell [Sat, 13 Jul 2013 19:16:19 +0000 (20:16 +0100)]
regexec(): skip second intuit() call

A few commits ago, the call to intuit() done by the *callers* of
regexec() was moved into regexec() itself. Since regexec() could also call
intuit(), this temporarily led to the situation where intuit() was
harmlessly but inefficiently called twice. The last few commits have
removed the subtle differences between the conditions for each of the two
call points, so the second call to intuit() can now be removed.

A consequence of this is that we have to adjust the usage of the
'startpos' verses 's' variables; the original intent was that
startpos was constant, while s moved forward in the string after intuit
etc. This got a bit lost during the recent reorganisation, but is now
re-established. (startpos isn't quite constant: it will contain any
initial adjustment for \G.)

11 years agofix intuit_start() with \G
David Mitchell [Fri, 19 Jul 2013 01:08:56 +0000 (02:08 +0100)]
fix intuit_start() with \G

Intuit assumed that any anchor, including \G, anchored at BOS or after \n.
This obviously isn't the case for \G, so exclude RXf_ANCH_GPOS from the
RXf_ANCH branch.

This has never been spotted before, since intuit used to be skipped when
\G was present.

11 years agoenable intuit under anchored \G, and fix a bug
David Mitchell [Sat, 13 Jul 2013 14:23:59 +0000 (15:23 +0100)]
enable intuit under anchored \G, and fix a bug

Since 1999, regcomp has had approximately the following comment and code:

    /* XXXX Currently intuiting is not compatible with ANCH_GPOS.
       This should be changed ASAP!  */
    if ((r->check_substr || r->check_utf8) && !(r->extflags & RXf_ANCH_GPOS)) {
        r->extflags |= RXf_USE_INTUIT;
        ....

However, it appears that since that time, intuit has had (at least some)
support for achored \G added.
Note also that the RXf_USE_INTUIT flag (up until a few commits go)
was only used by *callers* of regexec() to decide whether to call intuit()
first; regexec() itself also internally calls intuit() on occasion, and in
those cases it directly checks just the check_substr and check_utf8 fields,
rather than the RXf_USE_INTUIT flag; so in those cases it's using intuit
even in the presence of anchored \G.

So, in the grand perl tradition of "make the change and see if anything
in the test suite breaks", that's what I've done for this commit
(i.e. removed the RXf_ANCH_GPOS check above).

So intuit is now normally called even in the presence of anchored \G.
This means that something like "aaaa" =~ /\G.*xx/ will now quickly fail in
intuit rather than more slowly failing in regmatch().

Note that I have no actual knowledge of whether intuit is *really*
anchored-\G-safe.

As it happens one thing in the test suite did break, and this was due to
the following code, added back in 1997:

    if (
        ....
        && !((RExC_seen & REG_SEEN_GPOS) || (r->extflags & RXf_ANCH_GPOS)))
   )
       r->extflags |= RXf_CHECK_ALL;

It was clearly meant to say that if either of those \G flags were present,
don't set the RXf_CHECK_ALL flag (which enables intuit-only matches).
But the '!' was set to cover the first condition only, rather than both.
Presumably this had never been spotted before due to skipping intuit under
anchored \G.

[Actually this commit broke some other stuff too, not covered by the test
suite.  See the next commit. Hooray for git rebase -i and history
re-writing!]

11 years agoregexec_flags(): remove vestigial scream support
David Mitchell [Wed, 10 Jul 2013 19:00:22 +0000 (20:00 +0100)]
regexec_flags(): remove vestigial scream support

intuit has an arg (data) that used to be used for scream stuff, but which
is now unused. However, Perl_regexec_flags() still went to the trouble of
setting up that parameter when calling intuit. So stop doing that.

11 years agoregexec_flags(): keep stringarg constant
David Mitchell [Wed, 10 Jul 2013 13:28:02 +0000 (14:28 +0100)]
regexec_flags(): keep stringarg constant

stringarg is the arg passed to Perl_regexec_flags() to indicate where to
start matching. Currently the code adjusts this under \G, then copies it
to startpos, then later tinkers with startpos further.

Change it so that stringarg is never changed, and all the adjusting is to
startpos. Shouldn't make any logical difference, but makes the code
slightly cleaner and easier to understand (and doesn't require minend to
be adjusted any more).

11 years agoregexec_flags(): use result of intuit_start()
David Mitchell [Wed, 10 Jul 2013 12:35:51 +0000 (13:35 +0100)]
regexec_flags(): use result of intuit_start()

When I moved the call to re_intuit_start() into Perl_regexec_flags()
a few commits earlier, I assigned the return value to the wrong variable,
so a subsequent match would still start at the beginning, not at the
intuited start point. This commit corrects that, by updating startpos
rather than stringarg.