| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Reading $$ in a tainted expression was tainting the internal sv_setiv()
on $$. Since the value being set came directly from getpid(), it's
always safe, so override the tainting there. Fixes [perl #109688].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, a table was being allocated for OP_TRANS(|R), in a
PVOP arrangement, as soon as the op was built. However, it wasn't
used immediately, and for UTF8-flagged ops it would be thrown away,
replaced by an SV-based translation table in a SVOP or PADOP arrangement.
This mutation of the op structure occurred in pmtrans(), some time after
original op building. If an error occurred before pmtrans(), requiring
the op to be freed, op_clear() would be misled by the UTF8 flags into
treating the PV as an SV or pad index, causing crashes in the latter
case [perl #102858]. op_clear() was implicitly assuming that pmtrans()
had been performed, due to lacking any explicit indication of the op's
state of construction.
Now, the PV table is allocated by pmtrans(), when it's actually going to
populate it. The PV doesn't get allocated at all for UTF8-flagged ops.
Prior to pmtrans(), the op_pv/op_sv/op_padix field is all bits zero,
so there's no problem with freeing the op.
|
|
|
|
|
|
|
|
|
| |
See https://rt.perl.org/rt3/Ticket/Display.html?id=108776
"no feature" now resets to the default feature set. To disable all
features (which is likely to be a pretty special-purpose request, since
it presumably won't match any named set of semantics) you can now
write "no feature ':all'"
|
| |
|
|
|
|
|
|
|
| |
The Windows shell cmd.exe does not know about single quotes. Double
quotes are the only thing available here. This patch selects the kind
of quote to use based on the operating system and constructs
the pipeline accordingly.
|
|
|
|
|
|
|
|
|
| |
t/porting/pending-author.t attempts to avoid the problem of C<make test>
passing 100%, but the subsequent git commit causing F<t/porting/authors.t>
to fail, because it uses a "new" e-mail address.
This test is only run if one is building inside a git checkout, B<and> one
has made local changes. Otherwise it's skipped.
|
|
|
|
|
|
|
|
|
| |
Commit 3ea0c581844689ab didn't go far enough in pruning the input.
When Porting/checkAUTHORS.pl is invoked with --tap it uses
parse_commits_from_stdin_authors() instead of parse_commits_from_stdin(),
which only looks for lines matching /^Author:/
This reduces runtime by a further 8%.
|
|
|
|
|
|
|
|
|
|
|
|
| |
With filenames varying between only one and five characters in
length, it was fairly easy to get two files differing only in
case ('A' and 'a', for example). Which on non-case-sensitive file
systems could generate a warning at unlink time because it would
unlink 'a' and then check for the existence of 'a' and get true
because 'A' was still there and indistinguishable from 'a'.
So just use longer filenames to make the possibility of collision
vanishingly small.
|
|
|
|
|
| |
Historically Pod::Functions has failed to get updated when functions are
added. This should solve that.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pod::Functions is now generated from pod/perlfunc.pod by
ext/Pod-Functions/Functions_pm.PL
If it can't parse pod/perlfunc.pod, it will abort, which will cause the
build to break. It's really not possible for it to carry on, hence aborting
is the only option. However, innocent-seeming changes to documentation
shouldn't break the build, and we expect everyone to run (at least)
the porting tests, hence this test, to catch such problems before it's too
late. To avoid duplicating the parsing logic, we make Functions_pm.PL take
a --tap option, to test that all is well.
|
|
|
|
|
|
| |
This makes the order more consistent with test_harness, and moves the
"interesting" tests earlier. "interesting", in that these are more likely
to spot unexpected problems with the tested changes.
|
|
|
|
|
|
| |
Under locale rules, this commit quotes all non-ASCII Latin1 characters
in UTF-8 encoded strings. This provides consistency with this function
and other functions, such as lc().
|
|
|
|
|
|
|
|
|
|
| |
As described in the pod changes in this commit, this changes quotemeta()
to consistenly quote non-ASCII characters when used under
unicode_strings. The behavior is changed for these and UTF-8 encoded
strings to more closely align with Unicode's recommendations.
The end result is that we *could* at some future point start using other
characters as metacharacters than the 12 we do now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under POSIX threads the getpid() and getppid() functions return the
same values across multiple threads, i.e. threads don't have their own
PID's. This is not the case under the obsolete LinuxThreads where each
thread has a different PID, so getpid() and getppid() will return
different values across threads.
Ever since the first perl 5.0 we've returned POSIX-consistent
semantics for $$, until v5.14.0-251-g0e21945 when the getpid() cache
was removed. In 5.8.1 Rafael added further explicit POSIX emulation in
perl-5.8.0-133-g4d76a34 [1] by explicitly caching getppid(), so that
multiple threads would always return the same value.
I don't think all this effort to emulate POSIX sematics is worth it. I
think $$ and getppid() are OS-level functions that should always
return the same as their C equivalents. I shouldn't have to use a
module like Linux::Pid to get the OS version of the return values.
This is pretty much a complete non-issue in practice these days,
LinuxThreads was a Linux 2.4 thread implementation that nobody
maintains anymore[2], all modern Linux distros use NPTL threads which
don't suffer from this discrepancy. Debian GNU/kFreeBSD does use
LinuxThreads in the 6.0 release, but they too will be moving away from
it in future releases, and really, nobody uses Debian GNU/kFreeBSD
anyway.
This caching makes it unnecessarily tedious to fork an embedded Perl
interpreter. When someone that constructs an embedded perl interpreter
and forks their application, the fork(2) system call isn't going to
run Perl_pp_fork(), and thus the return value of $$ and getppid()
doesn't reflect the current process. See [3] for a bug in uWSGI
related to this, and Perl::AfterFork on the CPAN for XS code that you
need to run after forking a PerlInterpreter unbeknownst to perl.
We've already been failing the tests in t/op/getpid.t on these Linux
systems that nobody apparently uses, the Debian GNU/kFreeBSD users did
notice and filed #96270, this patch fixes that failure by changing the
tests to test for different behavior under LinuxThreads, I've tested
that this works on my Debian GNU/kFreeBSD 6.0.4 virtual machine.
If this change is found to be unacceptable (i.e. we want to continue
to emulate POSIX thread semantics for the sake of LinuxThreads) we
also need to revert v5.14.0-251-g0e21945, because currently we're only
emulating POSIX semantics for getppid(), not getpid(). But I don't
think we should do that, both v5.14.0-251-g0e21945 and this commit are
awesome.
This commit includes a change to embedvar.h made by "make
regen_headers".
1. http://www.nntp.perl.org/group/perl.perl5.porters/2002/08/msg64603.html
2. http://pauillac.inria.fr/~xleroy/linuxthreads/
3. http://projects.unbit.it/uwsgi/ticket/85
|
|
|
|
|
|
|
|
| |
This new test grants full access on a test file to group and other.
Since I'm a member of my own group and everyone is someone, I of
course have full access to the file, but the test expects it to be
unreadable. If there is a hierarchy in Unix file permissions, it
clearly doesn't work the same way as the VMS one.
|
|
|
|
|
|
|
|
|
|
| |
Commit b6c46382308166d54090e3d8e385710664693ac0 introduced a bug when
an inverted bracketed character class consists solely of a Unicode
property, that property wasn't getting inverted outside the Latin1
range.
This was due to an optimization that should have been disabled for this
case.
|
|
|
|
|
|
| |
Same for [[:upper:]] and \p{Upper}. These were matching instead all of
[[:alpha:]] or \p{Alpha}. What /\p{Lower}/i and /\p{Upper}/i match instead
is \p{Cased}, and so that is what these should match.
|
| |
|
|
|
|
|
|
|
|
|
| |
This uses the compiled inversion lists to generate Posix character
classes and things like \v, \s inside bracketed character classes.
This paves the way for future optimizations, and fixes the bug which has
no formal bug number that /[[:ascii:]]/i matched non-Ascii characters,
such as the Kelvin sign, unlike /\p{ascii}/i.
|
|
|
|
|
|
| |
This bug was spotted by Tom Christiansen, but no bug report has been
written. /[[:ascii:]]/i should match the same set of code points as
/\p{ASCII}/i. But it is matching things outside the ASCII range
|
| |
|
|
|
|
|
|
| |
Applied patch from John Peacock, but added whitespace fixes,
corrected pod link error and updated known Pod issues to reflect
a fix.
|
|
|
|
|
| |
The format added in commit 3ea0c581844689ab had a typo - %cn (committer
name) used instead of %ce (committer e-mail).
|
|
|
|
|
|
| |
This commit delivers the official Unicode character database files for
release 6.1, plus the final bits needed to cope with the changes in them
from release 6.0, including documentation.
|
|
|
|
| |
by mortalising the temporary SVs.
|
|
|
|
| |
This reverts commit 497f7de2d964167330f7260590736e9adb18899c.
|
|
|
|
| |
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
|
| |
|
|
|
|
|
| |
Add dot to end of message from Carp, to match the formatting from
CORE::die. The stack trace, coming after the message, is unchanged.
|
| |
|
|
|
|
|
|
| |
Some of the discussion in perlxs was duplicated in perlxstypemap.
This also adds several references to the new man page and fixes
a few minor nits.
|
| |
|
| |
|
|
|
|
| |
This is the paranoid version of just using $>.
|
|
|
|
| |
This adds tests for commit b36bf33f6564c3e9a9ff131f4f3c9980b7a8af15
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Along with the simple_casefolding and full_casefolding features.
fc() stands for foldcase, a sort of pseudo case (like lowercase),
which is used to implement Unicode casefolding. It maps a string
to a form where all case differences are erased, so it's a
locale-independent way of checking if two strings are the same,
regardless of case.
This functionality was, and still is, available through the
regular expression engine -- /i matches would use casefolding
internally. The fc keyword merely exposes this for easier access.
Previously, one could attempt to case-insensitively test two strings
for equality by doing
lc($a) eq lc($b)
But that might get you wrong results, for example in the case of
\x{DF}, LATIN SMALL LETTER SHARP S.
|
|
|
|
| |
It doesn't do anything yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A simple my($foo,$bar) list is flagged as an lvalue:
$ ./perl -Ilib -MO=Concise -e 'my($foo,$bar)'
7 <@> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 1 -e:1) v:{ ->3
6 <@> list vKPM/128 ->7
3 <0> pushmark vM/128 ->4
4 <0> padsv[$foo:1,2] vM/LVINTRO ->5
5 <0> padsv[$bar:1,2] vM/LVINTRO ->6
-e syntax OK
That 128 that the list op is the same flag as LVINTRO.
When a method call is compiled, the list op for the argument list is
itself converted into an entersub op. That LVINTRO flag is never
turned off. So foo->bar(my($foo,$bar)) becomes this:
$ ./perl -Ilib -MO=Concise -e 'foo->bar(my($foo,$bar))'
9 <@> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 1 -e:1) v:{ ->3
8 <1> entersub[t4] vKMS/LVINTRO,TARG ->9
3 <0> pushmark sM/128 ->4
4 <$> const[PV "foo"] sM/BARE ->5
5 <0> padsv[$foo:1,2] lM/LVINTRO ->6
6 <0> padsv[$bar:1,2] lM/LVINTRO ->7
7 <$> method_named[PV "bar"] ->8
-e syntax OK
This was rarely a problem until commit da1dff948 added lvalue check-
ing for method calls (a fifth bug fix in that commit not mentioned in
the commit message).
Calling the method will now result in ‘Can't modify non-lvalue subrou-
tine call’ unless the method has the :lvalue attribute.
Before that, this would only cause problems with lvalue methods:
$ perl -le '
sub clear_queue:lvalue { warn "called"; undef }
3==main->clear_queue(my ($id, $name))
'
called at -e line 2.
Can't return undef from lvalue subroutine at -e line 3.
Calling it with ($id, $name) was fine, and allowed undef to
be returned.
Perl_localize in op.c (which is called for my, our and local)
calls my() (aka Perl_my_attrs) on the list itself for my or our.
Perl_my_attrs was setting flags on the list, not just on its children.
So this commit modifies my_attrs not to set any flags on the list
op itself.
local() was not affected, as it goes through op_lvalue_flags instead
of my_attrs, and op_lvalue_flags doesn’t set flags on list ops (I
mean ops of type OP_LIST, not listops in general). I added tests for
it anyway.
|
|
|
|
|
|
| |
We had a fencepost error when ANCH_MBOL was enabled that meant we
did not "see" matches at the end of string. This fixes the problem
and adds tests.
|
|
|
|
| |
executed too early
|
|
|
|
|
| |
Follow-up to 8db8f6b697e6f, where new tests were added without
changing the (implicit) skip count of 1.
|
|
|
|
|
|
| |
Those will be equivalent to (_;@) and (_;%) ; since perlsub already
states that the semicolon is redundant before @ and % this is in
line with the existing documentation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Various magical modules copy hints from one scope to another. But
copying ${^WARNING_BITS} doesn’t always copy the same hints. If lexi-
cal warnings are not on at all, ${^WARNING_BITS} returns a different
value depending on the current value of $^W. Setting ${^WARNING_BITS}
to its own value when $^W is true will stop $^W from being able to
control the warnings in the current compilation scope. Setting
${^WARNING_BITS} to its own value when $^W is false causes even
default warnings to be suppressed.
This commit makes undef a special value that represents the default
state, in which $^W controls warnings.
|
|
|
|
|
|
| |
This is something that my sample patch in ticked #108780 (for
fixing /foo$qr/ under ‘no overloading’) would have broken had it
been applied.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This reverts commit 5fa409a90f64110c5708f7141b376e9bdc54fbe2.
Resolved by update of Pod-Parser to version 1.51
|