| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When building the object file, newer versions of dtrace (on Illumos
based systems at least) require an input object file that uses
at least one of the probes defined in the .d file.
The test in Makefile.SH didn't provide that definition so the test
would fail, and not build an object file, and fail to link later on,
on systems that *do* need the object file.
Moved the probe to Configure (where it probably belongs) and supplied
an object file that uses a probe.
Tested successfully on OmniOS (with the new dtrace), Solaris 11,
and darwin.
|
|
|
|
| |
reported upstream as https://rt.cpan.org/Ticket/Display.html?id=112827
|
|
|
|
|
|
|
|
|
|
|
| |
In a FreeBSD jail, the semctl() entry point might exist, but can be
disabled by policy, when it is disabled, the Configure code that
tests for the different structures that can be supplied to semctl()
fail.
The code that implements semctl() for perl treats semctl() as
unimplemented if neither structure is available, so avoid testing
semctl() if the structures couldn't be detected.
|
|
|
|
|
| |
Suggested by "kes" in
http://nntp.perl.org/group/perl.perl5.porters/234447
|
|
|
|
|
|
| |
I looked at the code I'm familiar with, and converted the av_tindex
calls on arrays I was confident don't have magic to av_tindex_nomg().
This saves a little work each time.
|
|
|
|
|
|
|
| |
This is like av_tindex, but doesn't handle magic. I'm not documenting
it for now, in case it turns out this was not a good idea.
Inspired from an observation by Tony Cook.
|
|
|
|
| |
Some compilers wrongly think these variables can be used uninitialized.
|
| |
|
|
|
|
|
|
|
|
|
| |
This changes to use 'transfer' to make clear that the reference count is
unchanged. Some think that the previous wording 'take' is good as-is;
some agree with me. Daniel Dragan has pointed out that 5 years ago I
changed this line, while retaining 'take'. Given that 'transfer' is
unambiguous to all, while 'take' is ambiguous to some, I'm making the
change.
|
| |
|
|
|
|
|
|
|
| |
The assignment removed here is followed immediately by a goto, and the
target of the goto repeats the assignment, so this one is redundant.
Spotted by Tony Cook
|
| |
|
| |
|
|
|
|
| |
Also add an emboldening and parabreak to underline the discouragement.
|
| |
|
|
|
|
|
|
|
| |
Tony caught a bug I made in d5a00e4af6b155495be31a35728b8fef8e671ebe and fixed
it in 2dc40b2d7c20b0d31c4343ac23cda9799f234a65. This comment explains
the subtlety that lead to the bug: the compilation state var
RExC_npar is +1 as compared to the equivalent rex->nparens.
|
|
|
|
|
|
|
|
| |
Commit b297756b5d78ef23f3ebf878d0342947ece424aa did not add a test, but
such a test is possible, and is added here. The problem only showed up
on some configurations, but nonetheless, it did show up, and so will
fail the added test on those configurations, which turn out to be
regularly smoked.
|
| |
|
|
|
|
|
|
|
| |
See: https://rt.cpan.org/Public/Bug/Display.html?id=107225 . Also
discovered as a bug in perl -d by me (= Shlomi Fish) and reported
after the original report. longmess() returns "1" when called in scalar
context if passed a reference.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Partly reverts d5a00e4af, which added this change:
- for ( paren=0 ; paren < RExC_npar ; paren++ ) {
+ for ( paren=0 ; paren <= RExC_npar ; paren++ ) {
but RExC_(open|close)_parens are both allocated with RExC_npar entries,
making this a read/write buffer overflow.
This caused crashes during the build with GCC on Win32, and was
detectable with valgrind and -fsanitize=address on Linux.
With the change, passes all tests with -fsanitize=address -DDEBUGGING
on Linux and finishes the build with GCC on Win32.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The one legitimate use of this pragma is for debugging. This changes to
say so, and other minor changes.
|
|
|
|
|
|
|
|
|
|
|
| |
There was a flaw in how we scan regexes for triable sequences.
It is possible that the end of a branch points *past* the tail of
the branch sequences, which was resulting in us constructing
tries when we shouldn't. This patch changes equivalency tests for
an inequality test, which prevents this problem.
I am not sure how to test for this problem as it doesn't actually
segfault for me, but I can see the illegal read in valgrind.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The way we tracked if pattern recursion was infinite did not work
properly. A pattern like
"a"=~/(.(?2))((?<=(?=(?1)).))/
would loop forever, slowly eat up all available ram as it added
pattern recursion stack frames.
This patch changes the rules for recursion so that recursively
entering a given pattern "subroutine" twice from the same position
fails the match. This means that where previously we might have
seen fatal exception we will now simply fail. This means that
"aaabbb"=~/a(?R)?b/
succeeds with $& equal to "aaabbb".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GOSTART is a special case of GOSUB, we can remove a lot of offset twiddling,
and other special casing by unifying them, at pretty much no cost.
GOSUB has 2 arguments, ARG() and ARG2L(), which are interpreted as
a U32 and an I32 respectively. ARG() holds the "parno" we will recurse
into. ARG2L() holds a signed offset to the relevant start node for the
recursion.
Prior to this patch the argument to GOSUB would always be >=, and unlike
other parts of our logic we would not use 0 to represent "start/end" of
pattern, as GOSTART would be used for "recurse to beginning of pattern",
after this patch we use 0 to represent "start/end", and a lot of
complexity "goes away" along with GOSTART regops.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we do a GOSUB/GOSTART we need to know where the recursion
"returns" to the previous position in the pattern. Currently
this is done by comparing cur_eval->u.eval.close_paren to the
the argument of CLOSE parens, and within END blocks (for GOSTART).
However, there is a problem. The state machinery for GOSUB/GOSTART
is shared with EVAL ( implementing /(??{ ... })/ ), which also sets
cur_eval->u.eval.close_paren to 0. This for instance breaks /(?(R)YES|NO)/
by making it return true within a /(??{ ... })/ when arguably it
shouldn't. It also is confusing.
So we change the meaning of close_paren so that 0 means "from EVAL",
and that otherwise the value is "+1", so 1 means GOSTART (trigger for
END), and 2 means "CLOSE1", etc. In order to make this transparent
this patch adds the EVAL_CLOSE_PAREN_IS( cur_eval, EXPR ) macro which
does the right thing:
( cur_eval && cur_eval->u.eval.close_paren &&
( ( cur_eval->u.eval.close_paren - 1 ) == EXPR ) )
|
|
|
|
|
| |
Fix some typos, and most importantly remove the now-fixed items from the
BUGS section
|
|
|
|
|
|
|
|
|
| |
Assuming that at some point a CPAN release of the new! shinier!
Time-HiRes might be a good thing.
The version bump to 1.9731 was done already in 1625f1d3. Leave the
day of month open in case more changes come in, no need to constantly
bump the version.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
myexecvp()
Replaces alloca() in execvp() with IExec->AllocVecTags() with the memory
type explicitly set to MEMF_SHARED (alloca allocating on the stack which is
MEMF_PRIVATE and in theory at least you can't share that with the sub
process (in practice this isn't enforced yet, too much old software would
break, but one of these days)).
amigaos_popen()
Alters file opening order to ensure that the write end of the pipe is always
opened first.
Now attempts to pass Input() out Output() (stdin or stout) to the non-pipe
file handles rather than NIL: reverting to NIL: if the above can't be
DupFileHandled() (say if they were redirected to a file opened with an
exclusive lock).
|
|
|
|
| |
Add a guard against malformed UTF-8.
|
| |
|
| |
|
| |
|
|
|
|
| |
Testing for zero makes it slightly less odd-looking than bang.
|
| |
|
|
|
|
| |
Found by clang scan-build.
|
|
|
|
|
|
|
|
|
|
| |
S_jmpenv_run() replaces 3 similar pieces of code that do
JMPENV_PUSH(); ... stuff ...; JMPENV_POP().
As a side effect of this commit, it gets rid of this annoying warning
under g++:
warning: variable ‘my_perl’ might be clobbered by ‘longjmp’
|
|
|
|
|
|
|
|
|
|
| |
op.c: In function ‘Perl_rpeep’:
op.c:13692:37: warning: comparison is always false due to limited
range of data type [-Wtype-limits]
? base : 0) >
^
replace the '0' with something that still always fails to match but
hopefully won't warn.
|
|
|
|
|
| |
And at the same time hopefully avoid some false-positive compiler warnings
on HP-UX
|
|
|
|
|
| |
This was due to the trailing \ trying to look at the next character
without verifying that one actually existed.
|
|
|
|
|
|
| |
This revises 5751998882d1db1c0f62a32a0b16e58176928a35 so that it works
if a called function fails to return (it was failing if there was
illegal tainting going on).
|
|
|
|
|
| |
This reorders things to allow a free to be done. The cause was spotted
by Tony Cook.
|
|
|
|
| |
Tony Cook suggested this fix.
|
|
|
|
|
|
|
| |
This is a known problem which cygwin has fixed in 2.5
Tony Cook tested this and found and fixed several bugs in it before this
final version was made.
|
| |
|