summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [perl #122287] probe in Configure whether dtrace builds an objectTony Cook2016-03-093-4/+39
| | | | | | | | | | | | | | | | 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.
* fix a skip count in cpan/IPC-SysV/t/ipcsysv.tTony Cook2016-03-097-6/+19
| | | | reported upstream as https://rt.cpan.org/Ticket/Display.html?id=112827
* [perl #127533] only test semctl() if we have everything needed to use itTony Cook2016-03-091-0/+2
| | | | | | | | | | | 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.
* perlvar: Cross reference other podsKarl Williamson2016-03-071-1/+3
| | | | | Suggested by "kes" in http://nntp.perl.org/group/perl.perl5.porters/234447
* Convert to use av_tindex_nomg()Karl Williamson2016-03-073-23/+26
| | | | | | 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.
* Add av_tindex_nomg()Karl Williamson2016-03-071-0/+2
| | | | | | | 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.
* regcomp.c: Silence some compiler warningsKarl Williamson2016-03-071-2/+2
| | | | Some compilers wrongly think these variables can be used uninitialized.
* perlguts: Slight clarificationKarl Williamson2016-03-071-1/+1
|
* perlapi: Slight clarificationKarl Williamson2016-03-071-2/+2
| | | | | | | | | 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.
* pod/perldelta: Add some Selected Bug FixesKarl Williamson2016-03-071-0/+11
|
* regcomp.c: Remove redundant assignmentKarl Williamson2016-03-071-1/+0
| | | | | | | 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
* perlre: Nits, clarificationsKarl Williamson2016-03-071-4/+5
|
* S_study_chunk(): silence compiler warningDavid Mitchell2016-03-071-2/+2
|
* Mention bytes::length modern workaround re 01e331e5Jarkko Hietaniemi2016-03-071-5/+12
| | | | Also add an emboldening and parabreak to underline the discouragement.
* Make open failures little less cryptic.Jarkko Hietaniemi2016-03-071-2/+2
|
* add comment explaining a subtletyYves Orton2016-03-071-0/+3
| | | | | | | 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.
* Add test for [perl #126405]Karl Williamson2016-03-061-0/+1
| | | | | | | | 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.
* Document the previous commit in Carp's Changes.Shlomi Fish2016-03-071-0/+4
|
* Fix RTCPAN#107225 : longmess returns 1 on ref.Shlomi Fish2016-03-073-4/+24
| | | | | | | 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.
* avoid reading/writing beyond the end of RExC_(open|close)_parensTony Cook2016-03-071-1/+1
| | | | | | | | | | | | | | | | 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.
* perldelta for 99fff99d79, af4291a8594Tony Cook2016-03-071-0/+5
|
* make building without memcpy work (RT #127619)Lukas Mai2016-03-075-22/+19
|
* util.c: make my_mem*/my_b* prototypes more like the originalsLukas Mai2016-03-073-37/+31
|
* Update bytes.pm docKarl Williamson2016-03-061-34/+53
| | | | | The one legitimate use of this pragma is for debugging. This changes to say so, and other minor changes.
* regcomp.c: fix Perl #126405, segfault regexYves Orton2016-03-061-4/+4
| | | | | | | | | | | 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.
* regcomp.c: improve diagnostics for TRIE constructionYves Orton2016-03-061-10/+16
|
* fix Perl #126182, out of memory due to infinite pattern recursionYves Orton2016-03-065-18/+75
| | | | | | | | | | | | | | | | | | | 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".
* Unify GOSTART and GOSUBYves Orton2016-03-067-117/+140
| | | | | | | | | | | | | | | | 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.
* rename RExC_opend RExC_end_op for clarityYves Orton2016-03-061-6/+6
|
* first step cleaning up regexp recursion "return" logicYves Orton2016-03-063-32/+52
| | | | | | | | | | | | | | | | | | | | | | 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 ) )
* perlebcdic: Update for 5.24Karl Williamson2016-03-051-30/+10
| | | | | Fix some typos, and most importantly remove the now-fixed items from the BUGS section
* Time-HiRes: record latest changesJarkko Hietaniemi2016-03-051-0/+5
| | | | | | | | | 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.
* PathTools: import Changes file from CPANRicardo Signes2016-03-052-0/+928
|
* amigaos4: execvp() and popen() enhancementsAndy Broad2016-03-051-14/+50
| | | | | | | | | | | | | | | | | | 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).
* PATCH: [perl #127262] assertion fail on malformed UTF8Karl Williamson2016-03-042-2/+20
| | | | Add a guard against malformed UTF-8.
* Time-HiRes: refactor also nanosleep initJarkko Hietaniemi2016-03-041-8/+12
|
* Time-HiRes: avoid going negative on struct timespecJarkko Hietaniemi2016-03-041-5/+15
|
* Time-HiRes: refactor common timespec subtraction codeJarkko Hietaniemi2016-03-041-14/+19
|
* Time-HiRes: for nanosleeps, zero is successJarkko Hietaniemi2016-03-041-2/+2
| | | | Testing for zero makes it slightly less odd-looking than bang.
* Time-HiRes: use NV_1E6 and NV_1E9 consistentlyJarkko Hietaniemi2016-03-041-17/+17
|
* Time-HiRes: initialize the unslept timespecJarkko Hietaniemi2016-03-041-0/+4
| | | | Found by clang scan-build.
* threads.xs: create new static fn S_jmpenv_run()David Mitchell2016-03-042-50/+51
| | | | | | | | | | 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’
* rpeep(): eliminate compiler warningDavid Mitchell2016-03-041-2/+6
| | | | | | | | | | 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.
* Simplify _MEM_WRAP_NEEDS_RUNTIME_CHECK()David Mitchell2016-03-041-2/+1
| | | | | And at the same time hopefully avoid some false-positive compiler warnings on HP-UX
* PATCH: [perl #126141]: qr/]]]]][\\/ fails to raise errorKarl Williamson2016-03-042-0/+12
| | | | | This was due to the trailing \ trying to look at the next character without verifying that one actually existed.
* regcomp.c: Fix a memory leakKarl Williamson2016-03-041-3/+2
| | | | | | This revises 5751998882d1db1c0f62a32a0b16e58176928a35 so that it works if a called function fails to return (it was failing if there was illegal tainting going on).
* locale.c: Avoid a leakKarl Williamson2016-03-041-3/+7
| | | | | This reorders things to allow a free to be done. The cause was spotted by Tony Cook.
* POSIX.xs: Avoid a leak in setlocale()Karl Williamson2016-03-042-3/+2
| | | | Tony Cook suggested this fix.
* TODO or skip certain failing locale tests on cygwinKarl Williamson2016-03-032-1/+15
| | | | | | | 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.
* regcomp.c: Revise, add comments, white-space changesKarl Williamson2016-03-031-9/+15
|