summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* regen/regcharclass.pl: Need to rebuild when source files changeKarl Williamson2015-03-192-2/+65
| | | | | Like regen/mk_invlists.pl, if any of various Unicode-related files change, we can't rely on the generated file remaining unchanged.
* regen/mk_invlists.pl depends on mktablesKarl Williamson2015-03-192-2/+3
| | | | If mktables changes, the input data for this may also change.
* regen/mk_invlists.pl: Don't quit so easilyKarl Williamson2015-03-192-7/+13
| | | | | | | | Like the previous commit, this script may be called before mktables.lst exists, and we can't generate mktables.lst without this script executing to completion. The missing file is only used to determine if something has changed that we would need to recompile for so this script can run faster next time it is called.
* regen/regen_lib.pl: Don't die on missing digestKarl Williamson2015-03-191-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | regen_lib now has the capability of calculating a digest for various files passed to it, and saving those values in the generated output file. The passed in files are supposed to be the sources of the generated file, so that on future regen runs, if no digest value has changed, there should be no need to actually do the (potentially slow) regen. When bootstrapping up a perl, not everything may have been built before a regen is attempted. This was dieing under those conditions, preventing the build from happening. Thus we come to a dead-end. This commit causes a random digest to be generated for a source file that doesn't (yet) exist, instead of dieing. That means that the build can continue, and the source should be generated at some point in it. The random digest is not going to match the real one, so the next time the regen happens, it will signal that things need to be rebuilt, and then the actual digest of the source will be calculated and stored. Having the fake digest be a random number makes sure that, should the missing file remain missing, that the regen will continue to rebuild things each time. So, if someone carelessly commits the result without realizing there is an empty source, the Porting tests will fail, drawing attention to the problem.
* Upgrade parent from version 0.228 to 0.232Steve Hay2015-03-194-3/+19
|
* lib/perl5db.pl: Fix pod typoKarl Williamson2015-03-191-1/+1
|
* lib/perl5db.pl: Generalize for EBCDICKarl Williamson2015-03-191-2/+4
|
* Create single fcn for dup'd /lib codeKarl Williamson2015-03-197-12/+108
| | | | | | | | | | | | | | | | | | | | | Several /lib .pm's have the same code which is complicated enough to warrant being placed in a shared function. This commit creates a .pm to be used by these .pm's. This implements the perhaps archaic 'Meta' notation wherein characters above 0x7f are displayed as M- plus the ASCII-range character derived by looking at only the lower 7 bits of the upper range one. There are problems with this, in that a literal control character can be in the string, whereas it is trying to get rid of control characters. But I left it to work as-is, just centralizing the code. On EBCDIC platforms this notation makes no sense because the bit patterns are all mixed up about having the upper bit set. So this commit fixes things on these platforms, so these are changed to \x{...}. No literal control characters are emitted. Another potential problem is that characters above 0xFF are passed through, unchanged. But again, I let the existing behavior stand.
* Change name of mro.cKarl Williamson2015-03-1911-27/+30
| | | | | | | | | This is to prevent a conflict showing up on z/OS (os390) because this file's name is the same as one in /ext, and there are functions cross-referenced between them, and the loader on that platform can't deal with this. See http://nntp.perl.org/group/perl.perl5.porters/226612
* dbmopen() with a third argument of undef can create files on disk.Nicholas Clark2015-03-191-1/+6
| | | | Hence we need to ensure that they are cleaned up.
* Fix rendering of this code snippet in 'perldoc -f chomp'Karen Etheridge2015-03-191-1/+1
| | | | | In text, formerly rendered as: ("$/ = """) Now rendered as: ("$/ = ''") which is a tad less confusing
* t/re/pat_re_eval.t: Skip encoding tests on EBCDICKarl Williamson2015-03-191-1/+4
| | | | | These require changes to Encode which are not planned to be put in v5.22
* t/op/pack.t: Generalize for EBCDICKarl Williamson2015-03-191-48/+52
| | | | | There are still a few failures that are skipped and should be looked at in v5.23.
* smartmatch: handle stack reallocDavid Mitchell2015-03-192-5/+44
| | | | | | | | | | | | | | | | | | When smartmatch is matching a pattern against something, it was failing to do appropriate PUTBACK and SPAGAIN's before calling matcher_matches_sv() (which pushes an arg an calls pp_match()). If the stack was almost full, the extra push in matcher_matches_sv() could cause a stack realloc, which would then be ignored when pp_smartmatch() returned, setting PL_stack_sp to point to the old (freed) stack. Adding SPAGAIN ensures that PL_stack_sp points to the new stack, while PUTBACK causes PL_stack_sp to no longer see the two args to pp_smartmatch, so the PUSH in matcher_matches_sv() pushes the SV us9ng ones of two two reclaimed slots, so the stack won't re-alloc anyway. Thus by doing the "right thing" with both PUTBACK and SPAGAIN, we doubly ensure that PL_stack_sp will always be right.
* update PL_stack_sp when we exit matcher_matches_sv()Tony Cook2015-03-192-2/+5
|
* TODO test for smartmatch stack issueTony Cook2015-03-191-1/+21
|
* repeat op: avoid integer overflowsDavid Mitchell2015-03-191-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | For the list variant of the x operator, the overflow detection code doesn't always work, resulting in the stack not being extended enough. There are two places where an overflow could occur: calculating how many stack items to extend by (items * count), and passing to repeatcpy() how many bytes to copy 'items' SV pointers (items * sizeof(const SV *)). The overflow detection was generally a mess; checking for overflow using a value (max) that may have already overflown; checking whether 'max' had overflown incorrectly, and not checking (items * sizeof(const SV *) at all (perhaps hoping that the other checks would be a superset of this). Also, some of the vars were still I32s; promote to 64-bit capable types. Finally, the signature of Perl_repeatcpy() still has an I32 len; that really should be changed to IV at some point; but for now I've just ensured that the callers (list 'x' and scalar 'x') don't wrap. I haven't put in a check for the only other core caller of repeatcpy(), S_study_chunk(), since that would only become an issue compiling a pattern with a fixed or floating substr within it of length > 2**31.
* op.c: rename CHANGE_TYPE() to OpTYPE_set()David Mitchell2015-03-191-53/+53
| | | | This macro is private to op.c, and has an overly generic name.
* universal.c: remove all trace of op_siblingDavid Mitchell2015-03-191-5/+7
| | | | | | | | | | | The OpSIBLING() macro and op_sibling_splice() are a higher-level way of manipulating optrees that ensure portability in the face of PERL_OP_PARENT etc. This commit also helps with the lofty goal of nothing outside of op.c directly accessing the op_sibling field. This is a follow-on/improvement to bac7a184cda7b.
* perlguts: clarify op_sibling usageDavid Mitchell2015-03-191-2/+3
|
* universal.c: PERL_OP_PARENT supportFather Chrysostomos2015-03-181-3/+3
|
* [perl #123995] Assert fail with s;@{<<;Father Chrysostomos2015-03-182-3/+15
| | | | | | | If s;; gobbles up the implicit semicolon that is tacked on to the end of the file, it can confuse the here-doc parser into thinking it is inside a string eval, because there is no file handle. We need to check for that possibility where the assertion was failing.
* regcomp.c: White-space onlyKarl Williamson2015-03-181-14/+14
| | | | Outdent code that the previous commit removed the surrounding block from
* Fix qr'\N{U+41}' on EBCDIC platformsKarl Williamson2015-03-185-219/+290
| | | | | | | | | | | Prior to this commit, the regex compiler was relying on the lexer to do the translation from Unicode to native for \N{...} constructs, where it was simpler to do. However, when the pattern is a single-quoted string, it is passed unchanged to the regex compiler, and did not work. Fixing it required some refactoring, though it led to a clean API in a static function. This was spotted by Father Chrysostomos.
* doc typoHugo van der Sanden2015-03-181-2/+2
|
* perlrebackslash: Clarify that \b{} rules are volatileKarl Williamson2015-03-181-11/+20
|
* dist/Data-Dumper/t/dumper.t: White space onlyKarl Williamson2015-03-181-8/+8
| | | | | The previous commit removed a surrounding block. outdent correspondingly
* dist/Data-Dumper/t/dumper.t: Simplify EBCDICKarl Williamson2015-03-181-21/+6
| | | | | This collapses two pieces of code into one. It isn't necessary to have an ASCII version vs an EBCDIC version.
* Term::Complete: Generalize for EBCDICKarl Williamson2015-03-181-2/+2
| | | | | | | | | | | | By this simple change, we can avoid printing all controls except \c?. On ASCII platforms the remaining control is DEL, which is handled above. On EBCDIC platforms, \c? remains a problem. But it isn't clear what to do about this anyway, as the module interprets ^D, ^H, ^U specially as if they were typed from the keyboard, and expects the keyboard to transmit them in a particular way, which may not be valid for EBCDIC. No tests fail, so fixing this will have to wait for tuits or field complaints.
* lib/open.t: TODO an EBCDIC test until Encode fixedKarl Williamson2015-03-181-0/+2
|
* DBM_Filter/t/encode.t: temporarily skip until Encode fixedKarl Williamson2015-03-181-0/+5
|
* porting/readme.t: TODO failing EBCDIC testKarl Williamson2015-03-181-0/+2
| | | | | This depends on Unicode::Collate, which is not yet working properly in EBCDIC
* ext/SDBM_File/sdbm/dbu.c Generalize for EBCDIC platformsKarl Williamson2015-03-181-8/+18
| | | | | This also fixed a bug which hasn't shown up in the tests, in that it uses 'char' where it should be 'U8'.
* regexec.c: Fix improper warning.Karl Williamson2015-03-182-5/+36
| | | | | | | \b{} and \B{} are valid in UTF-8 locales, as all the Unicode rules apply. Prior to this patch a warning was raised under some circumstances. The warning text was generalized to handle both \b and \B cases. The original text was only just added, in 5.21.9.
* re/pat_advanced.t: Tighten testKarl Williamson2015-03-181-1/+1
| | | | | This adds anchors to a pattern. I discovered while changing things that it still passed when broken
* regcomp.sym: Update \b descriptionsKarl Williamson2015-03-183-29/+27
|
* PATCH: [perl #124091] PP Data::Dumper fails on \n isolateKarl Williamson2015-03-182-2/+11
| | | | | | | | Commit 31ac59b61698e704b64192de74793793f4b5b0c0 inadvertently changed the behavior of the pure perl version of Data::Dumper. If a newline is the sole character in something being dumped with useqq, it no longer got translated into a \n sequence and was output raw. This was due to the regex matching of \n at beginning and ends of strings.
* t/op/dump.t: silence 'Aborted' messages on stderrDavid Mitchell2015-03-181-10/+46
| | | | | | | | | | On some platforms, t/op/dump.t produces extraneous (and scary) sh: line 1: 17605 Aborted (core dumped) style messages on stderr. Do a fork in each test to avoid this.
* Cwd.xs: silence recent compiler warningDavid Mitchell2015-03-181-2/+4
| | | | | | | A recent commit added a label, plus a "goto that label" only in the EBCDIC case. On "normal" builds, the compiler complained about an unused label. Also, indent the recent '#ifdef EBCDIC' correctly.
* S_grok_bslash_[ox]: assert char fitsDavid Mitchell2015-03-181-4/+26
| | | | | | | | S_grok_bslash_o() and S_grok_bslash_x() scan \o{...} and \x{...} in a string, and return a UV codepoint. Some callers assume that if that codepoint is converted into a series of utf8 bytes and re-inserted into the string, that it will tale up less space than the original "\x{...}" sequence. Add asserts that this is indeed so.
* loopctl.c: Correct bug numFather Chrysostomos2015-03-181-1/+1
|
* [perl #124004] Fix stack bug with foreach(@empty)Father Chrysostomos2015-03-184-17/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | The context gets recorded on the context stack when a loop is entered. That context is then used at loop exit when handling the stack. In the case of foreach, the context applied to the stack was taken from the enteriter op. But the enteriter op was always getting list context applied. That meant that foreach(@empty_array){} in scalar context would push nothing on to the stack, causing a subsequent stack read to look one item too far to the left, either reading the wrong thing, or causing a stack underflow (even a crash). The clearest bug resulting from it: $ ./miniperl -le 'push @_, 1, 2, 3, scalar do { for(@x){} } + 1, 4, 5, 6; print "@_"' 1 2 4 4 5 6 instead of 1 2 3 1 4 5 6. We do need to apply list context to make sure the items iterated over are evaluated in list context. But we need to apply it *only* to those (expr in newFOROP), not the the outer enteriter op. That op’s context should be left unset here, so that the calling context will be applied to it. This bug goes back at least to perl 5.000.
* Remove PL_ prefix for recently added non-globalsKarl Williamson2015-03-175-23785/+23785
| | | | | | | PL is reserved for global variables. These are enums and static variable names introduced for handling /\b{...}/ See <20150311150610.GN28599@iabyn.com> and follow up.
* Preserve OPTIMIZE in hintsVincent Pit2015-03-173-3/+17
| | | | | | | | | | | | | | | | | | | | Some extensions hints files (B, Digest-MD5, PerlIO-via) forcefully overwrite OPTIMIZE in order to work around compiler mishaps with high level optimizations. However, this loses whatever extra flags are listed in OPTIMIZE, such as compiler warnings flags or PERL_POISON, and makes them difficult to run under a debugger since a minimal level of optimization (usually -O1) is always enforced. This has became visible recently with new XS handshake facility. Instead, we chose to just follow Storable's strategy of lowering the optimization level with a substitution, while keeping all the other flags untouched. If other compiler flags are deemed problematic (such as -mcpu/-march on gcc), they ought to be addressed separately. Only B and PerlIO-via hints files are fixed by this change. The case of Digest-MD5 will be addressed on the CPAN. This fixes [RT #124038].
* perldelta for previous commitSteve Hay2015-03-171-1/+1
|
* Upgrade to threads 2.01Jerry D. Hedden2015-03-174-9/+9
|
* Upgrade CPAN::Meta from version 2.143240 to 2.150001Steve Hay2015-03-1717-43/+359
|
* Blead is (almost!) using Carp-1.35Steve Hay2015-03-172-1/+4
|
* Porting/core-cpan-diff: Don't ignore EOLs or whitespaceSteve Hay2015-03-174-3/+27
| | | | | | | | Turning off -b (ignore whitespace) revealed a whitespace difference lurking in blead's copy of a NEXT test file, which there is no need for. Turning on --binary revealed EOL differences in numerous Win32API-File files. Hopefully a future CPAN release will fix those since the files in its GitHub repo match blead as far as EOLs go already.
* Revert discouragement of fatal warningsRicardo Signes2015-03-173-72/+40
| | | | | | | ...at least for now. This reverts commits 0d314ba30623b19c36dfc97ac4b6ecb94cb406f4 and ce3778a3796be3e4604ed9b3671ea624c5affe0b.