This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
David Mitchell [Mon, 23 May 2016 13:43:56 +0000 (14:43 +0100)]
CX_POP_SAVEARRAY(): use more distinctive var name
Under -Wshadow, CX_POP_SAVEARRAY's local var 'av' can generate this
warning:
warning: declaration shadows a local variable [-Wshadow]
So rename it to cx_pop_savearay_av to reduce the risk of a clash.
(See http://nntp.perl.org/group/perl.perl5.porters/236444)
Sawyer X [Sun, 22 May 2016 17:10:41 +0000 (19:10 +0200)]
Update release link in epigraph for 5.25.1
Sawyer X [Sun, 22 May 2016 17:00:13 +0000 (19:00 +0200)]
Update Module::CoreList for 5.25.2
Father Chrysostomos [Sun, 22 May 2016 01:33:38 +0000 (18:33 -0700)]
perldiag: Rewrite a mangled sentence
Father Chrysostomos [Sun, 22 May 2016 01:31:26 +0000 (18:31 -0700)]
Sort perldiag
Lukas Mai [Sat, 21 May 2016 17:12:21 +0000 (19:12 +0200)]
recognize and reject version control conflict markers (RT #127993)
Father Chrysostomos [Sat, 21 May 2016 18:36:56 +0000 (11:36 -0700)]
Fix STRESS_REALLOC after
3caf0269d
This commit:
commit
3caf0269dd4c609b8c2bc22b54598c642ba63ed8
Author: David Mitchell <davem@iabyn.com>
Date: Sun Dec 27 14:07:02 2015 +0000
offset PL_savestack_max by SS_MAXPUSH
stopped savestack_grow from adding 4 to the allocated amount, which
broke builds with -Accflags=-DSTRESS_REALLOC.
savestack_grow accepts no arguments. The callers have no way to
tell it how much to allocate; they just assume that it will allocate
enough. By default, in increases the stack size by 50%, and the stack
starts out at 128 elements, so everything works fine.
Under STRESS_REALLOC, introduced by commit
2ce36478e5 in ’98, the
savestack started out at 1 (later, SS_MAXPUSH; as of
3caf0269d,
PL_savestack_max is 0 initially, though the actual stack size is
SS_MAXPUSH). And the stack-growing functions in scope.h that default
to 50% instead add 1 element to the stack.
Anything that calls savestack_grow assumes it will allocate enough for
the savestack elements pushed. The most elements ever pushed at once
is 4, so
2ce36478e5 added a +4 to the size in savestack_grow.
3caf0269d removed that +4, so the stack is only incremented by 1, and
this assertion at the end of scope.h:SS_ADD_END failed:
if (UNLIKELY(ix > PL_savestack_max)) savestack_grow(); \
assert(PL_savestack_ix <= PL_savestack_max);
3caf0269d was right in removing the +4, since it is unnecessary for
normal builds. For STRESS_REALLOC, which is designed to grow stacks
as little as possible, we were allocating one more element than neces-
sary. So this commit just explicitly grows the stack by SS_MAXPUSH
(the new name for 4) in savestack_grow if STRESS_REALLOC is defined.
Chris 'BinGOs' Williams [Sat, 21 May 2016 15:46:12 +0000 (16:46 +0100)]
Update for the version thats on the CPAN
Father Chrysostomos [Sat, 21 May 2016 12:42:55 +0000 (05:42 -0700)]
Simplify parser’s handling of my/local
In Perl 5.000, the same token, LOCAL, was used for both ‘my’ and
‘local’, with a token value, passed to localize() as a second argu-
ment, to distinguish between them.
perl-5.003_07-9-g55497cf (inseparable changes from patch from
perl5.003_07 to perl5.003_08), for no apparent reason, split them into
two tokens, removing the token values and assigning values in perly.y
via $$ = 0 and $$ = 1. They still ultimately made their way through
the same grammar rule, as there was only one localize() call in
perly.y. The code still made sense.
perl-5.005_02-1816-g09bef84 (sub : attrlist) changed things, such that
the tokens are separate *and* they get separate token values assigned
to them. ‘local’ and ‘my’ no longer follow the same grammar rules
in perly.y, so there are separate localize() calls for the different
token types. Hence, the use of a token value to distinguish them does
not make sense. It just makes this more complicated that necessary.
So this commit removes the token values. Since the two token types
follow different paths through perly.y and have separate localize()
calls, we can hard-code the argument to localize() there, instead of
passing the value through from toke.c as a token value.
This does shrink toke.o slightly (for me it went from 876040 to
876000), and it makes this conceptually clearer.
Father Chrysostomos [Sat, 21 May 2016 04:55:40 +0000 (21:55 -0700)]
[perl #128204] Fix crash with @a &.= etc.
The new bitwise operators in their assignment forms were not correctly
catching things like arrays on the lhs at compile time.
At run time, they would either crash or croak with ‘Can’t coerce
ARRAY...’.
This commit puts in the correct compile-time check, simply by flagging
these as scalar modifiers.
Father Chrysostomos [Sat, 21 May 2016 03:32:48 +0000 (20:32 -0700)]
Another op description correction: & -> &.
The string bitwise ops have dots in them, which should be included
in the op descriptions.
Father Chrysostomos [Sat, 21 May 2016 03:24:50 +0000 (20:24 -0700)]
Correct ‘bitiwse’ in two op descriptions
Oops!
Father Chrysostomos [Sat, 21 May 2016 05:14:08 +0000 (22:14 -0700)]
[Merge] &CORE::foo() calls with keys, push, etc.
The hash and array functions, keys, each, values, push, pop, shift,
unshift and splice, can now be called with ampersand syntax and via
reference.
Father Chrysostomos [Sat, 21 May 2016 04:57:32 +0000 (21:57 -0700)]
Update CORE.pod to reflect &CORE::keys() etc.
Father Chrysostomos [Sat, 21 May 2016 00:50:23 +0000 (17:50 -0700)]
Allow assignment to &CORE::keys()
Father Chrysostomos [Tue, 17 May 2016 07:27:30 +0000 (00:27 -0700)]
Allow &CORE::foo() with array functions
Father Chrysostomos [Tue, 17 May 2016 06:32:06 +0000 (23:32 -0700)]
perldiag: Document unknown OA_* panic
Father Chrysostomos [Sat, 21 May 2016 05:13:15 +0000 (22:13 -0700)]
f
Father Chrysostomos [Tue, 17 May 2016 06:10:17 +0000 (23:10 -0700)]
Allow &CORE::foo() with hash functions
&CORE::keys does not yet work as an lvalue. (I’m not sure how to make
that work.)
Father Chrysostomos [Tue, 17 May 2016 01:16:28 +0000 (18:16 -0700)]
Increase $Opcode::VERSION to 1.35
Father Chrysostomos [Tue, 17 May 2016 01:15:42 +0000 (18:15 -0700)]
Add avhvswitch op
&CORE::keys() et al. will use this to switch between keys and akeys
depending on the argument type.
Father Chrysostomos [Tue, 17 May 2016 01:09:02 +0000 (18:09 -0700)]
regen/opcodes: Re-order aeach, akeys, and avalues
In a forthcoming commit, I will need them to be in the same order as
the corresponding hash functions.
Father Chrysostomos [Sun, 15 May 2016 20:59:24 +0000 (13:59 -0700)]
pp.c: Use PL_op_desc in pp_coreargs
OP_DESC is inconvienient here, because it expects an op, not an op
number, so we have to follow pointers to find an appropriate op. It
is also needlessly expensive, since we do not need to check for custom
ops in pp_coreargs (which OP_DESC does). Just access the underlying
array directly.
jdhedden [Fri, 20 May 2016 18:59:02 +0000 (14:59 -0400)]
Upgrade to threads 2.09
For: RT #128197
jdhedden [Fri, 20 May 2016 18:33:31 +0000 (14:33 -0400)]
Upgrade to Thread::Queue 3.11
For: RT #128195
James E Keenan [Sat, 21 May 2016 01:59:46 +0000 (21:59 -0400)]
Increment $VERSION to 5.YYYYMMDD for next scheduled monthly release date.
Father Chrysostomos [Sat, 21 May 2016 01:04:52 +0000 (18:04 -0700)]
corelist: update for v5.25.2
I really have no idea what I’m doing. I just copied
4170737e2, sort of,
and the tests started passing.
Father Chrysostomos [Fri, 20 May 2016 23:00:09 +0000 (16:00 -0700)]
[Merge] Lexical subs are no longer experimental
Father Chrysostomos [Fri, 20 May 2016 21:30:14 +0000 (14:30 -0700)]
Give feature.pm the concept of no-op features
Father Chrysostomos [Fri, 20 May 2016 21:17:55 +0000 (14:17 -0700)]
Remove @experimental from regen/feature.pl
Originally, we were going to have feature.pm warning when enabling
an experimental feature. That changed, though, when we introduced
the :all tag, because it is unkind for :all to warn. So in
v5.17.6-49-g64fbf0d we started warning when a feature is used,
not enabled.
It does not appear that that will ever change, so we might as well
remove the dead code (and comments) from regen/feature.pl.
Father Chrysostomos [Fri, 20 May 2016 21:11:30 +0000 (14:11 -0700)]
Update other docs on lexical sub acceptance
Father Chrysostomos [Fri, 20 May 2016 20:26:17 +0000 (13:26 -0700)]
Increase $feature::VERSION to 1.44
Father Chrysostomos [Fri, 20 May 2016 20:25:20 +0000 (13:25 -0700)]
Update feature.pm docs for lex sub acceptance
Father Chrysostomos [Fri, 20 May 2016 19:46:07 +0000 (12:46 -0700)]
Update perldiag for lexsub diag removals
Father Chrysostomos [Fri, 20 May 2016 19:45:10 +0000 (12:45 -0700)]
Enable lex subs everywhere; suppress warning
Adjust tests, too.
Father Chrysostomos [Fri, 20 May 2016 13:22:40 +0000 (06:22 -0700)]
[perl #128187] Forbid keys @_ in assigned lv sub
This is a continuation of this commit’s great grandparent, extending
the error to arrays.
Father Chrysostomos [Fri, 20 May 2016 04:32:02 +0000 (21:32 -0700)]
toke: yylex comments
Update; clarify; fix typo.
Father Chrysostomos [Fri, 20 May 2016 01:31:56 +0000 (18:31 -0700)]
Correct error msg for sub:lvalue{%h{k}} in sassign
This:
sub foo : lvalue { %hash{'key'} }
foo = 3;
was incorrectly giving ‘Can't modify key/value hash slice in list
assignment’. There is no list assignment there.
Father Chrysostomos [Fri, 20 May 2016 01:27:24 +0000 (18:27 -0700)]
[perl #128187] Forbid sub :lvalue{keys} in aassign
This commit makes perl die when keys(%hash) is returned from an lvalue
sub and the lvalue sub call is assigned to in list assignment:
sub foo : lvalue { keys(%INC) }
(foo) = 3; # death
This prevents an assignment that is completely useless and probably a
mistake, and it makes the lvalue-sub use of keys behave the same way
as (keys(%INC)) = 3.
Sawyer X [Fri, 20 May 2016 22:39:12 +0000 (00:39 +0200)]
Note latest stable in INSTALL:
This was in the instructions but as it appears right after bumping
the version number (which contains a note that BLEAD-POINT should
only do it later), I had missed it. Also, INSTALL is generally
updated by the bump version script, which is usually done the
version before.
Anyway, might as well fix it now.
Sawyer X [Fri, 20 May 2016 22:08:13 +0000 (00:08 +0200)]
Bump the perl version in various places for 5.25.2
Sawyer X [Fri, 20 May 2016 22:03:08 +0000 (00:03 +0200)]
new delta for 5.25.2
Sawyer X [Fri, 20 May 2016 21:53:53 +0000 (23:53 +0200)]
mark 5.25.1 release as done
Sawyer X [Fri, 20 May 2016 21:53:16 +0000 (23:53 +0200)]
Add epigraph to list:
NNTP link not available yet, I'll update it in the near future
(tomorrow) when it's available.
Sawyer X [Fri, 20 May 2016 21:46:30 +0000 (23:46 +0200)]
[MERGE] resolve conflicts and merge 5.25.1 release with blead
Sawyer X [Fri, 20 May 2016 19:47:28 +0000 (21:47 +0200)]
add new release to perlhist
Sawyer X [Fri, 20 May 2016 19:25:04 +0000 (21:25 +0200)]
updated perldelta
Sawyer X [Fri, 20 May 2016 16:08:40 +0000 (18:08 +0200)]
Update Module::CoreList for 5.25.1
Sawyer X [Fri, 20 May 2016 15:20:58 +0000 (17:20 +0200)]
add a change to perldelta
Jarkko Hietaniemi [Fri, 20 May 2016 11:38:31 +0000 (07:38 -0400)]
Importing not-useful POSIX subs now fails at import time.
Chase Whitener [Wed, 18 May 2016 16:20:28 +0000 (12:20 -0400)]
Indirect object syntax fixed in FileHandle.pm
Increment $FileHandle::VERSION.
For: RT #128178
Sawyer X [Thu, 19 May 2016 20:01:57 +0000 (22:01 +0200)]
Correct POD for release managers document:
A literal / (solidus) is E<sol>.
Sawyer X [Thu, 19 May 2016 19:54:32 +0000 (21:54 +0200)]
Update and correct release schedule:
* The release schedule had the dates for some releases twice
and they weren't the same. Ricardo Signes released 5.24.0 sooner
than on the schedule (good thing, since we kept slipping away)
so that's fixed.
* We're releasing 5.25.1 tomorrow, on May, instead of June. That
means all numbers are bumped.
* Aaron Crane volunteered to take on the November release.
(Joke's on him, he'll have to do it!)
Father Chrysostomos [Thu, 19 May 2016 13:08:12 +0000 (06:08 -0700)]
[perl #123367] Test my sub defined in BEGIN{eval}
This accidentally started working in v5.21.6-197-g0f94cb1.
Father Chrysostomos [Thu, 19 May 2016 04:42:03 +0000 (21:42 -0700)]
Allow require_error.t be run from the top level
Craig A. Berry [Thu, 19 May 2016 11:35:49 +0000 (06:35 -0500)]
No such thing as MACOSX_DEVELOPMENT_TARGET.
This appears to be a typo that has been with us since
69625aa92a9
and the real name is MACOSX_DEPLOYMENT_TARGET.
So do the same thing the MacPorts folks have been doing, meaning
this is just the "fix-ld-modification.patch" from:
https://trac.macports.org/browser/trunk/dports/lang/perl5/files/5.24?rev=148407
Father Chrysostomos [Thu, 19 May 2016 03:14:26 +0000 (20:14 -0700)]
perldelta for
08f800f85 / #128182
Father Chrysostomos [Thu, 19 May 2016 01:07:37 +0000 (18:07 -0700)]
[perl #128182] Fix crash with require $nonstring
If something other than a plain string (e.g. a reference or typeglob)
whose stringified form contains a null character is passed to require()
or do(), it crashes, as of v5.19.3-130-gc8028aa, because the code in
question that handles the error tries to read fields of the scalar
that are only valid if it is a string internally.
Father Chrysostomos [Thu, 19 May 2016 00:54:28 +0000 (17:54 -0700)]
lexsub.t: Remove some unnecessary evals
These evals were originally of the form eval {...} when I added
the tests, before things were working. When I got them working,
I left few evals by mistake, while removing the braces. Luckily,
eval 44 produces the same thing as 44.
Jarkko Hietaniemi [Thu, 19 May 2016 02:45:13 +0000 (22:45 -0400)]
Add POSIX::tmpnam() removal into perldelta
Father Chrysostomos [Wed, 18 May 2016 20:39:22 +0000 (13:39 -0700)]
perldelta update
fcd1306 [perl #128106] Fix reset with non-globs
60a26c7 [perl #128086] Fix precedence in hv_ename_delete
69e7f50 [perl #127976] Restore ‘or array’ to each($s) err
94f9945 Fix crash with: undef *_; shift;
c349280 Use concat overloading for "foo$_->$*"
d674449 [perl #128171] Fix assert fail with /@0{0*->@*/*0
Aaron Crane [Wed, 18 May 2016 13:36:18 +0000 (14:36 +0100)]
Fix POD error
Sigh. Sorry about that, everyone.
Aaron Crane [Wed, 18 May 2016 13:06:57 +0000 (14:06 +0100)]
Add perldelta entries for my 5.25.1 changes
Father Chrysostomos [Wed, 18 May 2016 01:16:52 +0000 (18:16 -0700)]
[perl #128171] Fix assert fail with /@0{0*->@*/*0
If a syntax error such as * (multiply) followed by an arrow causes the
parser to pop scopes in trying to recover from the error, it might
exit the quote-parsing scope (for parsing the regexp) and point the
lexer’s cursor at the code following the regexp, after the lexer has
noted to itself that it is expected to parse a postfix dereference
(PL_expect==XPOSTDEREF).
The code for parsing a postfix dereference has an assertion which
ends up failing in this case, because the *0 following the regexp,
having sigil that can come after an arrow, goes through the postfix
deref function, which complains about the 0 it did not expect.
If we simply remove the assertion, the lexer will continue to emit
tokens, and we just end up dying (somewhat) gracefully because of the
syntax error, instead of crashing.
I used a ] in the test instead of a final 0, to avoid a compile-
time warning. (Number found where operator expected.)
Karl Williamson [Wed, 18 May 2016 00:22:00 +0000 (18:22 -0600)]
mathoms.c: Add instructions for moving code here
Suggested by Dave Mitchell.
Chris 'BinGOs' Williams [Tue, 17 May 2016 23:16:35 +0000 (00:16 +0100)]
Add 'corpus' to the heuristic for demo or test modules
Karen Etheridge [Mon, 16 May 2016 04:47:37 +0000 (21:47 -0700)]
remove internal test modules from Module::CoreList
These modules only ever existed as test data, and should never have entered
the PAUSE index. There is no value in listing them in historical data.
Karen Etheridge [Fri, 6 May 2016 20:36:17 +0000 (13:36 -0700)]
fix Module::CoreList::is_core bounds checking for specific module versions
Father Chrysostomos [Tue, 17 May 2016 20:37:46 +0000 (13:37 -0700)]
bisect-runner: Work around ./Configure -S bug
v5.23.4-46-g41d7307 stopped ./Configure -S from working.
In v5.23.5-89-g7a4fcb3, it started working again.
In order to bisect in this region, copy the optdef.sh file, which
Configure was invoking from the wrong path.
This patch actually works this time (I hope).
Father Chrysostomos [Tue, 17 May 2016 20:04:28 +0000 (13:04 -0700)]
Revert "bisect-runner: Only run ./Configure -S when needed"
This reverts commit
16a77b27e2d2b59233235b74ce1f2c90ac18d675.
Scratch that. ./Configure -S *is* needed. It’s not just related to
noextensions.
I still can’t bisect, but I need to come up with a different fix.
Father Chrysostomos [Tue, 17 May 2016 20:00:08 +0000 (13:00 -0700)]
bisect-runner: Only run ./Configure -S when needed
We only need to run it when config.sh has been modified, which only
happens before 5.10. From v5.23.4-46-g41d7307 onwards ./Configure -S
did not work, until v5.23.5-90-g473edb6, so we need to skip this if we
want to bisect in that region. (Or we could just skip the die, but we
might as well skip the system call, too.)
Aaron Crane [Tue, 17 May 2016 15:41:16 +0000 (16:41 +0100)]
make_ext.pl: emit fewer blank lines during build
I find this makes it easier rather than harder to see what's going on.
Chris 'BinGOs' Williams [Tue, 17 May 2016 12:37:52 +0000 (13:37 +0100)]
Update Sys-Syslog to CPAN version 0.34
[DELTA]
0.34 -- 2016.05.06 -- Sebastien Aperghis-Tramoni (SAPER)
[BUGFIX] CPAN-RT#105117: use %e where available, fall back to %d and
a regexp where not (Markus Laker).
[BUGFIX] CPAN-RT#98446: trailing new line with perror (Alexander Bluhm).
[BUGFIX] CPAN-RT#105152: the noeol option was ignored (Markus Laker).
[PORT] CPAN-RT#104710: loadable library and perl binaries are mismatched,
because of missing CCFLAGS (CHORNY, KMX).
[PORT] No longer inheriting from Exporter doesn't work before Perl 5.8.3.
[BUGFIX] CPAN-RT#90538: facility from openlog() is not used (Anton Yuzhaninov).
[PORT] CPAN-RT#90212: Support non-Windows platforms where syslog.h
is not defined (Brian Fraser).
[PORT] CPAN-RT#90224: setlocale() is not available everywhere, for
example on Android (Brian Fraser).
[PORT] CPAN-RT#90218: getproto*() and getserv*() functions are not
available everywhere (Brian Fraser).
[DOC] CPAN-RT#102058: mention the repository in the documentation.
Chris 'BinGOs' Williams [Tue, 17 May 2016 12:35:33 +0000 (13:35 +0100)]
Update Term-ANSIColor to CPAN version 4.05
[DELTA]
Term::ANSIColor 4.05 (2016-03-20)
Color aliases are now restricted to ASCII alphanumerics, due to the
below change.
Delay loading of the Carp module and avoid using [:upper:], \w, and \d
in regular expressions to reduce the amount of memory this module
consumes. (Normally, I wouldn't worry about this, but this module is
very light-weight and can be useful even in highly space-constrained
environments, and the impact is slight.) Thanks, Nicolas R.
(#111552)
Provide a mailto address in bug tracking metadata, use the shorter
form of the RT bug tracker URL, and fix the license value to match the
new metadata specification. Rework Makefile.PL so that the munging
for older versions of ExtUtils::MakeMaker is less intrusive.
Aaron Crane [Tue, 17 May 2016 11:24:54 +0000 (12:24 +0100)]
perlbug: don't run editor when noninteractive
This fixes tests on Win32.
Father Chrysostomos [Tue, 17 May 2016 09:26:21 +0000 (02:26 -0700)]
bisect-runner.pl: Don’t use /a
It’s convenient to be able to run it under the system perl, which
might be too old for /a.
In this code path, the utf8 flag will be off anyway.
Father Chrysostomos [Tue, 17 May 2016 08:50:45 +0000 (01:50 -0700)]
Remove LEX_KNOWNEXT and stop using PL_lex_defer
See these commits for the background:
7aa8cb0dec
f4460c6f7a
479ae48e22
Perl’s lexer keeps an internal state (PL_lex_state), whereby it tracks
what kind of code it is parsing (normal, interpolated, etc.).
Due to the way bison works, yylex() must return exactly one token for
each call. Since it needs to emit multiple tokens at times, it pushes
them on to a pending token stack, and then emits one for each subse-
quent yylex() call until the stack is empty.
Previously, it would record whether it needed to look at the stack by
setting PL_lex_state to LEX_KNOWNEXT. Then, after emptying the pend-
ing token stack, it would set PL_lex_state back to its previous value,
temporarily stored in PL_lex_defer.
In some cases of syntax errors, scopes may be popped, and
PL_lex_state, which gets localised, may be unwound and set to a pre-
vious value. The result was that PL_lex_state and the pending token
stack could get out of synch, resulting in crashes.
The commits cited above fixed things by working around the
LEX_KNOWNEXT mechanism, and checking the pending token stack itself,
rather than PL_lex_state, in determining whether it needed popping.
So we ended up with LEX_KNOWNEXT and PL_lex_defer doing nothing much
and getting in the way, requiring workarounds.
This commit just removes them. We are already looking at the pending
token stack directly, instead of checking for LEX_KNOWNEXT. And if
we no longer set PL_lex_state to that value, we no longer need to use
PL_lex_defer to hold the previous value, because PL_lex_state now gets
*left alone*.
I am leaving PL_lex_defer in the parser struct for now, in the hope
that it will result in fewer immediate CPAN patches.
(I intended to fix this shortly after 5.22, but Real Life got
in the way.)
Father Chrysostomos [Tue, 17 May 2016 08:24:03 +0000 (01:24 -0700)]
Use concat overloading for "foo$_->$*"
This is the only discrepancy between $$_ and $_->$* that I know about.
To get ->@... interpolation to work, we have to emit a special
POSTJOIN token, which has just the right precedence to get it to apply
to the right amount of code before it, which perly.y then turns into a
regular join(...).
->$* and ->$#* were also going through that same code path, though it
turns out that simply omitting the POSTJOIN token for these dollar
tokens Just Works. (I thought the fix would be more complicated.)
Now $_->$* within quotes becomes a direct argument to the concat ope-
rator, instead of being wrapped in a stringify(...) (what join(...)
optimises to with a single-item list).
Father Chrysostomos [Tue, 17 May 2016 07:03:09 +0000 (00:03 -0700)]
Fix crash with: undef *_; shift;
Commit v5.13.0-149-g538f575 added on optimisation to shift() that
makes pp_shift fetch @_ directly, instead of having two separate ops.
Unfortunately, it used the wrong macro, namely GvAV, instead of GvAVn.
The latter makes sure the array actually exists.
Father Chrysostomos [Tue, 17 May 2016 06:42:09 +0000 (23:42 -0700)]
Remove some autoderef leftovers
jimc [Tue, 15 Mar 2016 04:02:52 +0000 (22:02 -0600)]
better glibc i_modulo bug handling
pp-i-modulo code currently detects a glibc bug at runtime, at the 1st
exec of each I_MODULO op. This is suboptimal; the bug should be
detectable early, and PL_ppaddr[I_MODULO] updated just once, before
any optrees are built.
Then, because we avoid the need to fixup I_MODULO ops in already built
optrees, we can drop the !PERL_DEBUG_READONLY_OPS limitation on the
alternative/workaround I_MODULO implementation that avoids the bug.
perl.c:
bug detection code is copied from PP(i_modulo),
into S_fixup_platform_bugs(), and called from perl_construct().
It patches Perl_pp_i_modulo_1() into PL_ppaddr[I_MODULO] when needed.
pp.c:
PP(i_modulo_0), the original implementation, is renamed to PP(i_modulo)
PP(i_modulo_1), the bug-fix workaround, is renamed _glibc_bugfix
it is #ifdefd as before, but dropping !PERL_DEBUG_READONLY_OPS
PP(i_modulo) - the 1st-exec switcher code, is dropped
ocode.pl:
Two i_modulo entries are added to @raw_alias.
- 1st alias: Perl_pp_i_modulo => 'i_modulo'
- 2nd alt: Perl_pp_i_modulo_glibc_bugfix => 'i_modulo'
1st is a restatement of the default alias/mapping that would be
created without the line. 2nd line is then seen as alternative to the
explicit mapping set by 1st.
Alternative functions are written to pp_proto.h after the standard
Perl_pp_* list, and include #if-cond, #endif wrappings, as was
specified by 2nd @raw_alias addition.
Changes tested by inserting '1 ||' into the 3 ifdefs and bug-detection code.
TODO:
In pp_proto.h generation, the #ifdef wrapping code which handles the
alternative functions looks like it should also be used for the
non-alternate functions. In particular, there are a handful of
pp-function prototypes that should be wrapped with #ifdef HAS_SOCKET.
That said, there have been no problem reports, so I left it alone.
TonyC: make S_fixup_platform_bugs static, porting/libperl.t was failing.
Father Chrysostomos [Tue, 17 May 2016 04:43:27 +0000 (21:43 -0700)]
regen_perly.pl: Correct typo
Sorry for the noisy patch. I can’t modify regen_perly.pl without
regenerating stuff, because the checksum changes.
Father Chrysostomos [Sun, 15 May 2016 20:36:00 +0000 (13:36 -0700)]
[perl #127976] Restore ‘or array’ to each($s) err
This part of the message was accidentally deleted when the autoderef
feature was introduced.
This commit also emits this error in addition to the ‘Experimental
forbidden’ message in those cases where the latter occurs, since it
makes things clearer.
Father Chrysostomos [Mon, 25 Apr 2016 01:19:59 +0000 (18:19 -0700)]
[perl #127976] Use yyerror for each $scalar error
yyerror queues the error, allowing for multiple error messages for
syntax errors. So at compile time it is generally better than croak.
It also provides more information about the location of the error,
with things like ‘at EOF’ and ‘near such and such’.
The hash functions each, values, and keys were using croak for the
‘Experimental forbidden’ message, unlike the array functions, which
were already using yyerror.
This commit changes the hash functions to use yyerror.
Father Chrysostomos [Mon, 25 Apr 2016 00:21:44 +0000 (17:21 -0700)]
startkve.t: Refactor setting of $errpat
This will simplify things in the next commit.
Father Chrysostomos [Sun, 24 Apr 2016 05:33:48 +0000 (22:33 -0700)]
smartkve.t: Delete now-redundant tests
The sole purpose of these tests was to make sure that the rvalues
and reach ops had the OA_DANGEROUS flag set and consequently behaved
correctly in list assignments that swap arguments. (See
d86b3122
for details.)
The tests were changed in commit
26230909, when the two ops in ques-
tion were removed, to use plain values and each ops (without the r-),
but those cases are already tested elsewhere by other tests that
d86b3122 added.
Tony Cook [Tue, 17 May 2016 01:47:07 +0000 (11:47 +1000)]
(perl #127780) point backtick users at the open pragma
Jarkko Hietaniemi [Mon, 16 May 2016 22:30:44 +0000 (18:30 -0400)]
Coverity sees a path where a NULL op might be dereferenced.
A very, very, very long path. Coverity CID 104861.
jdhedden [Mon, 16 May 2016 18:47:21 +0000 (14:47 -0400)]
Upgrade to threads::shared 1.52
jdhedden [Mon, 16 May 2016 17:41:39 +0000 (13:41 -0400)]
Upgrade to threads 2.08
Karen Etheridge [Mon, 16 May 2016 21:35:45 +0000 (14:35 -0700)]
Do not dump verbose diagnostics in perl core.
For: RT # 128160
Aaron Crane [Fri, 13 May 2016 12:50:01 +0000 (13:50 +0100)]
POSIX: test that all subroutines are exported
Aaron Crane [Fri, 13 May 2016 12:10:38 +0000 (13:10 +0100)]
POSIX: delete the L_tmpnam and L_tmpname symbols
The history here is relatively complicated.
The L_tmpname symbol is neither specified by POSIX or defined by traditional
Unix system; it's simply a typo for L_tmpnam, first introduced in Perl 5.0.
Commit
33f01dd10fdacfa5ccb83c4f933cacb0f65b707e (part of Perl 5.6) added
support for L_tmpnam, treating L_tmpname as a back-compat synonym. However,
no version of Perl has ever made L_tmpnam exportable, even at explicit
request; using that symbol has always required using its fully-qualified
POSIX::L_tmpnam name.
During the 5.8 development cycle, an apparently-unintended consequence of
various improvements to the way that POSIX.pm generates and exports constants
meant that L_tmpname stopped working. It continued to be exportable, but
trying to use the constant yielded an exception saying "Your vendor has not
defined POSIX macro L_tmpname". (This isn't exactly incorrect, of course: no
vendor defines the macro L_tmpname!)
At this point, therefore, there seems little benefit in trying to resurrect
support for the L_tmpname typo: it's impossible for any program running on
5.8.0 or later to have successfully used it.
There's perhaps an argument for making L_tmpnam exportable at this point,
since it does work when called by its full-qualified name. One option would
be to add it to @EXPORT_OK; but that is explicitly counselled against by the
POSIX.pm comments summarising the policy on symbol exports, which recommend
adding a new export tag instead. In this case, the obvious tag to use is
:stdio_h (which already exists), since the C-level symbol is provided by the
<stdio.h> header.
However, that doesn't seem worth it to me. The only possible use of L_tmpnam
is to create a buffer of a size suitable for passing to the tmpnam() C
function (which is presumably why nobody's noticed in the last fifteen years
that the symbol isn't actually exported). Furthermore, the POSIX.pm wrapper
for tmpnam() itself was deleted by
19fc2965b60669d7bc25548edb32e3cdd86a68de,
a few days ago, so merely deleting this additional symbol seems correct.
Aaron Crane [Fri, 13 May 2016 11:43:20 +0000 (12:43 +0100)]
POSIX: add new :sys_socket_h export tag with missing MSG_* symbols
These symbols were not previously exported at all, despite having been added
in the 5.9 cycle.
Aaron Crane [Fri, 13 May 2016 11:37:17 +0000 (12:37 +0100)]
POSIX: add new :netdb_h tag with missing EAI_* symbols
These symbols were not previously exported at all, despite having been added
in the 5.11 cycle.
Aaron Crane [Fri, 13 May 2016 10:29:01 +0000 (11:29 +0100)]
POSIX: add lround() to the :math_h_c99 export tag
Closes RT#127821.
Niko Tyni [Mon, 25 Apr 2016 13:31:00 +0000 (16:31 +0300)]
perlbug: wrap overly long lines
Mail transport agents limit the length of message lines at SMTP time.
One observed limit is 1000 characters per line. Mail user agents typically
work around these limits by MIME-encoding the message. Since perlbug
doesn't do that, it needs to limit the length of its lines manually to
make sure bug reports get delivered.
The longest lines in perlbug reports normally come from Config::myconfig
output, particularly 'config_args', which has been observed to exceed
1000 characters on some configurations, causing report rejection. While
less likely, the list of local patches is another potential source of
overly long lines.
Use Text::Wrap (if available) to wrap the body of the report at an
arbitrarily chosen and hopefully safe limit of 900 characters. No
indentation or continuation line markers are added, though it would
be easy to add those if desired. Attachments and mail headers are not
wrapped.
Bug-Debian: https://bugs.debian.org/822463
Niko Tyni [Thu, 28 Apr 2016 15:50:17 +0000 (18:50 +0300)]
perlbug: Refactor duplicated file reading code
_send_message_mailsend() needs to build the message itself rather than
calling build_complete_message() like the other backends, but they can
still share the file reading code, and so can the 'display report' part.
Niko Tyni [Sun, 1 May 2016 19:53:11 +0000 (22:53 +0300)]
perlbug: Add unit tests
Some of these tests have to mimic the interactive interface, which is
probably rather fragile. However, as long as -F overrides any actual
sending, no mail bombs will hopefully result.
Niko Tyni [Sun, 1 May 2016 19:19:13 +0000 (22:19 +0300)]
perlbug: Allow subjects without whitespace in test mode
Passing whitespace in an option through test.pl runperl() doesn't seem
to work, so relax the check in test mode (-t) for noninteractive testing.