This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Hugo van der Sanden [Fri, 13 Feb 2015 12:26:50 +0000 (12:26 +0000)]
[perl #123816] fix stat stacking
The check function for filetests avoids treating '-t stat' as a pair of
stackable filetests, but needs also to avoid treating 'stat -t' as
stackable.
Father Chrysostomos [Mon, 16 Feb 2015 01:11:47 +0000 (17:11 -0800)]
[perl #123712] Fix /$a[/ parsing
The parser used to read more lines of input when parsing code interpo-
lated into quote-like operators, under some circumstance. This would
result in code like this working, even though it should be a syn-
tax error:
s||${s/.*/|;
/s}Just another Perl hacker,
print
"${;s/.*/Just an";
other Perl hacker,
/s} die or return;
print
While this was harmless, other cases, like /$a[/<<a with no trailing
newline, would cause unexpected internal state that did not meet the
reasonable assumptions made by S_scan_heredoc, resulting in a crash.
The simplest fix is to modify the function that reads more input,
namely, lex_next_chunk, and prevent it from reading more lines of
input from inside a quote-like operator. (The alternative would be to
modify all the calls to lex_next_chunk, and make them conditional.)
That breaks here-doc parsing for things like s//<<EOF/, but the
LEX_NO_TERM flag to lex_next_chunk is used only by the here-doc
parser, so lex_next_chunk can make an exception if it is set.
Father Chrysostomos [Sun, 15 Feb 2015 23:43:00 +0000 (15:43 -0800)]
toke.c: Don’t bother setting type for FORMRBRACK
The type is unused, so there is no need to set it to 0.
Father Chrysostomos [Sun, 15 Feb 2015 23:41:20 +0000 (15:41 -0800)]
perly.y: Remove type from ';'
This token’s type is never used. We don’t bother setting the type,
either, in toke.c, so it will be garbage. Removing the type makes
it harder to use the garbage value by mistake in refactoring.
Hugo van der Sanden [Sun, 15 Feb 2015 11:44:00 +0000 (11:44 +0000)]
[perl #123843] fix SEGV reading data->flags
This could be triggered by trying to compile eg 'qr{x+(y(?0))*}'.
Daniel Dragan [Sun, 15 Feb 2015 15:09:39 +0000 (10:09 -0500)]
(rmv dead -I paths for mktables + rmv copying non-existant path) on Win32
Introduced in commit
f54fcafc49 in 5.11.2 , the -I paths are dead since
commit
cb8c84586a in 5.19.6 that renamed dist/Cwd to dist/PathTools . Since
the paths have been invalid for so long with no complaints so remove them.
That -I probably isn't needed anymore because Cwd AKA PathTools have been
in write_buildcustomize.pl since day 1 of write_buildcustomize.pl in
commit
5e4c4c91bd from 5.13.10 .
The makefile line says to copy to /lib the directory win32/lib. win32/lib
has never existed in Perl. There was a win32/ext from commit
b4ad57f4f7 in
5.9.2 to commit
78ff2d7be7 in 5.9.5 but not win32/lib. The useless
makefile rule is from day 1 of makefile.mk in commit
08aa1457cd in 5.004001
which was copied from the win32/Makefile, at the time of commit
08aa1457cd.
win32/Makefile got the win32/lib copy line from day 1 of win32/Makefile in
commit
0a753a7640 , and there was no /win32/lib when /win32 was commited.
Ricardo Signes [Sun, 15 Feb 2015 17:34:05 +0000 (12:34 -0500)]
release schedule udpates through March 2015
Steve Hay [Sun, 15 Feb 2015 16:06:43 +0000 (16:06 +0000)]
Turn on memory leak reporting for CFG = DebugFull builds on Windows
Setting _CRTDBG_LEAK_CHECK_DF arranges for _CrtDumpMemoryLeaks() to be
called automatically at program termination, outputting a report of all
allocations that have not been freed into the Output window in Developer
Studio.
If a leak is reported then note its allocation number, change the -1 in
the _CrtSetBreakAlloc(-1L) call to the leaked allocation number and
rebuild. A breakpoint will be set on the allocation call that leaked.
(A slicker approach is to have the report include the file name and line
number of the leaked allocation call by inserting
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
early in each compilation unit (e.g. by inserting it early in perl.h), but
that works by re-#defining malloc/free etc, which unfortunately clashes
with #defines in win32/win32iop.h and with the 'free' member of the
regexp_engine struct in regexp.h.)
Yves Orton [Sun, 15 Feb 2015 07:45:18 +0000 (15:45 +0800)]
Add comments about how backrefs are parsed
Yves Orton [Sun, 15 Feb 2015 07:38:29 +0000 (15:38 +0800)]
fix infinite loop in parsing backrefs in regex patterns
Yves Orton [Sun, 15 Feb 2015 07:26:22 +0000 (15:26 +0800)]
Add a TODO test for not infinite looping during regex backref parsing
Yves Orton [Sun, 15 Feb 2015 06:53:39 +0000 (14:53 +0800)]
add a comment so people looking for "sub run_perl" find the right thing
Steve Hay [Sat, 14 Feb 2015 19:10:37 +0000 (19:10 +0000)]
Copy perl5202delta into blead
Steve Hay [Sat, 14 Feb 2015 18:49:34 +0000 (18:49 +0000)]
Update release schedule: 5.20.2 is done; 5.20.3 will probably happen
Steve Hay [Sat, 14 Feb 2015 18:43:51 +0000 (18:43 +0000)]
Update Porting/epigraphs.pod for Perl 5.20.2
Steve Hay [Sat, 14 Feb 2015 16:24:32 +0000 (16:24 +0000)]
More updates to Module-CoreList for Perl 5.20.2
The date-based $VERSIONs for the 5.20.2 release need updating too. The
module files' $VERSIONs are left on 5.
20150220 in blead for the impending
release of 5.21.9, though; they will only be updated to 5.
20150214 in the
maint-5.20 branch itself.
Steve Hay [Sat, 14 Feb 2015 15:59:46 +0000 (15:59 +0000)]
Update perlhist: Perl 5.20.2 today
Steve Hay [Sat, 14 Feb 2015 15:59:31 +0000 (15:59 +0000)]
Update Module-CoreList: Perl 5.20.2 today
James E Keenan [Sat, 14 Feb 2015 14:48:51 +0000 (09:48 -0500)]
Two more typographic cleanups, suggested by alh++.
Craig A. Berry [Sat, 14 Feb 2015 14:26:02 +0000 (08:26 -0600)]
Set NAN_COMPARE_BROKEN on VMS with long doubles.
This gets us passing more (but not all) of the infnan.t tests
with long doubles (which are true 128-bit IEEE 754 gizmos).
James E Keenan [Sat, 14 Feb 2015 14:20:42 +0000 (09:20 -0500)]
Correct typo in code example.
Reported by saint.snit++
For: RT #123820
Karl Williamson [Sat, 14 Feb 2015 04:51:56 +0000 (21:51 -0700)]
Unicode::UCD: Generalize for EBCDIC platforms
Karl Williamson [Fri, 13 Feb 2015 22:28:34 +0000 (15:28 -0700)]
Unicode::UCD::prop_aliases(): return correct long and short names
Certain of the Perl extensions did not have the correct long and short
names returned.
Karl Williamson [Fri, 13 Feb 2015 22:14:46 +0000 (15:14 -0700)]
mktables: Rip out redundant tables
Experimentally, we changed the definition of Perl's space to include a
vertical tab, thus being identical to the Posix space definition. In
case we had to back this out, I left these as separate tables, but now
that experiment is considered a success, and those tables can be
collapsed. Later commits will finish up removing the experimental
status of this.
Karl Williamson [Fri, 13 Feb 2015 22:06:15 +0000 (15:06 -0700)]
mktables: Fix looping recursive detection
This code was spuriously finding that the was a loop in what is being
output. Use 'local' to fix it.
Karl Williamson [Fri, 13 Feb 2015 18:08:30 +0000 (11:08 -0700)]
mktables: Remove unused variable
Karl Williamson [Fri, 13 Feb 2015 18:07:21 +0000 (11:07 -0700)]
mktables: Fix typo in comment
David Mitchell [Fri, 13 Feb 2015 12:47:36 +0000 (12:47 +0000)]
bench.pl: fix doc --sort thinko
--sort's arg is field:perl, not perl:field
David Mitchell [Fri, 13 Feb 2015 11:54:53 +0000 (11:54 +0000)]
add some more tests for RT #123743
In addition to /.*/, also check that /.*?/ isn't slow.
Lukas Mai [Fri, 13 Feb 2015 10:07:38 +0000 (11:07 +0100)]
add a comment documenting STATIC_ASSERT_GLOBAL/STATIC_ASSERT_STMT
Steve Hay [Thu, 12 Feb 2015 14:18:06 +0000 (14:18 +0000)]
Add new DebugSymbols and DebugFull CFG options to Windows makefiles
This commit implements the suggestion from perl #123439 of adding a
CFG=DebugSymbols option for a debug mode build without enabling perl's
-DDEBUGGING code, and also adds a CFG=DebugFull option for a debug mode
build which uses the debug version of the CRT and enables -D_DEBUG code
(in perl and in the CRT) such as extra assertions and invalid parameter
warnings. (Note that failed invalid parameter checks are harmless thanks
to perl's invalid parameter handler in win32/win32.c. However, blindly
ignoring them is not a good thing. Compiling with _DEBUG causes the handler
to print warnings on STDERR about checks that have failed. Ideally these
should be fixed, or silenced by some other means if they really are
harmless--as was done for some such warnings by commit
d52ca5864f.)
I attempted to do something like the DebugFull part once before, but was
held back by miniperl not using PerlIO, which resulted in a huge number of
invalid parameter warnings:
http://www.nntp.perl.org/group/perl.perl5.porters/2012/09/msg191674.html
However, that issue was recently removed by commit
8c847e6678, which
removed Windows makefile support for building without PerlIO, including
making miniperl now use PerlIO.
As noted in the makefiles comments, however, there are still a few cases
of invalid parameter warnings, which is partly why I've added the new
DebugFull option, rather than altering the existing Debug option.
Karl Williamson [Thu, 12 Feb 2015 17:19:10 +0000 (10:19 -0700)]
bisect-runner.pl: Fix too long verbatim in pod
Verbatim lines only have to be indented one space to be effective and to
show as offset from the surrounding text. By decreasing the
indentation, this commit causes the lines not to wrap.
Chris 'BinGOs' Williams [Thu, 12 Feb 2015 12:51:06 +0000 (12:51 +0000)]
Update Pod-Perldoc to CPAN version 3.25
[DELTA]
3.25 - Thu Feb 12 03:06:43 UTC 2015
* No changes - roll an official
release for inclusion in Perl 5.22
3.24_02 - Wed Jan 21 03:12:37 UTC 2015
* Dave Mitchell sent a patch to reduce stderr spam
during core perl builds. Resolves RT#101493
* Make perldoc honor the MANPAGER environment
variable as documented. Resolves RT#100933
* Decode command line arguments at UTF-8 data.
Resolves RT#9806
3.24_01 - Wed Sep 10 03:13:58 UTC 2014
* The 'ToTerm' backend generates terminal escape sequences that
the 'less' pager does not display by default. The "-R" option
controls this, so pass it in the LESS environment variable
to avoid disturbing other pager invocations. Patch by
Niko Tyni. Closes RT#98636
* Unify filehandle opens and encoding into two methods
'open_fh' and 'set_encoding'. Based on a pull request
by Koichi KUBO. Closes RT#98019 better than c3fd47f :)
* Applied PR by Olivier Mengué to 'use parent' instead
of 'use base'
Hugo van der Sanden [Thu, 12 Feb 2015 00:11:31 +0000 (00:11 +0000)]
fix assertions for UTF8_TWO_BYTE_HI/LO
Replace the stricter MAX_PORTABLE_UTF8_TWO_BYTE check with a looser
MAX_UTF8_TWO_BYTE check, else we can't correctly convert codepoints in
the range 0x400-0x7ff from utf16 to utf8 on non-ebcdic platforms.
Hugo van der Sanden [Wed, 11 Feb 2015 17:24:33 +0000 (17:24 +0000)]
Add --crash option for Porting/bisect
If --crash is specified, treat test cases as bad only if they exit with
($? & 0xff) non-zero.
Chris 'BinGOs' Williams [Wed, 11 Feb 2015 14:30:08 +0000 (14:30 +0000)]
Update Pod-Parser to CPAN version 1.63
[DELTA]
10-Feb-2015 Marek Rouchal <marekr@cpan.org>
-----------------------------------------------------------------------------
Version 1.63
+ CPAN#101847: [PATCH] Bump $VERSION in module changed since Pod-Parser-1.60
increased VERSION in all *.pm files
+ CPAN#98610: Pod::Find should skip also object directories of modern vc
systems (.git, .hg)
implemented in Pod::Find
Thanks for the reports and patches!
Chris 'BinGOs' Williams [Wed, 11 Feb 2015 14:26:13 +0000 (14:26 +0000)]
Update Config-Perl-V to CPAN version 0.23
[DELTA]
0.23 - 11 Feb 2015, H.Merijn Brand
* Update copyright to 2015
* Add summary tests
* Remove perl recommendation from META as it breaks cpan clients
* Move repo to github
Jarkko Hietaniemi [Wed, 11 Feb 2015 13:49:27 +0000 (08:49 -0500)]
Jarkko Hietaniemi [Wed, 11 Feb 2015 13:24:55 +0000 (08:24 -0500)]
infnan: store the nan payload error in an optional SV
Jarkko Hietaniemi [Wed, 11 Feb 2015 12:55:55 +0000 (07:55 -0500)]
infnan: perldata tweaks
Steve Hay [Tue, 10 Feb 2015 08:51:26 +0000 (08:51 +0000)]
Remove duplicate declaration of win32_stat from win32/win32iop.h
The same declaration appears slightly higher up in the same file.
Steve Hay [Tue, 10 Feb 2015 08:23:22 +0000 (08:23 +0000)]
Silence compiler warnings with gcc 4.7.2 and 4.8.1 from mingw.org
These compilers (with other contemporaneous packages, I forget exactly
which versions of everything I have installed) contain
#define fstat _fstat
in include/sys/stat.h, which clashes with win32/win32iop.h's #define and
causes "warning: "fstat" redefined [enabled by default]" for just about
every .c file compiled. Likewise for stat.
Karl Williamson [Thu, 22 Jan 2015 22:06:43 +0000 (15:06 -0700)]
Unicode::UCD: Fix synopsis
Instead of using a constant code point in some of the lines, use the
$variable that is used in other lines
Spotted by Dagfinn Ilmari Mannsåker
Jarkko Hietaniemi [Wed, 11 Feb 2015 00:37:54 +0000 (19:37 -0500)]
infnan: separate the nan payload overflow and invalid messages
Also: display the payload, and the number of bits
Jarkko Hietaniemi [Tue, 10 Feb 2015 18:26:50 +0000 (13:26 -0500)]
infnan: change the invalid nan message, add to perldiag
Jarkko Hietaniemi [Tue, 10 Feb 2015 18:18:20 +0000 (13:18 -0500)]
infnan: "nan(1)cy" should numify to $NaN, but also warn
More test cases.
Karl Williamson [Tue, 27 Jan 2015 22:08:08 +0000 (15:08 -0700)]
Unicode::UCD: Add prop_values() function
This new function returns the input property's possible values.
Chris 'BinGOs' Williams [Tue, 10 Feb 2015 16:12:31 +0000 (16:12 +0000)]
Update Socket to CPAN version 2.017
[DELTA]
2.017 2015/02/10 12:05:14
[CHANGES]
* Added some more SO_* constants defined on Linux (thanks
Ronald van Dorp)
[BUGFIXES]
* Remember to SvGETMAGIC in getnameinfo() (RT79557)
* Quiet some compiler warnings (RT101495, RT100736)
* Fix "Attempt to free unreferenced scalar" warnings (RT78626, et.al.)
David Mitchell [Tue, 10 Feb 2015 15:03:54 +0000 (15:03 +0000)]
remove invalid ASSUME from MULTIDEREF code
RT #123735
The code that examines ops looking for OP_MULTIDEREF candidates,
makes assertions about what flags it think can be present on ops;
the idea being that if those assumptions change, the optimisation
code may need changing too.
However, the following syntax-errored code
print
my(r)
can trigger the assertion about PARENS not being set on an OP_GV.
So don't assert that.
Hugo van der Sanden [Tue, 10 Feb 2015 14:25:42 +0000 (14:25 +0000)]
[perl #123782] regcomp: check for overflow on /(?123)/
AFL (<http://lcamtuf.coredump.cx/afl>) found that the UV to I32 conversion
can evade the necessary range checks on wraparound, leading to bad reads.
Check for it, and force to I32_MAX, expecting that this will usually
yield a "Reference to nonexistent group" error.
David Mitchell [Tue, 10 Feb 2015 12:17:51 +0000 (12:17 +0000)]
simpify and speed up /.*.../ handling
See RT ##123743.
A pattern that starts /.*/ has a fake MBOL or SBOL flag added, along
with PREGf_IMPLICIT.
The idea is that, with /.*.../s, if the NFA don't match when started at
pos 0, then it's not going to match if started at any other position
either; while /.*.../ won't match at any other start position up until
the next \n.
However, the branch in regexec() that implemented this was a bit a mess
(like much in the perl core, it had gradually accreted), and caused
intuit-enabled /.*.../ and /.*...patterns to go quadratic.
The branch looked roughly like:
if (anchored) {
if (regtry(s)) goto success;
if (can_intuit) {
while (s < end) {
s = intuit(s+1);
if (!s) goto fail;
if (regtry(s)) goto success;
}
}
else {
while (s < end) {
s = skip_to_next_newline(s);
if (regtry(s)) goto success;
}
}
}
The problem is that in the presence of a .* at the start of the pattern,
intuit() will always return either NULL on failure, or the start position,
rather than any later position. So the can_intuit branch above calls
regtry() on every character position.
This commit fixes this by changing the structure of the code to be like
this, where it only tries things on newline boundaries:
if (anchored) {
if (regtry(s)) goto success;
while (1) {
s = skip_to_next_newline(s);
if (can_intuit) {
s = intuit(s+1);
if (!s) goto fail;
}
if (regtry(s)) goto success;
}
}
This makes the code a lot simpler, and mostly avoids quadratic behaviour
(you can still get it with a string consisting mainly of newlines).
Tony Cook [Tue, 10 Feb 2015 06:02:59 +0000 (17:02 +1100)]
perldelta for
f5fe1b19fc61
Tony Cook [Tue, 10 Feb 2015 04:54:16 +0000 (15:54 +1100)]
remove the shell fallback from list pipe open on Win32
This is a potential security issue, and while we'd need a deprecation
cycle to remove it from system(), there hasn't been a production
release of perl with list pipe open, so we can pretend it never was.
Without the shell, CreateProcess() won't pick up .cmd or .bat files,
which several perl utilities are packaged as on Win32, so use
qualified_path() to produce a full executable name.
Hugo van der Sanden [Tue, 10 Feb 2015 02:09:13 +0000 (02:09 +0000)]
regcomp can read past end of string after parsing flags
New test in
8a6d8ec6fe revealed additional code problem reading past
end of string under clang with sanitize=address.
Tony Cook [Tue, 10 Feb 2015 00:25:22 +0000 (11:25 +1100)]
Tony Cook [Tue, 10 Feb 2015 00:24:22 +0000 (11:24 +1100)]
[perl #123554] fix threaded builds and prevent a warning
Tony Cook [Mon, 9 Feb 2015 23:19:56 +0000 (10:19 +1100)]
[perl #123554] catch a couple of other size overflows
Unfortunately, running out of memory in safesysmalloc() and
safesysrealloc() doesn't produce a catchable croak(), so remove the
test.
Hugo van der Sanden [Sat, 7 Feb 2015 16:31:04 +0000 (16:31 +0000)]
[perl #123755] including unknown char in error requires care
AFL (<http://lcamtuf.coredump.cx/afl>) found that when producing the
error message for /(??/ we hit an assert because we've stepped past
the end of the pattern string. Code inspection found that we also do
that in other branches, and we also need to check UTF more carefully.
Hugo van der Sanden [Sun, 8 Feb 2015 13:53:00 +0000 (13:53 +0000)]
[perl #123759] always count on OPpTRANS_IDENTICAL
If we detect that an in-place transliteration will not result in any
changes to the string, we set OPpTRANS_IDENTICAL and skip the normal
checks for readonlyness; but if we do that, we must make sure to use
the same logic to decide which transliteration strategy to use, or
we may end up trying to write to the readonly string anyway.
This resulted in several ways to hit assert failures, found by AFL
(<http://lcamtuf.coredump.cx/afl>).
Father Chrysostomos [Mon, 9 Feb 2015 05:29:59 +0000 (21:29 -0800)]
[perl #123677] Crash with token stack overflow
In this naughty code snippet:
s)$0{0h());qx(@0);qx(@0);qx(@0)
the s)...)) is treated as a substition, with $0{0h( for the left part.
When the lexer reaches the h( it tries to emit two tokens at once, '&'
and a WORD token representing the h. To do that it pushes the WORD on
to the pending token stack and then emits '&'. The next call to yylex
will usually pop the token off the pending stack and use that, because
the lexing state (PL_lex_state) is LEX_KNOWNEXT.
However, when the parser sees '&', it immediately reports it as
a syntax error, and tries to pop tokens to make sense of what it
has, popping scopes in the process. Inside a quote-like operator,
PL_lex_state is localised, so the value after this scope-popping is
no longer LEX_KNOWNEXT, so the next call to yylex continues parsing
‘;qx...’ and ignores the pending token.
When it reaches the @0 inside the qx, it tries to push five pending
tokens on to the stack at once, because that’s how the implicit join
works. But the stack only has room for five items. Since it already
has one, the last item overflows, corrupting the parser state.
Crashes ensue.
If we check for the number of pending tokens and always emit any
regardless of the lexing state, then we avoid the crash. This is
arguably how it should have been written to begin with.
This makes LEX_KNOWNEXT, and probably PL_lex_defer, redundant, but I
will wait till after perl 5.22 before removing those, as the removal
may break CPAN modules, and this is a little late in the dev cycle.
Father Chrysostomos [Mon, 9 Feb 2015 04:24:15 +0000 (20:24 -0800)]
toke.c: Assert that we don’t overflow token stack
With this assertion, the test case from #123743 fails sooner.
Father Chrysostomos [Mon, 9 Feb 2015 04:04:50 +0000 (20:04 -0800)]
Consistent spaces after dots in perldata
Jarkko Hietaniemi [Sat, 7 Feb 2015 23:13:43 +0000 (18:13 -0500)]
infnan: document the infnan a bit
Jarkko Hietaniemi [Sat, 7 Feb 2015 20:09:05 +0000 (15:09 -0500)]
infnan: test nan payload input/output
Jarkko Hietaniemi [Sat, 7 Feb 2015 22:27:24 +0000 (17:27 -0500)]
infnan: add POSIX::issignaling
The current best guess for the eventual name of the C interface.
(http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1664.pdf)
Jarkko Hietaniemi [Sun, 8 Feb 2015 17:45:01 +0000 (12:45 -0500)]
infnan: the nan quiet/signaling bit is not enough
Jarkko Hietaniemi [Sat, 7 Feb 2015 20:47:59 +0000 (15:47 -0500)]
infnan: the x86 80-bit extended precision is special
Jarkko Hietaniemi [Sun, 8 Feb 2015 00:39:55 +0000 (19:39 -0500)]
infnan: API context juggling
Jarkko Hietaniemi [Sat, 7 Feb 2015 20:07:08 +0000 (15:07 -0500)]
infnan: grok_number* setting the infnan NV directly
Jarkko Hietaniemi [Sat, 7 Feb 2015 19:42:47 +0000 (14:42 -0500)]
infnan: nan payload output with sprintf %#g
Jarkko Hietaniemi [Sat, 7 Feb 2015 19:48:22 +0000 (14:48 -0500)]
infnan: space for nan payload output
Jarkko Hietaniemi [Sat, 7 Feb 2015 19:31:25 +0000 (14:31 -0500)]
infnan: move S_hextract earlier
Jarkko Hietaniemi [Sat, 7 Feb 2015 19:28:30 +0000 (14:28 -0500)]
infnan: add grok_nan and grok_nan_payload
Jarkko Hietaniemi [Sat, 7 Feb 2015 19:16:04 +0000 (14:16 -0500)]
infnan: add nan_payload_set
Jarkko Hietaniemi [Sat, 7 Feb 2015 18:12:33 +0000 (13:12 -0500)]
infnan: add nan_is_signaling
Jarkko Hietaniemi [Sat, 7 Feb 2015 14:29:31 +0000 (09:29 -0500)]
infnan: add nan_signaling_set
Jarkko Hietaniemi [Sat, 7 Feb 2015 14:27:05 +0000 (09:27 -0500)]
infnan: add nan_hibyte
Jarkko Hietaniemi [Sat, 7 Feb 2015 18:27:42 +0000 (13:27 -0500)]
infnan: do not define NV_NAN from a signaling nan
This is not a strong guarantee that the NV_NAN is a quiet NaN.
Father Chrysostomos [Sun, 8 Feb 2015 20:45:12 +0000 (12:45 -0800)]
Remove get-magic from $/
and use a different approach to prevent $/ from being set to a bad
value.
This should fix ticket #123739. Commit v5.21.8-197-g5fe499a made
$/’s get-magic read PL_rs, so that the croak when setting $/ to a
bad value would not leave $/ with that bad value, in order to fix
bug #123218.
Some CPAN modules do not like $/ reading PL_rs that way. So we
have to change this back. I am not actually removing the get-
magic, but just making it a no-op, as it was before. The set-
magic now sets $/ back to its previous value before croaking.
Jarkko Hietaniemi [Sun, 8 Feb 2015 13:52:41 +0000 (08:52 -0500)]
test skip under miniperl
James E Keenan [Sun, 8 Feb 2015 03:56:04 +0000 (22:56 -0500)]
Correct grammatical error in Benchmark POD.
Increment $VERSION and add entry to perldelta.
Father Chrysostomos [Sun, 8 Feb 2015 03:22:00 +0000 (19:22 -0800)]
[perl #123753] Assert fail with &{+foo} and errors
This fixes the problem mentioned in
3c47da3c2e with an op address
being used as flags. '&' not followed by a identifier was being fed
to the parser with a stale token value, left over from the previous
token that had a value, which might be an op address. This would
cause the flags on the op to vary randomly.
Usually the rv2cv op created this way is nulled, but if there is a
syntax error it may be freed before that happens. And it is when the
op is freed that the private flags are checked to make sure no invalid
flags have been set.
The test added to t/op/lex.t used to fail an assertion (for me) more
than half the time, but not always, because the 0x10 bit was being set
in op_private (rv2cv does not use that bit).
Father Chrysostomos [Sun, 8 Feb 2015 03:10:06 +0000 (19:10 -0800)]
toke.c: Remove redundant PL_expect assignment
As of v5.21.3-105-gc5e7362, force_ident no longer reads the value of
PL_expect, so the assignment can come after it. And TERM('&') (just
after this if-statement) already assigns XOPERATOR to PL_expect.
Father Chrysostomos [Sat, 7 Feb 2015 18:06:39 +0000 (10:06 -0800)]
perly.y: Remove types for '$' and '*'
These two tokens never use their value, and the value is not even set
in toke.c, which means it will contain a junk value from some previous
token. Removing the types prevents that junk value from being acci-
dentally used.
Father Chrysostomos [Sat, 7 Feb 2015 18:04:40 +0000 (10:04 -0800)]
[perl #123753] &\0foo parsing
Normally the lexer skips over stray nulls, treating them as white-
space. After a sigil, though, it was getting confused. While $\0foo
would work and was equivalent to $foo (but did not work for lexicals),
$\0eq was a syntax error. Some cases of &\0foo would cause assertion
failures or outright buggy behaviour, such as strictures randomly
turning on and off.
There were two problems occurring:
1) Nulls were not being treated as whitespace right after a sigil,
unlike elsewhere.
2) '&' not followed immediately by an identifier was not getting
pl_yylval set, so the previous value, which might be an op address,
was being passed as a flags parameter to an op constructor. (The
other sigil tokens never use their values.)
This commit addresses the first of those. I still need to investigate
whether the second can still cause problems.
Father Chrysostomos [Sat, 7 Feb 2015 15:32:19 +0000 (07:32 -0800)]
t/op/lex.t: Add comment about the file’s purpose
Karl Williamson [Tue, 27 Jan 2015 18:41:55 +0000 (11:41 -0700)]
loc_tools.pl: do a 'require' before module's function call
This was failing to do the require before testing if the function in the
module existed, so if the require hadn't been done by someone else, it
would show as not existing, and so would fail unnecessarily.
The other fix is to not assume the require has been done, so in the
right circumstances, this could have an undefined function error. But
all current uses had already done the require, so this bug has yet to
show up.
Karl Williamson [Tue, 27 Jan 2015 05:40:28 +0000 (22:40 -0700)]
regexec.c: Rmv 2 unused macro parameters.
Craig A. Berry [Fri, 6 Feb 2015 23:31:43 +0000 (17:31 -0600)]
Fix quoting in new switchd.t test.
Escaped double quotes are not portable, but luckily we don't need
to worry about what is portable as runperl will take care of it for
us if we leave things in its capable hands.
Follow-up to
8d28fc8f69270cc75d9564.
Karl Williamson [Thu, 11 Dec 2014 19:29:49 +0000 (12:29 -0700)]
Generalize Carp for non-ASCII platforms
This includes making some {} optional in arg_regexp.t, as I couldn't get
them to consistently appear.
Karl Williamson [Thu, 11 Dec 2014 19:37:01 +0000 (12:37 -0700)]
Carp: Fix off-by-one error for early Perl versions
This error occurred only when running Perl before 5.14, and included DEL
as a printable instead of excluding it.
Karl Williamson [Fri, 6 Feb 2015 22:10:48 +0000 (15:10 -0700)]
Increment Carp version to 0.35
Father Chrysostomos [Wed, 24 Dec 2014 06:34:10 +0000 (22:34 -0800)]
Deparse: Don’t choke on SPECIAL constants
Some modules, e.g., POSIX, create constants in the form of references
to immortals in the stash. B::Deparse started croaking on these in
v5.21.6-584-g03b8f76.
$ ./perl -Ilib -MO=Deparse -MPOSIX -e0
Can't locate object method "FLAGS" via package "B::SPECIAL" at lib/B/Deparse.pm line 745.
CHECK failed--call queue aborted.
At the same time I fixed the stash-probing code, I also had to fix
deparsing of \!0, which had the same bug.
Father Chrysostomos [Fri, 6 Feb 2015 20:42:34 +0000 (12:42 -0800)]
perlvar typo
David Golden [Fri, 6 Feb 2015 20:08:21 +0000 (15:08 -0500)]
perlvar: further clarify version number representations and usage
Karl Williamson [Fri, 6 Feb 2015 17:34:19 +0000 (10:34 -0700)]
t/run/locale.t: Remove obsolete comments
STDERR is now completely turned off.
Karl Williamson [Fri, 6 Feb 2015 17:21:01 +0000 (10:21 -0700)]
locale.c: savepv() of getenv()
See https://rt.perl.org/Public/Bug/Display.html?id=123748.
This also changes a '0' into a FALSE when initializing a boolean, which
I consider clearer.
Karl Williamson [Fri, 6 Feb 2015 17:18:39 +0000 (10:18 -0700)]
locale.c: Fix comment
Father Chrysostomos [Fri, 6 Feb 2015 18:14:47 +0000 (10:14 -0800)]
[perl #123753] Fix assertion failure with map+map
ck_grep calls ck_fun, which sets the lower private bits to indicate
the number of operands. ck_grep usually undoes that, by clobbering
op_private completetly. If an error has occurred, it doesn’t, so we
may fail an assertion if the lower bits are not expected to be set on
mapstart and grepstart.
Father Chrysostomos [Fri, 6 Feb 2015 16:25:14 +0000 (08:25 -0800)]
[perl #123737] Fix assertion failure with 0${
S_no_op, which displays ‘Foo found where operator expected’, assumes
that PL_bufptr points to the beginning of the token, but that was not
the case for ${ at the end of a line. The attempt to read more into
the buffer would make PL_bufptr point to the end of the line. This
meant it would use a negative string length when generating the
‘(Missing operator before foo?)’ text, only accidentally escaping a
crash. On debugging builds, it failed an assertion.