| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Changing those will cause a version change.
|
| |
|
| |
|
| |
|
|
|
|
| |
glob() should not exist. We check this with `->can('glob')`.
|
| |
|
|
|
|
|
|
|
| |
... since 5.26
They have been removed from the module by a65dc09f8c as leftovers,
but the documentation was not updated
|
|
|
|
|
| |
Mostly in comments and docs, but some in diagnostic messages and one
case of 'or die die'.
|
|
|
|
|
|
| |
Commit 5012eebe558 eliminated the pushre op and did a blanket
replacement of pushre with split, but missed that there was already a
check for split in the loop. Eliminate the duplicate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This new test fails in an environment where LANG is set to one thing and
LC_ALL is set to another, and where LANG is set to a locale which is
not installed in the environment in question.
Such a test environment is arguably broken, but appears in common
chroot setups such as Debian's sbuild tool where LANG is inherited from
the parent environment, and LC_ALL is used to override it.
(Committer rebased the patch)
This fixes GH #17039
|
| |
|
| |
|
|
|
|
|
|
|
| |
Compiling with gcc7, for example, generated a '-Woverflow' warning with
text 'overflow in implicit constant conversion'.
For: https://github.com/Perl/perl5/issues/17664
|
|
|
|
| |
which has added protections beyond plain getenv()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Doing so can cause races.
It is interesting that POSIX:ctermid() takes a parameter, but the
pod doesn't indicate that it does. Prior to this commit the parameter
was ignored if and only if the platform contains a ctermid_r()
function, and hence on such platforms there was no possibility of a race
here. The man pages I've seen for ctermid_r() indicate that it differs
from regular ctermid() only in that it will fail if the input is NULL,
and hence a race could occur if it didn't immediately fail.
The situation prior to this commit wa that if you followed the pod on a
non-ctermid_r() platform, and called this without a parameter, it would
call ctermid with NULL, creating a potential race. This commit changes
so that a race is never possible.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove direct usage of bareword filehandles and use lexical filehandles for the first example in each synopsis.
* Add examples using STDIN and STDOUT filehandles, and examples using already open filehandles, with explicit examples of where these handles come from.
* Declare variables with 'my' where appropriate and condense declarations inline.
* Add comments in synopsis describing the purpose of each example.
* Consistency of referencing synopsis variables from the description.
* Replace ambiguous phrase 'null string' with 'empty string or undefined' which is also more correct here.
* Add links to referenced CPAN modules and manpages.
* Better describe the reason for using gensym in IPC::Open3 and how to use it.
|
|
|
|
|
| |
use a convoluted incantation to be able to set
'use strict; use warnings' only for Perl > 5.6
|
| |
|
|
|
|
| |
Instead, foo was silently ignored
|
|
|
|
| |
This was not setting the defaults properly for 'debug', and 'Debug'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes #17026
Patterns can have subpatterns since 5.30. These are processed when
encountered, by suspending the main pattern compilation, compiling the
subpattern, and then matching that against the set of all legal
possibilities, which Perl knows about.
Debugging info for the compilation portion of the subpattern was added
by be8790133a0ce8fc67454e55e7849a47a0858d32, without fanfare. But,
prior to this new commit, debugging info was not available for that
matching portion of the compilation, except under DEBUGGING builds, with
-Drv. This commit adds a new option to 'use re qw(Debug ...)',
WILDCARD, to enable subpattern match debugging. Whatever other match
debugging options have been turned on will show up when a wildcard
subpattern is compiled iff WILDCARD is specified.
The output of this may be voluminous, which is why you have to ask for
it specifically. Or, the EXTRA option turns it on, along with several
other things.
|
| |
|
|
|
|
|
|
|
| |
and similarly for UVuf/UV_MAX.
This already warns in PPPort, but that's for testing PPPort, not
the core.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit enhances these functions so that on threaded perls, they use
mbrtowc and wcrtomb when available, making them thread safe. The
substitution isn't completely transparent, as no effort is made to hide
any differences in errno setting upon error. And there may be slight
differences in edge case behavior on some platforms.
This commit also changes the behaviors so that they take a scalar
parameter instead of a char *, and this might be 'undef' or not be
forceable into a valid PV. If not a PV, the functions initialize the
shift state. Previously the shift state was always reinitialized with
every call, which meant these could not work on locales with shift
states.
In addition, there were several issues in mbtowc and wctomb that this
commit fixes.
mbtowc and wctomb, when used, are now run with a semaphore. This avoids
races if called at the same time in another thread.
The returned wide character from mbtowc() could well have been garbage.
The final parameter to mbtowc is now optional, as passing an SV allows
us to determine the length without the need for an extra parameter. It
is now used only to restrict the parsing of the string to shorter than
the actual length.
wctomb would segfault if the string parameter was shared or hadn't
been pre-allocated with a string of sufficient length to hold the
result.
|
|
|
|
| |
Now that the typemap is an SV, we can access the length from that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes the behavior so that it takes a scalar parameter
instead of a char *, and thus might not be forceable into a valid PV.
When not a PV, the shift state is reinitialized, like calling mblen with
a NULL first parameter. Previously the shift state was always
reinitialized with every call, which meant this could not work on
locales with shift states.
This commit also changes to use mbrlen() on threaded perls transparently
(mostly), when available, to achieve thread-safe operation. It is not
completely transparent because mbrlen (under the very rare stateful
locales) returns a different value when it's resetting the shift state.
It also may set errno differently upon errors, and no effort is made to
hide that difference. Also mbrlen on some platforms can handle partial
characters.
[perl #133928] showed that someone was having trouble with shift states.
|
|
|
|
|
|
|
| |
As noted in perldelta, these functions could not have ever worked, and
there is no demand for them, hence no reason to make them work.
This fixes GH #17388
|
|
|
|
| |
Fixes #11860
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In daf6caf1ef25ff48f871fa1e53adcefc11bf1d08 karl made pv_uni_display()
use the available mnemonic escapes instead of using \x{} style escapes.
This broke B::perlstring() which has an exclusion list of such escapes
to passthrough, and it did not know about \e, so it produced "\\e"
instead of "\e", which of course does not round trip.
This in turn broke Sub::Quote, which in turn breaks Moo, which breaks
a lot of stuff. :-)
Unfortunately B::perlstring() had no tests to detect this, so we only
found out when we got a BBC report that happened to also ticklet this
bug.
This patch adds 'e' to the exclusion list, and also adds tests to see
that the the first 1024 unicode codepoints and all 255 non-unicode
codepoints can round trip through B::perlstring().
This should resolve #17526 and indirectly help us close #17245.
With this patch we bump B.pm to v1.80
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Includes testing siphash24 and siphash13 properly, especially
testing against the SipHash 2-4 reference test vector,
see https://131002.net/siphash/siphash24.c
See also #17244 where we originally discovered there were no
tests for the internals of the hashing code and that because
of it we let slip in a very broken patch to the code.
Thanks to James E Keenan, Tony Cook and Hugo Van der Sanden
for support putting this together.
XS-APItest: fixup issues with # directives
for some reason the indentation of the #if clauses broke things
under some builds, but not all. Possibly a ccache issue.
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the (almost) duplicate code in this function to display
mnemonics for control characters that have them. The reason the two
pieces of code aren't precisely the same is that the other function also
uses \b as a mnemonic for backspace. Using all possible mnemonics is
desirable, so a flag is added for pv_uni_display to now use \b. This is
now by default enabled in double-quoted strings, but not regex patterns
(as \b there means something quite different except in character classes).
B.pm is changed to expect \b.
|
|
|
|
|
|
|
|
|
| |
"use warnings 'portable'" is supposed to warn if a value won't fit on a
32 bit platform. For the UTF-8 conversion functions it wasn't. This is
still overridden if the flags to these functions call for no warnings to
be generated, but this commit changes it so that if the portable
category is enabled, but not the non_unicode category, warnings are
generated for the code points that won't work on a 32-bit platform.
|
|
|
|
|
|
|
|
|
|
| |
Coverity complained that SvIV() could return negative numbers,
but doesn't complain about the similar call in the sigaddset()
method, which is error checked.
So error check sigaddset() and throw an error if it fails.
CID 244386.
|
|
|
|
|
| |
These generated warnings on certain platform builds, and weren't the
best types for the purpose anyway.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GH #17301
The aux array in an OP_MULTIDEREF op consists of an action word
containing as many actions as will fit shifted together, followed by
words containing the arguments for those actions. Then another action
word, and so on. The code in S_maybe_multideref() which creates those
ops was reserving a new slot in the aux array for a new action word when
the old one became full. If it then turned out that no more actions
were needed, this extra slot was harmlessly filled with a zero.
However it turns out that the B::UNOP_AUX::aux_list() introspection
method would, under those circumstances, claim to have returned one
more SV on the stack than it actually had, leading to SEGVs etc.
I could have fixed aux_list() directly to cope with an extra null word,
but instead I did the more general fix of ensuring that
S_maybe_multideref() never adds an extra null word in the first place.
The test added to ext/B/t/b.t fails before this commit; the new test
in lib/B/Deparse.t doesn't, but was added for completeness.
|
|
|
|
|
|
| |
Update $VERSION.
For: https://github.com/Perl/perl5/issues/17399
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
THX_parse_keyword_subsignature() in APItest.xs does, amongst other
things, return a string representation of an OP_ARGCHECK op.
My commit v5.31.4-13-gf417cfa906 made the data attached to that op be a
struct rather than an array of IVs, but missed updating APItest.xs,
which this commit now amends.
This may or may not fix GH #17202 where the returned value of the
slurpy field was wrong on big-endian systems.
This is presumably due to (char)aux[2] not being the same as
aux->slurpy where one is an IV and the other is a char field.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This should have been updated in 5.28, but was overlooked.
|
|
|
|
|
|
|
| |
This replaces strchr("list", c) calls throughout the core. They don't
work properly when 'c' is a NUL, returning the position of the
terminating NUL in "list" instead of failure. This could lead to
segfaults or even security issues.
|
|
|
|
|
| |
and the associated commits, at least until a way to make
wrap_op_checker() work is available.
|
|
|
|
|
|
|
| |
io/handle.t depends on IO::Handle using the PL_check hack, but
Nicholas's back portable fix no longer uses that
Fix threaded perl detection, thanks to James Keenan.
|
|
|
|
|
| |
Nicholas Clark's fix for IO makes the test in niner's patch
meaningless, so test it separately.
|