summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [perl #130001] h2xs: avoid infinite loop for enumsHugo van der Sanden2016-11-021-1/+1
| | | | | 'typedef enum x { ... } x' causes h2xs to enter a substitution loop while trying to write the typemap file.
* clarify behavior single quote regexpsYves Orton2016-11-022-9/+8
| | | | | | | | | | | | | | | The documentation was ambiguous about what type of interpolation was disabled in single quote regexps. It is a bit debateable whether "\n" in a regex is a regexp meta-escapes which happens to match "\n", or if it is a string escape that needs to be interpolated. Since single quote regexps should allow regexp meta-escapes (for instance \s), then it makes more sense to treat \n and \x{..} also as regexp meta-escapes, which then leaves nothing but variables that /could/ be interpolated. This effectively officially defines the current behavior as correct, and will allow us to close a number of tickets because of it. In particular we can close #21491 as "not a bug", and probably also related tickets.
* Upgrade Net::Ping from version 2.51 to 2.55Steve Hay2016-11-027-264/+327
| | | | (This retains the blead customizations from 01b515d1d7 and 0fc44d0a18.)
* Treat VSI C the same as DEC/Compaq/HP C.Craig A. Berry2016-11-011-3/+6
|
* Upgrade Unicode::Collate from version 1.14 to 1.17Steve Hay2016-11-01120-33442/+35593
|
* Upgrade Test::Simple from version 1.302059 to 1.302062Steve Hay2016-11-0151-54/+195
|
* Upgrade Term::ANSIColor from version 4.05 to 4.06Steve Hay2016-11-015-42/+111
|
* rework perl #129903 - inf recursion from use of empty pattern in regex codeblockYves Orton2016-11-017-26/+82
| | | | | | | | | | | | | | | | | | FC didn't like my previous patch for this issue, so here is the one he likes better. With tests and etc. :-) The basic problem is that code like this: /(?{ s!!! })/ can trigger infinite recursion on the C stack (not the normal perl stack) when the last successful pattern in scope is itself. Since the C stack overflows this manifests as an untrappable error/segfault, which then kills perl. We avoid the segfault by simply forbidding the use of the empty pattern when it would resolve to the currently executing pattern. I imagine with a bit of effort someone can trigger the original SEGV, unlike my original fix which forbade use of the empty pattern in a regex code block. So if someone actually reports such a bug we might have to revert to the older approach of prohibiting this.
* new feature @{^CAPTURE} (and %{^CAPTURE} and %{^CAPTURE_ALL})Yves Orton2016-11-016-45/+136
| | | | | | | | | @{^CAPTURE} exposes the capture buffers of the last match as an array. So $1 is ${^CAPTURE}[0]. %{^CAPTURE} is the equivalent to %+ (ie named captures) %{^CAPTURE_ALL} is the equivalent to %- (ie all named captures).
* Skip the subnormals tests in tru64.Jarkko Hietaniemi2016-11-011-1/+5
| | | | | | | | At first I thought these would be ftz/daz problems (flush-to-zero/denormals-are-zero), compiled with bare cc those seem to happen with denormals (e.g. DBL_MIN * 0.5), but the "cc -ieee" which perl is compiled with does make the ftz/daz go away. Needs further study. So make them TODO for now.
* (perl #129085) avoid memcmp() past the end of a stringTony Cook2016-10-312-3/+11
| | | | | | | | | | | When a match is anchored against the start of a string, the regexp can be compiled to include a fixed string match against a fixed offset in the string. In some cases, where the matched against string included UTF-8 before the fixed offset, this could result in attempting a memcmp() which overlaps the end of the string and potentially past the end of the allocated memory.
* (perl #128997) avoid reading beyond the end of the line bufferTony Cook2016-10-312-6/+19
| | | | when there's a short UTF-8 character at the end.
* (perl #129961) code cleanup for clang -Weverything supportAndy Lester2016-10-311-11/+16
| | | | | | | | | | | | | | | | This patch simplifies two bits of code that I came across while working on supporting the clang -Weverything flag. The first, in Perl_validate_proto, removes unnecessary variable initialization if proto of NULL is passed. The second, in S_scan_const, rearranges some code and #ifdefs so that the convert_unicode and real_range_max variables are only declared if EBCDIC is set. This lets us no longer have to unnecessarily set useless variables to make the compiler happy, and it saves us from some unnecessary checks on "if (convert_unicode)". One of the comments says "(Compilers should optimize this out for non-EBCDIC)", but now the compiler won't even see these unnecessary variables or tests.
* Added some discussion of tabs & spaces in the source codeAndy Lester2016-10-311-2/+7
|
* fix #129802: sv_grow: remove the overallocation for COW exemption for powers ↵Yves Orton2016-10-301-6/+2
| | | | | | | | | | of 2 They are just performance bombs waiting to hit the regex engine and other code. If someone wants this precise level of management then we should provide an API for them to do so. Really this just shows the flaw in our current COW implementation.
* fix perl #129802 - overallocate in concat to ensure we can COWYves Orton2016-10-301-2/+2
| | | | | Otherwise we get degenerate performance in things like the regex engine under certain cases.
* XS-APItest/t/utf8.t: Test with longest possible overlongKarl Williamson2016-10-291-6/+6
| | | | | | | | | | As part of testing, certain malformations are perturbed to also be overlong to see that the combination of them is properly handled. To do this, the code will take a test case and calculate an overlong that is longer than it. However if the test case is as long as the overlong would be, this can't be done, and is skipped. This commit now uses a longer overlong than previously (now the maximum possible) so that fewer tests have to be skipped.
* XS-APItest/t/utf8.t: White-space onlyKarl Williamson2016-10-291-9/+9
|
* XS-APItest/t/utf8.t: Fix EBCDIC bugKarl Williamson2016-10-291-1/+2
| | | | This number needs to be adjusted for EBCDIC platforms
* XS-APItest/t/utf8.t: Move a common expression to $varKarl Williamson2016-10-291-22/+25
| | | | | The maximum byte length of a single code-points UTF-8 representation is used in a bunch of places. Calculate it once.
* XS-APItest/t/utf8.t: Fix wrong test on EBCDICKarl Williamson2016-10-291-1/+1
| | | | | The I8 string doesn't work the same as UTF-8, as it only takes 5 bits from each continuation byte instead of 6.
* The new symbols broke a limit in VMS.Craig A. Berry2016-10-281-1/+1
|
* Use the new metalevel definitions for fp inf/nan/rangeJarkko Hietaniemi2016-10-2811-62/+48
| | | | | | | There are still hacks (in a good sense) of detecting "vax float" in the cpan/ modules (patches submitted upstream, customized moves done), but that is fine since the new Config symbols will be available only in the future.
* Configure: add defs summarizing doublekind/longdblkindJarkko Hietaniemi2016-10-2819-3/+614
| | | | | | | | | | For windows/netware It seems that many of the recent fp definitions have not been yet copied over there [1] [2], so went mostly by dead reckoning [3]. [1] Note that many of them are not absolutely necessary for building. [2] The proper updating involves doing stuff in win32, which I do not have. [3] As far as I can tell, Windows CE does not really not have long double.
* netbsd-vax: 2**400 does not fit vax fpJarkko Hietaniemi2016-10-281-2/+7
| | | | Note also that the computation needs to be runtime, not compiletime.
* netbsd-vax: more skippage due to no inf/nanJarkko Hietaniemi2016-10-283-8/+30
|
* Archive-Tar: customized.datJarkko Hietaniemi2016-10-281-0/+2
|
* Archive-Tar: Maintainers customizationJarkko Hietaniemi2016-10-281-0/+2
|
* Archive-Tar: customized version bumpJarkko Hietaniemi2016-10-281-1/+1
|
* Archive-Tar: detect if external tar failsJarkko Hietaniemi2016-10-281-33/+39
|
* Archive-Tar: in VMS gnutar requires filenames in native formatCraig A. Berry2016-10-281-0/+3
|
* Archive-Tar: RT #118476: scan for the right tar more robustlyJarkko Hietaniemi2016-10-281-5/+63
| | | | | | | | (1) Do not assume it is called 'tar'. (2) Do not assume it has the compression features. (3) Do not assume there is only one 'tar'. (4) Do not assume the first one found has the compression features. (5) Add the platform executable suffix to the name.
* Fix test to be EBCDIC friendlyKarl Williamson2016-10-271-3/+3
| | | | | | | | | | | | | | Commit da42332b10691ba7af7550035ffc7f46c87e4e66 introduced a new test. But on EBCDIC platforms that test doesn't do what it is intended. It uses \xE4, assuming it will have a different representation when encoded in UTF-8, and it is trying to test that having a different representation still works. But \xE4 on EBCDIC is a UTF-8 invariant (CAPITAL U). perlhacktips gives some suggestions on writing tests that work on both character sets. In this case \xB6, that is mentioned there, works, as it is UTF-8 variant on both character sets, and all EBCDIC code pages that have ever been supported by Perl.
* regcomp.c: document the trie common prefix logicYves Orton2016-10-271-0/+15
| | | | | | | | I wrote this code some time ago. It is somewhat of a state machine with some interesting implicit assumptions which took me a while to remember. While I do it seems reasonable to document them so the next guy (maybe/probably me) doesn't have to think so hard.
* regcomp.c: avoid some unnecessary work when it wont be usedYves Orton2016-10-271-2/+5
|
* regcomp.c: in trie common prefix logic rename idx to first_ofsYves Orton2016-10-271-7/+8
| | | | | Using 'idx' and 'ofs' interchangably is confusing, calling this first_ofs makes it more obvious what it is used for.
* regcomp.c: whitespace only change, break up dense code/long lineYves Orton2016-10-271-1/+10
|
* regcomp.c: add a comment about the trie logicYves Orton2016-10-271-0/+3
|
* regcomp.c: refactor TRIE bitmap logic to a macroYves Orton2016-10-271-32/+19
| | | | | | In four places we use the same logic, so refactor it to one macro called from four places and avoid any future oversights missing one.
* optimise gv.c a bit (we could do better)Yves Orton2016-10-271-4/+8
| | | | | | | | We save a few ops for package vars starting with 'E' by checking the second char as well. We could probably be much smarter with this switch, but we would have to generate it, which involves its own issues.
* must check all the EXPORT vars in two places!Yves Orton2016-10-271-1/+6
| | | | (Silence lots of used once warnings we used to not generate)
* regcomp.c: fix perl #129950 - fix firstchar bitmap under utf8 with prefix ↵Yves Orton2016-10-272-2/+23
| | | | | | | | | | | | | | | | optimisation The trie code contains a number of sub optimisations, one of which extracts common prefixes from alternations, and another which isa bitmap of the possible matching first chars. The bitmap needs to contain the possible first octets of the string which the trie can match, and for codepoints which might have a different first octet under utf8 or non-utf8 need to register BOTH codepoints. So for instance in the pattern (?:a|a\x{E4}) we should restructure this as a(|\x{E4), and the bitmap for the trie should contain both \x{E4} AND \x{C3} as \x{C3} is the first byte of \x{EF} expressed as utf8.
* Carp/t/arg_string.t: fixup to previous fixupDavid Mitchell2016-10-271-2/+4
| | | | | I added alternates to a regex for matching a f/p number, but forgot to put parentheses around them. So it was being ridiculously over-liberal
* Carp/t/arg_string.t: be liberal in f/p formatsDavid Mitchell2016-10-271-1/+7
| | | | | | | | | | [perl #129954] dist/Carp/t/arg_string.t: Test fails This test script checks that args are displayed sensibly in longmess() output, but floating-point numbers can be displayed in various formats depending on platform, so make the regex more forgiving. Also add a comment to the top of the script explaining its purpose.
* locale.c: Silence compiler warningKarl Williamson2016-10-261-1/+1
| | | | from some compilers
* lib/locale.t: Skip testing known incompatible localesKarl Williamson2016-10-261-1/+41
| | | | | | | | | | | | | | | | | | | | | | Some locales are incompatible with Perl. The only multi-byte locales accepted are UTF-8 ones. ISO 646 locales can have things like a '|' be a \w, which will create havoc with regular expressions. This commit causes locale.t to not test such locales, and to note which ones are skipped, and why. If we were to do the tests anyway, it could create segfaults. For example locales with state can have their states screwed up by Perl, which knows nothing about that. One could argue that the locale should be immune from bad state, and not segfault, but that is not under Perl's control, and we will get blamed initially, anyway, when a segfault happens, so don't test them. The multi-byte locales are more incompatible with Perl than the 7-bit locales that aren't ASCII compatible. So it could be argued that those should be tested, but I don't want to undertake the work to separate out the two causes from each other. The ISO 646 locales are essentially obsolete, and hence unlikely to be encountered in practice, so there would be little pay off for doing that work.
* lib/locale.t: Add skip(), fail() functionsKarl Williamson2016-10-261-0/+8
|
* t/loc_tools.pl: Make find_locales accept string inputKarl Williamson2016-10-263-29/+92
| | | | | | | | | | Prior to this commit, in order to work properly, find_locales required the C enum number for a locale category. This relaxes that to allow the name of the category as well. Thus it will work seamlessly when a given category isn't on the platform. Unless wrapped in an eval, or checked before using, it was a potential bug to call this function at all. This is because it didn't properly handle a string, and trying to find the locale number might fail on a given platform.
* t/loc_tools.pl: Add 'use strict'Karl Williamson2016-10-261-1/+4
|
* t/loc_tools.pl: Move some code earlier in the fileKarl Williamson2016-10-261-36/+36
| | | | | This is a simple move, with no changes. This will make things flow more logically after a future commit.