| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 8db8f6b697e changed the way filetest operators use the stack,
in order to make stacked -t work.
Filetest operators were changed to pop the argument off the stack for
a standalone operator, but to leave it on the stack for a stacking op
(so the next operator could use it). The code for handling overloaded
objects, which was separate, was already doing something similar, by
not popping the object off the stack.
I made the mistake of changing overloaded objects’ return code to
share code with regular filetest operators (the FT_RETURN_* macros),
but without changing the way the overload code got the item from the
stack to begin with. Hence, the returning code assumed that the argu-
ment had been popped for non-stacking ops, which was not the case.
This commit changes the way the overload case does it’s return, to
account for the fact that the object must be left on the stack when
initially fetched from it (in case the object turns out not to have -X
overloading and the regular code has to kick in).
|
|
|
|
| |
A different ‘(eval xxx)’ number was being emitted under miniperl.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch only fixes the problem for croaks that occur in the peep-
hole optimiser or in Perl_finalize_optree.
It does this by doing SAVEFREEOP first and then restoring the
savestack index to its previous value afterwards (to void the effect
of SAVEFREEOP).
A more correct fix might be to do op_free in die_unwind before
POPEVAL, but I would have to do a lot more digging through the code
to tell whether that is safe. I don’t feel comfortable with doing
that for 5.16.
This leak causes this warning on non-threaded debugging builds:
$ PERL_DESTRUCT_LEVEL=1 ./perl -Ilib -e 'BEGIN { $^H{foo} = bar } our %FIELDS; my main $x; eval q[$x->{foo}]'
Unbalanced string table refcount: (1) for "foo" during global destruction.
This problem does not affect the main program, because perl_destruct
frees PL_main_root. It does not affect subroutines, as the op tree is
attached to the CV first, so freeing the CV frees the op tree.
|
|
|
|
|
|
| |
This test doesn’t care what glob actually does in this case, but
merely how many times it calls magic. So suppress any warnings, in
order for tests to pass on VMS.
|
| |
|
|
|
|
|
|
|
| |
This fixes up tests added in the previous commit, making them take
evalbytes into account. Those tests were originally written in a
branch where evalbytes didn’t exist and the unicode_eval feature
was implicitly enabled.
|
|
|
|
|
| |
This meant changing LABEL's definition in perly.y, so most of this
commit is actually from the regened files.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This refactors to test for the hash element being defined before
attempting to use it.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes RT #111842. Example:
"x" =~ /\A(?>(?:(?:)A|B|C?x))\z/
Should match, but didn't due to allowing NOTHING to start a sequence.
See comment in patch for details.
This also changes a test to no longer be TODO, and improves the test
name to explain its purpose.
|
|
|
|
|
| |
These functions should be used in preference to the old ones which can
read beyond the end of the input string.
|
| |
|
|
|
|
|
| |
These functions were replaced long ago, apparently in 5.8, but I didn't
verify that for sure.
|
| |
|
|
|
|
|
| |
This both avoids cluttering the flow of manpage with auxiliary data, and
saves the user from having to extract the script from within the pod file.
|
|
|
|
|
|
| |
Installing the Perl 5 to-do list as a manpage isn't that useful to anyone, as
it's a snapshot that becomes increasingly out of date. Much better to point
anyone interested in contributing direct to git HEAD, to view the current list.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
charnames.t sometimes fails on a test that is expecting a file to be
non-existent. However, other tests in it briefly create a file by that
name. When two instances of the .t are run in parallel, as happens in
some smokes, it could be that the file exists at the time it is expected
not to. The result is a non-reproducible failure. Anyway, that is my
theory. And so this commit changes to use a filename that is used just
by the test for what happens when a file is non-existent, and hence
doesn't ever exist even transiently.
|
|
|
|
| |
See https://github.com/CPAN-API/metacpan-web/issues/485
|
| |
|
|
|
|
|
|
|
|
|
| |
A magic value (such as a tainted string) may not have POK set, so call
SvPV() to find out if there's something in ERRSV to report.
Possibly this should be using SvPV_nomg(), but this is the first
request for magic in this code. Maybe the code above should be
calling SvGETMAGIC() before checking SvROK().
|
| |
|
| |
|
|
|
|
|
|
|
| |
2f137bbd018b assumed that $name is always defined, but it isn't
always, and when it's not the resulting undefined value warning
could corrupt test output and even make TODO tests trigger failure
with "unexpected output at test 0."
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This cleans up and simplifies and extends how the trie
logic interacts with the new node types. This change ultimately
makes the EXACTFU, EXACTFU_SS, EXACTFU_NO_TRIE (renamed to
EXACTFU_TRICKYFOLD) work properly with the trie engine regardless
of whether the string is utf8 or latin1.
This patch depends on the following:
EXACT => utf8 or "binary" text
EXACTFU => either pre-folded utf8, or latin1 that has to be folded as though it was utf8
EXACTFU_SS => special case of EXACTFU to handle \xDF/ss (affects latin1 treatment)
EXACTFU_TRICKYFOLD => special case of EXACTFU to handle tricky non-latin1 fold rules
EXACTF => "old style fold logic" untriable nodetype
EXACTFA => (currently) untriable nodetype
EXACTFL => (currently) untriable nodetype
See the comments in regcomp.sym for these fold types.
This patch involves a number of distinct, but related parts. Starting
from compilation:
* Simplify how we detect a triable sequence given the new nodetypes,
this also probably fixed some "bugs" in how we detected certain
sequences, like /||foo|bar/.
* Simplify how we read EXACTFU nodes under utf8 by removing the now
redundant folding logic (EXACTFU nodes under utf8 are prefolded).
Also extend this logic to handle latin1 patterns properly (in
conjunction with other changes)
* Part of the problems associated with EXACTFU_SS and EXACTFU_TRICKYFOLD
have to do with how the trie logic interacts with the minlen logic.
This change handles both by pessimising the minlen when encounting
these nodetypes. One observation is that the minlen logic is basically
broken, and works only because it conflates bytes and codepoints in
such a way that we more or less always get a value small enough that things work out
anyway. Fixing that is properly is the job of another patch.
* Part of the problem of doing folding under unicode rules is that
there are a lot of foldings possible, some with strange rules. This
means that the bitmap logic does not work correctly in all cases,
as we currently do not have any way to populate it properly.
So this patch disables the bitmap entirely when folding is involved
until that is fixed.
The end result of this is: we can TRIE/AHOCORASICK any sequence of
EXACT, or EXACTFU (ish) nodes, regardless of utf8 or not, but we disable
the bitmap when folding.
A note for follow up relating to this patch is that the way EXACTFU_XXX
nodes are currently dealt with we wont build the "maximal" trie because
of their presence, instead creating a "jumptrie" consisting of either a
leading EXACTFU node followed by a EXACTFU_XXX node, or vice versa. We
should eventually address that.
|
|
|
|
|
|
|
| |
The old output would show only the line number as diagnostics
but not the test number, nor the test name, which often contains
very useful information. This patch makes sure this is visible in
the diagnostics output of test failures.
|
|
|
|
|
|
|
|
|
|
|
| |
This provides enough rope for those who want to hang themselves, and
also for those who know how to use the rope without hanging them-
selves. :-)
Since this is not generally a reliable thing to be doing, a warning is emitted whenever :lvalue is turned on or off on a defined subroutine.
But attributes.pm will flip the flag anyway. :lvalue in a sub declar-
ation still refuses to modify a defined Perl sub, as before.
|
| |
|
|
|
|
|
|
| |
This commit looks for the passed-in charset, and overrides it only if it
is /d and the pattern requires /u. Previously the passed-in value was
ignored.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was an off-by-one error caused by my failing to realize that things
had to be done differently at the 255/256 boundary depending on whether
U+00FF matched or did not match the property.
Two properties were affected, [:upper:] and [:punct:]. The bug was that
all code points above the first one > 255 that legitimately matches the
property will match whether or not they should. In the case of
[:upper:], this meant that effectively anything from 256..infinity
matched. For [:punct:], it was anything above U+037D.
|