This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
David Mitchell [Mon, 28 Mar 2016 14:36:42 +0000 (15:36 +0100)]
RT #127786: assertion failure with eval in DB pkg.
Normally a cloned anon sud has a NULL CvOUTSIDE(), unless that
sub can contain code that will do an eval.
However, calling eval from within the DB package pretends that the eval
was done in the caller's scope. which then trips up on the NULL
CvOUTSIDE().
ts)
David Mitchell [Mon, 28 Mar 2016 08:59:10 +0000 (09:59 +0100)]
re_exec_indentf,re_indentf: silence warnings
Pass the right types to printf.
For re_exec_indentf(), really the type of the depth arg should be changed
so that it and the depth var are consistent throughout regexec.c, but
that's probably something for post-5.24.
David Mitchell [Mon, 28 Mar 2016 09:52:18 +0000 (10:52 +0100)]
silence -Wparentheses-equality
Clang has taken it upon itself to warn when an equality is wrapped in
double parentheses, e.g.
((foo == bar))
Which is a bit dumb, as any code along the lines of
#define isBAR (foo == BAR)
if (isBAR) {}
will trigger the warning.
This commit shuts clang up by putting in a harmless cast:
#define isBAR cBOOL(foo == BAR)
Daniel Dragan [Sat, 26 Mar 2016 17:44:30 +0000 (13:44 -0400)]
silence warnings in inline.h on Win64 VC build
c:\p523\src\inline.h(211) : warning C4267: 'function' : conversion from 'size_t'
to 'I32', possible loss of data
c:\p523\src\inline.h(212) : warning C4267: 'function' : conversion from 'size_t'
to 'I32', possible loss of data
c:\p523\src\inline.h(421) : warning C4244: '=' : conversion from '__int64' to 'I
32', possible loss of data
c:\p523\src\inline.h(423) : warning C4244: '=' : conversion from '__int64' to 'I
32', possible loss of data
To fix the warnings at line 211 and 212, change the func to use a signed
ptr length type. Although on x64, a 64b to 64b move instruction is 1 byte
longer than a 32b to 32b move, so this commit adds a couple more bytes of
machine code to the interp, but PVs len and cur are STRLEN, which is 64b
on 64b OS, so something bad would happen if a very large off arg was
passed to Perl_utf8_hop that was trucated to 32b, hence casting to silence
the warning isn't appropriate, instead a bigger type is needed.
S_cx_pushblock, a 8*(2^32), or 32 GB long perl stack malloc block is
unrealistic. A 32 GB mark stack is infinite recursion. Cast away the
warnings.
Jarkko Hietaniemi [Sun, 27 Mar 2016 15:11:18 +0000 (11:11 -0400)]
Move the zeroing back before the dladdr() call.
Vladimir Timofeev [Fri, 25 Mar 2016 12:41:25 +0000 (08:41 -0400)]
[perl #127773: Assertion failure in perl built with Dusecbacktrace]
Jarkko Hietaniemi [Sun, 27 Mar 2016 14:50:51 +0000 (10:50 -0400)]
ODBM_File version bump
Jarkko Hietaniemi [Thu, 24 Mar 2016 11:12:51 +0000 (07:12 -0400)]
[perl #127751] error building ODBM_File on Windows, perl 5.23.9
No POSIX open in Win32, broken by
ed6087adbd9c90b59cf3f08af7c23a947c00bf69
Use the PerlLIO_open3 as suggested by Tony Cook, use the same trick as POSIX.xs
Craig A. Berry [Sat, 26 Mar 2016 13:56:15 +0000 (08:56 -0500)]
Revert "configure.com update for newlocale, freelocale, and uselocale."
This reverts commit
f0e3aef8abfe33645e0b9682e5f5ec7090de749f.
The changes had actually already been done by a regen at
0f2b45c74307980ff2, so these were duplicates.
Aristotle Pagaltzis [Fri, 25 Mar 2016 23:55:21 +0000 (00:55 +0100)]
improve perldiag implicit close text still further
Craig A. Berry [Fri, 25 Mar 2016 21:48:35 +0000 (16:48 -0500)]
Suppress another empty \N{} warning in pat_advanced.t.
Follow-up to
d8d26cacf9f6b2fbd476.
H.Merijn Brand [Fri, 25 Mar 2016 15:14:18 +0000 (16:14 +0100)]
Add probe for memmem
Abigail [Fri, 25 Mar 2016 12:36:28 +0000 (13:36 +0100)]
Suggest having the previous release ready.
Each time I do a release, I find myself scrambling to download the
tarball of the previous release, and install it so it can be compared
to the release that's worked on. Added a paragraph as a reminder to
that before the day of the release.
James E Keenan [Fri, 25 Mar 2016 12:13:00 +0000 (08:13 -0400)]
Add 's' and 'S' to list of ANSI C portable filename characters.
For: RT #127783. Thanks to Jim Davis for report.
Aristotle Pagaltzis [Fri, 25 Mar 2016 11:02:44 +0000 (12:02 +0100)]
improve perldiag implicit close text further
Karl Williamson [Fri, 25 Mar 2016 01:45:24 +0000 (19:45 -0600)]
PATCH: [perl #123417] Deprecate empty \N{}
Karl Williamson [Tue, 22 Mar 2016 17:03:51 +0000 (11:03 -0600)]
t/re/re_tests: Add missing \ escape to a test
This just happened to work, but the backslash should be escaped, as it
is evaluated in qq context
David Mitchell [Sun, 20 Mar 2016 17:12:13 +0000 (17:12 +0000)]
stop lc() etc accidentally modifying in-place.
As an optimisation, [ul]c() and [ul]cfirst() sometimes modify their
argument in-place rather than returning a modified copy.
This should only be done when there is no possibility that the arg is
going to be reused. However, this fails:
use List::Util qw{ first };
my %hash = ( ASD => 1, ZXC => 2, QWE => 3, TYU => 4);
print first { lc $_ eq 'qwe' } keys %hash;
which prints "qwe" rather than "QWE".
Bascally everything in perl that sets $_ or $a/$b and calls a code block
or function, such as map, grep, for and, sort, either copies any PADTMPs,
turns off SvTEMP, and/or bumps the reference count.
List::Util doesn't do this, and it is likely that other CPAN modules
which do "set $_ and call a block" don't either.
This has been failing since 5.20.0: perl has been in-placing if the arg is
(SvTEMP && RC==1 && !mg) (due to v5.19.7-112-g5cd5e2d).
Make the optimisation critera stricter by always copying SvTEMPs.
It still allows the optimisation if the arg is a PADTMP - I don't know
whether this is unsafe too.
Perhaps we can think of something better after 5.24?
David Mitchell [Wed, 23 Mar 2016 16:11:01 +0000 (16:11 +0000)]
improve perldiag implicit close text
David Mitchell [Wed, 23 Mar 2016 16:30:54 +0000 (16:30 +0000)]
Mark unexpectedly passing TEST -deparse tests
About 270 test files formerly marked as "expected to fail under
"./TEST -deparse" now pass. We must be doing something right :-)
Remove them from the list of expected failures.
Conversely, there are also 174 failing tests that are aren't marked
as expected to fail, so we're probably doing something wrong too :-(.
Matthew Horsfall [Wed, 23 Mar 2016 00:12:12 +0000 (20:12 -0400)]
List perl.develop-help.com in the RMG regarding smoke reports.
Jarkko Hietaniemi [Tue, 22 Mar 2016 23:43:21 +0000 (19:43 -0400)]
[perl #127764] Perl with '-Dusecbacktrace' doesn't compile on darwin
Fix a thinko in
22ff3130.
Dagfinn Ilmari Mannsåker [Tue, 22 Mar 2016 21:07:38 +0000 (21:07 +0000)]
[perl #127765] Fix bogus $File::Spec::AmigaOS::VERSION
';' a single bitflip away from '3', which must have happened before
e46aa1dd got committed, since the SHA-1 hashes are all consistent.
Abigail [Mon, 21 Mar 2016 16:56:51 +0000 (17:56 +0100)]
Point out that at some stage, porting tests will fail.
This trips me each and every time I make a release. Whenever the
release manager guide calls for a compile/make test cycle, I run
"make test_harness", and this fails at this stage, because Module::CoreList
has not been updated yet (the next action described in the release
managers guide is updating Module::CoreList).
I also removed some suboptimal advice I've written here in the past.
Chris 'BinGOs' Williams [Mon, 21 Mar 2016 15:09:21 +0000 (15:09 +0000)]
Maintainers.pl updates
David Mitchell [Mon, 21 Mar 2016 08:45:13 +0000 (08:45 +0000)]
Integrate podlators 4.07
Abigail [Sun, 20 Mar 2016 17:54:17 +0000 (18:54 +0100)]
Bump version in various places
Abigail [Sun, 20 Mar 2016 17:25:14 +0000 (18:25 +0100)]
New perldelta
Leon Timmermans [Sun, 20 Mar 2016 17:18:44 +0000 (18:18 +0100)]
Remove vutil.c from list of customized files
Abigail [Sun, 20 Mar 2016 17:00:54 +0000 (18:00 +0100)]
Tick off releases
Abigail [Sun, 20 Mar 2016 16:56:57 +0000 (17:56 +0100)]
Epigraph for 5.23.9.
The missing capital in the book title is not a typo. The book is titled
using lowercase letters only.
Abigail [Sun, 20 Mar 2016 16:49:46 +0000 (17:49 +0100)]
Merge branch 'release-5.23.9' into blead
Karl Williamson [Sun, 20 Mar 2016 15:50:45 +0000 (09:50 -0600)]
perldelta: Clarify a statement
This was misleading and gave unnecessary detail about an internal-only
function. I'm sorry I forgot to make an entry about this earlier.
Abigail [Sun, 20 Mar 2016 13:53:00 +0000 (14:53 +0100)]
Add new release to perlhist
Abigail [Sun, 20 Mar 2016 13:25:31 +0000 (14:25 +0100)]
Changed modules section for perldelta.pod
Abigail [Sun, 20 Mar 2016 12:45:33 +0000 (13:45 +0100)]
Added Acknowledgements
Abigail [Sun, 20 Mar 2016 12:25:37 +0000 (13:25 +0100)]
Update Module::CoreList for 5.23.9
Abigail [Sun, 20 Mar 2016 12:21:42 +0000 (13:21 +0100)]
Mention (relative) path to Module::CoreList's Changes file.
So we can easily copy-and-paste it.
Karl Williamson [Sun, 20 Mar 2016 04:48:54 +0000 (22:48 -0600)]
Imprison at_tindex_nomg()
This name is controversial. Use #ifdef's to keep it from being exposed
outside of the places that already use it. And don't publicize that it
exists.
Karl Williamson [Sun, 20 Mar 2016 04:02:32 +0000 (22:02 -0600)]
regcomp.c: Fix -Dr output.
I got things slightly wroing in
b77aba85f6ec3b2a2341077b14f39261c5753cea. It did not properly handle
the case for inversion /d of complemented classes, such as \W. Two
examples being [^\W0-9] and [^\S\wa].
Abigail [Sat, 19 Mar 2016 23:29:26 +0000 (00:29 +0100)]
Document the changes for perl 5.23.9
We still need to take care of the automated parts (new/changed/delete module,
and the Acknowledgements.
Craig A. Berry [Sat, 19 Mar 2016 23:39:52 +0000 (18:39 -0500)]
configure.com update for newlocale, freelocale, and uselocale.
Follow-up to
ecb44b8e4ad52.
Father Chrysostomos [Sat, 19 Mar 2016 20:30:39 +0000 (13:30 -0700)]
Sort perldiag
It’s nice that people leave things for me to clean up! :-)
Karl Williamson [Sat, 19 Mar 2016 15:10:41 +0000 (09:10 -0600)]
regcomp.c, perl.c: Use 'VOL' not 'volatile'
I presume that VOL is so perl can at least compile on compilers that lack
'volatile'. (It was added by Larry in 1991 by
352d5a3ab; there were
probably a lot more compilers like that back then.) But VOL is used
consistently in the core, with these being the two exceptions.
H.Merijn Brand [Sat, 19 Mar 2016 14:58:17 +0000 (15:58 +0100)]
regen
H.Merijn Brand [Sat, 19 Mar 2016 14:01:58 +0000 (15:01 +0100)]
Add Configure probes for newlocale, freelocale, and uselocale
John Peacock [Sat, 19 Mar 2016 01:43:52 +0000 (21:43 -0400)]
Update version to 0.9916
Steve Hay [Sat, 19 Mar 2016 01:28:40 +0000 (01:28 +0000)]
Upgrade Win32API::File from version 0.1202 to 0.1203
Fixes perl #125303.
(Includes a regen for the moved Myconst2perl.pm.)
David Mitchell [Sat, 19 Mar 2016 00:01:51 +0000 (00:01 +0000)]
[MERGE] dtrace linking fixups
David Mitchell [Tue, 8 Mar 2016 11:31:22 +0000 (11:31 +0000)]
fix up dtrace compile/link for Solaris
[perl #127543]
On some platforms, the use of dtrace / SystemTap requires generating an
extra .o file from a list of .o files before linking. For example,
cc -o foo a.o b.o c.o
has to be replaced with
dtrace -G -s dtrace.d -o dtrace.o a.o b.o c.o # creates dtrace.o
cc -o foo dtrace.o a.o b.o c.o
On Solaris in particular, "dtrace -G" modifies the *.o files that it's
passed as well as creating dtrace.o, and all the new/updated .o files need
to be linked together at the same time from the same single use of "dtrace
-G".
This complicates matters when building all of miniperl, libperl and perl,
and the reason for this commit is that once a dtrace probe made its way
into an inline static function via the recent context work, Solaris
stopped building under -Dusedtrace -Duseshrplib.
The fix that seems to work under both Solaris and Linux, for all
4 permutations of -Dusedtrace +/- -Duseshrplib, is (approx):
# compile all the *.o's, then:
# build miniperl:
$ dtrace ... -o dtrace_mini.o a.o b.o c.o perlminimain.o
$ cc -o miniperl dtrace_mini.o a.o b.o c.o perlminimain.o
# build libperl.a or .so:
$ dtrace ... -o dtrace_perllib.o a.o b.o c.o
$ ar rcu libperl.a dtrace_perllib.o a.o b.o c.o
# build perl:
$ dtrace ... -o dtrace_main.o perlmain.o
$ cc -o perl dtrace_main.o -lperl
This is has only recently arisen because we switched from PUSHSUB()
etc macros to S_cx_pushsub() etc inline functions, which contain
probes. Since the inline static functions, and hence the probes, are now
included in every source file, and since Solaris isn't smart enough to
remove inline static fns that aren't used in a particular compilation
unit, the probes end up getting used in every source file (at least where
PERL_CORE is true).
It also required fixing up XS-APItest's Makefile.PL, since one object
file is compiled using PERL_CORE.
David Mitchell [Mon, 7 Mar 2016 11:55:11 +0000 (11:55 +0000)]
Makefile.SH: rationalise object list variables
There are a number of variables in the generated Makefile, such as
'obj' and 'minindt_obj', that enumerate various subsets of the object
files that need to be compiled and linked.
Rename and reorganise these vars slightly, to make the next commit
simpler. In particular it now splits the object files in into 3 sets:
common (av.o etc), those used just by miniperl (opmini.o etc)
and those used just by perl (op.o etc).
Should be no functional changes.
The changes to os2/Makefile.SHs have been done blind. Does anyone still
use OS2?
David Mitchell [Mon, 15 Feb 2016 13:48:24 +0000 (13:48 +0000)]
rename and function-ise dtrace macros
This commit:
1. Renames the various dtrace probe macros into a consistent and
self-documenting pattern, e.g.
ENTRY_PROBE => PERL_DTRACE_PROBE_ENTRY
RETURN_PROBE => PERL_DTRACE_PROBE_RETURN
Since they're supposed to be defined only under PERL_CORE, this shouldn't
break anything that's not being naughty.
2. Implement the main body of these macros using a real function.
They were formerly defined along the lines of
if (PERL_SUB_ENTRY_ENABLED())
PERL_SUB_ENTRY(...);
The PERL_SUB_ENTRY() part is a macro generated by the dtrace system, which
for example on linux expands to a large bunch of assembly directives.
Replace the direct macro with a function wrapper, e.g.
if (PERL_SUB_ENTRY_ENABLED())
Perl_dtrace_probe_call(aTHX_ cv, TRUE);
This reduces to once the number of times the macro is expanded.
The new functions also take simpler args and then process the values they
need using intermediate temporary vars to avoid huge macro expansions.
For example
ENTRY_PROBE(CvNAMED(cv)
? HEK_KEY(CvNAME_HEK(cv))
: GvENAME(CvGV(cv)),
CopFILE((const COP *)CvSTART(cv)),
CopLINE((const COP *)CvSTART(cv)),
CopSTASHPV((const COP *)CvSTART(cv)));
is now
PERL_DTRACE_PROBE_ENTRY(cv);
This reduces the executable size by 1K on -O2 -Dusedtrace builds,
and by 45K on -DDEBUGGING -Dusedtrace builds.
David Mitchell [Fri, 18 Mar 2016 23:29:44 +0000 (23:29 +0000)]
Configure: silence 'dtrace -G' probe
When built with -Dusedtrace, Configure checks to see whether 'dtrace -G'
is supported, by running it. If it fails, it may spew error messages
to stderr, so use >/dev/null 2>&1.
David Mitchell [Fri, 18 Mar 2016 22:36:40 +0000 (22:36 +0000)]
regex sets: fix Solaris optimiser bug (2nd attempt)
[perl #127455]
My first fix for this, (v5.23.7-586-gd9cb841) didn't actually fix it.
The diagnosis was correct, but somewhere during fixing and testing I went
wrong, and the optimiser bug was still being triggered without me spotting
it.
The new approach, based on a suggestion by Tony C, is simply to
declare the errant local var 'fence' to be volatile. This stops the
compiler from optimising away its value.
Karl Williamson [Mon, 7 Mar 2016 22:37:11 +0000 (15:37 -0700)]
regcomp.c: Avoid a memory leak
I spotted this in code reading. The chances of it happening are quite
small. It could happen under tainting with a user-defined \p{}
property, and /i matching.
Karl Williamson [Mon, 7 Mar 2016 17:49:17 +0000 (10:49 -0700)]
regcomp.c: Comment enhancements
The text of one of these comments was furnished to me by Yves Orton some
time ago.
Karl Williamson [Fri, 11 Mar 2016 23:22:49 +0000 (16:22 -0700)]
Make instr() a macro
... thus avoiding a function call overhead
Karl Williamson [Fri, 18 Mar 2016 02:57:48 +0000 (20:57 -0600)]
perlapi: Further clarification for term "Latin1"
This is a follow on for
14d32fa99f736009ef63a8b17d164cd8f6e967d9
Karl Williamson [Fri, 11 Mar 2016 03:34:17 +0000 (20:34 -0700)]
handy.h: Add synonyms for macros
I realized that we have inconsistent naming conventions for the
isFOO_uni() macros, like isALPHA_uni(). The "_uni" suffix elsewhere
refers to official Unicode code point numbers; whereas, for these macros
it refers to the native code point numbers for code points below 256.
And elsewhere, there are in some cases a _uni() and a uvchr() which mean
different things.
This commit adds '_uvchr' suffix equivalents for these macros, while
dropping mention in the documentation of the '_uni' forms. Thus code
following the new paradigm will not be confusing, while existing code
will function unchanged.
Karl Williamson [Thu, 17 Mar 2016 22:45:47 +0000 (16:45 -0600)]
Carp: Fix .t failure to compile in v5.6
This doesn't guarantee the tests pass in that release; just that it will
actually get to testing.
Leon Timmermans [Fri, 18 Mar 2016 00:44:41 +0000 (01:44 +0100)]
Various fixups for version.pm 0.9914
John Peacock [Thu, 18 Feb 2016 14:23:08 +0000 (08:23 -0600)]
Remove no longer valid tests
John Peacock [Wed, 17 Feb 2016 03:34:52 +0000 (21:34 -0600)]
Import version.pm 0.9914 from CPAN
Ricardo Signes [Thu, 17 Mar 2016 23:49:28 +0000 (19:49 -0400)]
perldelta: document exception thrown when -i output close fails
Tony Cook [Thu, 5 Nov 2015 04:06:00 +0000 (15:06 +1100)]
croak on failure to close an in-place edit output file
Tony Cook [Wed, 4 Nov 2015 05:52:37 +0000 (16:52 +1100)]
report an error and fail if we can't flush stdout
Steve Hay [Thu, 17 Mar 2016 23:28:29 +0000 (23:28 +0000)]
Karl Williamson [Thu, 17 Mar 2016 22:11:04 +0000 (16:11 -0600)]
locale.c: Add comment
Karl Williamson [Tue, 15 Mar 2016 02:49:00 +0000 (20:49 -0600)]
regen/mk_invlists.pl: Revamp so works on earlier Unicodes
The code that generates the tables for the \b{foo} handling (in
regexec.c) did not correctly work when compiled on an earlier Unicode.
This fixes things up to do that, consolidating some common code into a
common function and making the generated hdr file look nice, with the
tables taking fewer columns of screen space
Karl Williamson [Thu, 17 Mar 2016 21:25:09 +0000 (15:25 -0600)]
mktables: Use correct structure to look up data
There are two types of tables in mktables: Map tables map code points
to the values a property have for those code points; and match tables
which are booleans, give "does a code point match a given property
value?". There are different data structures to encapsulate each. This
code was using the wrong structure to look something up. Usually this
failed, and a fall-back value was used instead. When compiling an early
Unicode release, I discovered that there could be a conflict.
Karl Williamson [Thu, 17 Mar 2016 20:27:34 +0000 (14:27 -0600)]
mktables: Fix bug with early Unicode versions
An array had 2 optional elements at the end. I got confused about
handling them. This change first deals with the final one, pops it and
saves it separately if found. Then only one optional element needs to
be dealt with in the course of the code.
This only gets executed for very early Unicode versions
Karl Williamson [Tue, 15 Mar 2016 22:19:30 +0000 (16:19 -0600)]
mktables: Unicode 1.5 only had 2**16 code points
Therefore, we shouldn't add any above that.
Abigail [Thu, 17 Mar 2016 11:30:32 +0000 (12:30 +0100)]
The public_html directory on dromedary is working again.
So, I removed the references that it wasn't working in December 2015.
Shlomi Fish [Thu, 10 Mar 2016 19:32:41 +0000 (21:32 +0200)]
Add contributing info to Carp.
It lacked a link to the VCS repository so I had to ask rjbs about it on
the #p5p IRC channel. And one should always fix a problem twice:
* http://www.joelonsoftware.com/articles/customerservice.html .
David Mitchell [Mon, 14 Mar 2016 19:11:08 +0000 (19:11 +0000)]
harmonize S_dump_exec_pos()'s last arg type
embed.fnc declared it as "U32 depth", while it was defined as "const U32
depth".
Tony Cook [Tue, 15 Mar 2016 00:26:26 +0000 (11:26 +1100)]
avoid generating an empty statement outside a function on non-clang
On non-clang compilers, the code:
CLANG_DIAG_RESTORE;
outside a function generated a simple empty statement (or empty
declaration), which is invalid syntax outside a function in C,
causing a warning from the solaris studio compiler.
Yves Orton [Mon, 14 Mar 2016 22:30:02 +0000 (23:30 +0100)]
fix "bad match" issue reported in perl #127705
In
24be310237a0f8f19cfdb71de1b068b4ce9572a0 I reworked how
we stored the close_paren info in the regexp match state
structure. Unfortunately I missed a subtle aspect of the
logic which meant that in certain cases we were relying
on close_paren being true to avoid comparing it against
a false ARG value for things like CURLYX, which meant that
sometimes we would exit an stack frame prematurely. This
patch fixes that logic and makes it more clear (via macros)
what is going on.
Yves Orton [Mon, 14 Mar 2016 19:03:22 +0000 (20:03 +0100)]
fix perl #127705, incorrect restoration of state during EVAL/GOSUB
We were not restoring the cur_curlyx property properly during our funky
stack traversal when we really need to. This was a longstanding bug in this
code which my patches appear to have "tickled", although I am not sure why.
Yves Orton [Mon, 14 Mar 2016 18:58:33 +0000 (19:58 +0100)]
add consistency with other union members
In most cases the curlyx member is the first thing after the yes state
member, but eval was reversed. While debugging perl #127705 I switched
them to see what would happen, which changed the bug, and ultimately
revealed the cause of the problem. So I am going to leave them in the
"consistent" order.
Yves Orton [Mon, 14 Mar 2016 17:10:19 +0000 (18:10 +0100)]
fixup broken diagnostic
we shouldnt show this in normal re debug mode, just when debugging the stack,
also the macro wasnt using the STR argument like it should
Andy Broad [Mon, 14 Mar 2016 21:43:30 +0000 (17:43 -0400)]
amigaos4: avoid PerlIO_findFILE() in popen/plcose
Merges amigaos_popen / amigaos_pclose with the amigaos specific
version of the Perl_my_popen / Perl_my_pclose functions and uses PerlIO
directly for the perl facing end of the PIPE:s thus avoid the issues
of PerlIO_findFILE() completely.
Also fixes a couple of warnings.
David Mitchell [Mon, 14 Mar 2016 16:49:05 +0000 (16:49 +0000)]
Configure: silence some try.c warnings
On one of the try.c compilations, redirect stderr to /dev/null, since
the code can legitimately warn without there being a problem.
The try.c in question is probing for what symbols the compiler supports.
The clang extensions __has_include and __has_include_next are designed
only to be used in .h files, so they warn if used from try.c
David Mitchell [Mon, 14 Mar 2016 15:41:46 +0000 (15:41 +0000)]
s/ar rcu/ar rc/ during linking
The are a few places in Makefile.SH which do (approximately):
rm $libfile
ar rcu $libfile *.o
The 'u' in 'rcu' seems redundant since the old lib file is always deleted
just before being recreated; and more to the point, it generates warnings
on recent Linux builds:
/bin/ar: `u' modifier ignored since `D' is the default (see `U')
This is because the 'u' modifier updates the archive, i.e. only replaces
the objects which are newer in an existing archive. On my Linux system,
ar by default operates in 'deterministic' mode, which means that it
doesn't add timestamps etc (so that repeated builds will give identical
binaries). In this mode 'u' can't work, hence the warning.
So this commit just removes the 'u' flag.
David Mitchell [Mon, 14 Mar 2016 15:24:35 +0000 (15:24 +0000)]
HOPBACKc(pos, off): silence compiler warning
This macro does (amongst other things)
reghopmaybe3(..., -off, ...)
When passed an off that is unsigned (e.g. prog->gofs, which is STRLEN),
The MSWin32 smoker complains:
..\regexec.c(2939) : warning C4146: unary minus operator applied to
unsigned type, result still unsigned
Chane the arg to (SSize_t)0-off and hope that integer conversion rules
make the expression legal.
Tony Cook [Mon, 14 Mar 2016 01:56:32 +0000 (12:56 +1100)]
only call Perl_re_printf() under -DDEBUGGING
This caused link failures on Win32 with MSVC.
Jarkko Hietaniemi [Mon, 14 Mar 2016 00:20:23 +0000 (20:20 -0400)]
Time-HiRes: recent changes
Jarkko Hietaniemi [Mon, 14 Mar 2016 00:05:15 +0000 (20:05 -0400)]
Time-HiRes: version bump
Jarkko Hietaniemi [Mon, 14 Mar 2016 00:01:17 +0000 (20:01 -0400)]
Time-HiRes: the mutex needs init
Jarkko Hietaniemi [Sun, 13 Mar 2016 23:55:56 +0000 (19:55 -0400)]
Time-HiRes: also hrt_ualarm_itimer() is unused
Jarkko Hietaniemi [Sun, 13 Mar 2016 23:53:17 +0000 (19:53 -0400)]
Time-HiRes: MUTEX_LOCK, not PERL_MUTEX_LOCK
Ricardo Signes [Sun, 13 Mar 2016 22:47:18 +0000 (18:47 -0400)]
autouse: update tests to match new v1.11 CPAN release
Jarkko Hietaniemi [Sun, 13 Mar 2016 21:26:06 +0000 (17:26 -0400)]
Time-HiRes: aim for CPAN release of 1.9731 today
Yves Orton [Sun, 13 Mar 2016 17:43:31 +0000 (18:43 +0100)]
dont call re_printf() with %*s if you arent going to pass it in
Yves Orton [Sun, 13 Mar 2016 17:12:29 +0000 (18:12 +0100)]
once more for the win
Apparently I have to pass in the context explicitly for this type of
sub, since we cant do a proper macro wrap for subs using ... (va_args/va_list)
so we have to do everything explicitly. Hopefully this fixes the smoke reports
Karl Williamson [Sun, 13 Mar 2016 16:08:36 +0000 (10:08 -0600)]
lib/warnings.t: Skip an ASCII-centric test on EBCDIC
This test is for a specific UTF-8 malformation, but UTF-EBCDIC is
different, so just skip it there.
Yves Orton [Sun, 13 Mar 2016 15:59:32 +0000 (16:59 +0100)]
fixup definitions and usage of new re debugging subs
this should fix the smoke failures on threaded builds,
also it renames re_indentfo which was a terrible name in the first
place, and now what i have had to strip the Perl_prefixes from
these subs with a perl -i -pe, I took the opportunity to rename
it to re_exec_indent, which self documents much better.
Yves Orton [Sun, 13 Mar 2016 10:15:30 +0000 (11:15 +0100)]
[perl #126182] rework pattern GOSUB infinite recursion detection
In
ba6840fbf2fdde3e7f1bda1a26f46c901f36d5ec I tried to fix
[perl #126182] which is a bug about us failing to detect regex
left recursion in some cases.
There were two problems with that patch, both pointed out by
Zefram. The first is that I made left recursion a match fail,
instead of throwing an exception, this makes left-recursion match
sometimes, but at least sometimes in what is arguably the wrong
way. Zefram was able to convince me that dying is better than
matching incorrectly.
The second patch was that it ignored some subtleties in how
the backtracking stack works, which affected how the patch
restored the recurse_locinput[] data which is used to track
what position a GOSUB was entered from. This meant that in
various cases it would not be restored correctly, and we would
still infinite recurse. I believe that it works correctly now.
Thanks for Zefram for the feedback on the original patch.
Yves Orton [Fri, 11 Mar 2016 09:36:25 +0000 (10:36 +0100)]
Rework diagnostics in the regex engine
This introduces three new subs:
Perl_re_printf() which is a wrapper for
PerlIO_printf( Perl_debug_log, ... ),
which cuts down on clutter in the code. Arguably this could be moved
to util.c and renamed something like PerlIO_debugf() and then we could
declutter all the statements that write to the Perl_debug_log
filehandle. But that is a bit too ambituous for me right now, so
I leave this as a regex engine only sub for now.
Perl_re_indentf() which is a wrapper for PerlIO_re_printf(),
which adds an indent argument and automatically indents the
line appropriately, and is used in regcomp.c for trace diagnostics
during compilation.
Perl_re_indentfo() which is similar to Perl_re_indentf() but
is used in regexec.c which adds a specific prefix to each indented
line to account for the fact that during execution we normally have
string position information on the left.
The end result of this patch is that a lot of clutter in the debugging
statements in the regex engine is reduced, exposing what is actually
going on. It should also now be easier to add new diagnostics which
"do the right thing".
Over time the debugging trace output in regexec has become
very cluttered and confusing. This patch cleans much of it up,
if something happens at a given recursion depth it is output
at the right depth, etc, and formats have been changed to not have
leading spaces so you can actually see the indentation properly.
Jarkko Hietaniemi [Sun, 13 Mar 2016 00:57:24 +0000 (19:57 -0500)]
Time-HiRes: record recent changes
Jarkko Hietaniemi [Sun, 13 Mar 2016 00:17:20 +0000 (19:17 -0500)]
Time-HiRes: not_used is unused