summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade ExtUtils::Command from version 1.16 to 1.17Florian Ragwitz2011-02-283-2/+6
|
* Simplify the regression tests added in 3e6bd4bfcd175c61.Nicholas Clark2011-02-281-11/+7
| | | | | | Unwind the innermost loop, used only for reporting, and remove the array @s, only used to accumulate results for that loop. Fewer lines, less complexity, better diagnostics, and with the same failure cases on 3e6bd4bfcd175c61^.
* Handle [folds] of 0-255 without swashesKarl Williamson2011-02-272-13/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 56ca34cada940c7f6aae9a59da266e541530041e had the side effect of causing regular expressions with things like [a-z], or even just [k] to go out to disk to read tables to create swashes because it knew that some of those characters matched outside the bitmap (and due to l1_char_class_tab.h it knew which ones had those matches), but it didn't know what the characters were that participated in those folds. This patch hard-codes the Unicode 6.0 rules into regcomp.c for the code points 0-255, so that the very slow utf8_heavy is not invoked on them. (Code points above 255 will continue to invoke it.) It would, of course, be better if these rules could be regen'd into regcomp.c, as there is a risk that the standard will change, and the code will not. But I don't think that has ever happened; in other words, I think that the rules haven't changed so far since Day 1 of Unicode. (That would not be the case if we were doing simple case folding, as the capital sharp ss which folds to U+00DF was added later.) And the Standard is getting more stable in this area. I believe one of their stability policies now forbid them from adding something that simply folds to one of the characters that already has a fold, such as M and m. Ligatures are frowned on, and I doubt that new ones would be encoded, so that leaves a new Unicode character that folds to a Latin-1 plus some sort of mark. For those, this code is a no-op, so those aren't a problem either.
* regcomp.c: Add deprecation macro with extra paramKarl Williamson2011-02-271-0/+7
|
* regcomp.c: More prep for bitmap/nonbitmap foldsKarl Williamson2011-02-271-1/+32
| | | | | This sets things up in preparation for a future commit that will move calculating all folds involving characters in the bit map.
* regcomp.c: Place marker for 2nd inversion listKarl Williamson2011-02-271-19/+28
| | | | | The set_regclass_bit functions will be adding to a new inversion list. This declares that list and passes it to them.
* Change to use new add_cp_to_invlist()Karl Williamson2011-02-271-1/+1
|
* regcomp.c: Add parameters to fcnsKarl Williamson2011-02-274-33/+35
| | | | | | A pointer to the list of multi-char folds in an ANYOF node is now passed to the routines that set the bit map. This is in preparation for those routines to add to the list
* regcomp.c: Convert old-style to inversion listKarl Williamson2011-02-271-5/+5
| | | | | The code that handles a false range in a [character class] hadn't been converted to use inversion lists
* regcomp.c: Add fcn add_cp_to_invlist()Karl Williamson2011-02-274-0/+10
| | | | | This is just an inline shorthand when a single code point is all that is needed. A macro could have been used instead, but this just seemed nicer.
* regcomp.c: Move code to common placeKarl Williamson2011-02-271-3/+3
| | | | | | THis is part of the refactoring of the code that sets the alternate array for multi-char folds. Changing the node type to ANYOFV can be done at the last second, in pass 2, as it doesn't change any sizing, etc.
* regcomp.c: Factor code into a function.Karl Williamson2011-02-274-6/+27
| | | | A future commit uses this same code, so put it into a common place.
* Add #defines for 2 Latin1 charsKarl Williamson2011-02-272-0/+8
| | | | | These will be used in a future commit; the ordinals are different on EBCDIC vs. ASCII
* Move some #definesKarl Williamson2011-02-272-6/+2
| | | | | These were defined in a .c, but now there is need for them in another .c, so move them to a header.
* regcomp.c: Remove no longer necessary testsKarl Williamson2011-02-271-6/+0
| | | | | A previous commit changed add_range_to_invlist() to do the creation that these lines did.
* regcomp.c: accept NULL as inversion list paramKarl Williamson2011-02-273-11/+15
| | | | | | | Change the function add_range_to_invlist() to accept NULL as the inversion list, in which case it creates it. A common usage of this function is to create the list if it doesn't exist before calling it, so this just makes that code once.
* Eliminate tests for tainting of globs, skipped since 1999.Nicholas Clark2011-02-271-13/+1
| | | | | | Commit 72b166521443a1b8 changed perl to using File::Glob to implement the glob builtin. Previously glob was implemented by spawning a csh, hence globbing was not allowed on tainted values. The test for this was skipped, but never removed.
* In gv_autoload4(), ensure set magic is called on $...::AUTOLOAD if necessary.Nicholas Clark2011-02-272-2/+9
| | | | | | Without this, if $...::AUTOLOAD ever becomes tainted, it will never subsequently become properly untainted. This fixes an omission in change 5d121f7f3e622b95.
* Maintainers.pl and perldelta updates for Math::BigInt::FastCalc upgradeChris 'BinGOs' Williams2011-02-272-1/+5
|
* Update Math::BigInt::FastCalc to CPAN version 0.25Peter John Acklam2011-02-272-42/+6
| | | | | | | | | | | | | | | | | | # New Ticket Created by (Peter J. Acklam) # Please include the string: [perl #84982] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=84982 > Remove _new() from XS code and use _new() in Math::BigInt::Calc instead. The XS _new() doesn't handle integers that are too large to be represented exactly as floating point numbers, but small enough to be represented as 64 bit integers. E.g., even with 64 bit integer support, applying _num() to 18446744073709551615 (= 2**64-1) gives 1.84467440737096e+19, not 18446744073709551615. The XS _new() also returns nan, not inf, when it overflows. This closes RT #63335 and RT #49569. Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
* Added GNU/kFreeBSD to list of systems where 5.12.x buildsChris 'BinGOs' Williams2011-02-271-0/+2
|
* [perl #76814] FETCH called twice - ||Father Chrysostomos2011-02-271-7/+3
| | | | | | | | | | | | | | | | | | | | The || case in t/op/tie_fetch_count.t is not a bug, as there are two separate operators operating on it in the test script. In $dummy = $x || $y The || does mg_get($x). If it’s true it returns it and the = does mg_get($x). If $x is false, then $y is returned, so magic is called once on each of $x and $y. Similarly, && will seemingly call mg_get($x) twice if $x is false. If you just write: $x || $y then magic is only called once on $x. This patch corrects the test.
* [perl #79442] A #line "F" in a string eval doesn't update *{"_<F"}Father Chrysostomos2011-02-272-6/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are two problems here. String evals do not populate @{"_<..."} arrays the way parsed streams do. The lines are all put into the array before the parse. Commit e66cf94 added the code to copy (actually alias, but whatever) the lines into the new array when a #line directive is encountered. Inte- restingly, the following commit (8a5ee59) wrapped that code in an #ifndef USE_ITHREADS block, because ‘[c]hange 25409 [e66cf94] wasn’t necessary for threaded perls’. It seems it *was* necessary for threaded perls after all, because the lines are simply not copied. In non-threaded perls it wasn’t working properly either. The array in the new glob was the same array as the old (aliased), so the line numbers would be off if the #line directive contained a line number that differed. This commit does three things: • It removes the #ifndef, • It checks whether the line number has changed and aliases the indi- vidual elements of the array. • The breakpoints hash is not copied if the line number differs, as setting a breakpoint on (eval 1):1 (warn 1) in eval qq{warn 1;\n#line 1 "foo"\nwarn 2;} should not also set a breakpoint on foo:1 (warn 2).
* regexec.c: Array declared 1 too smallKarl Williamson2011-02-261-1/+1
| | | | | The bounds of this array were being exceeded causing smoke failures on netbsd
* Modern cygwin often has empty $ENV{CYGWIN}Reini Urban2011-02-261-1/+1
| | | | | Fixes Use of uninitialized value $ENV{"CYGWIN"} in concatenation (.) or string at /usr/lib/perl5/5.13.10/i686-cygwin/Config_heavy.pl line 54
* Stop aelemfast from crashing on GVs with null AVsFather Chrysostomos2011-02-262-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported at nntp://nntp.perl.org/1298599236.4753.72.camel@p100 (and respaced for readability): #!perl5.12.0 $r=q/ print __FILE__; local *dbline = $main::{"_<".__FILE__}; print $dbline[0] /; eval $r;' __END__ (eval 1) Bus error This only seems to happen in non-threaded perls. It can be reduced to this: *d = *a; print $d[0]; The $d[0] is optimised into an aelemfast op (instead of the usual aelem with an rv2av kid). pp_aelemfast is at fault, as evidenced by the fact that this does not crash (the ${\...} prevents the optimisation): *d = *a; print $d[${\0}]; pp_aelemfast uses GvAV instead of GvAVn. Usually $d[0] will autovivify @d, but the glob assignment leaves $d[0] pointing to a glob (*d) with no array. Then pp_alemfast passes a null pointer around.
* Don't include commit IDs in generated delta entriesFlorian Ragwitz2011-02-261-10/+5
| | | | | We don't usually reference git commits anymore in perldelta, so let's stop git-deltatool from generating entries like that.
* Hack to allow git-deltatool to spawn 'emacsclient -t'Florian Ragwitz2011-02-261-1/+1
| | | | | My $EDITOR is 'emacsclient -t'. system('emacsclient -t', 'more', 'args') won't do the right thing.
* Allow reviewing of diffs in the deltatoolFlorian Ragwitz2011-02-261-1/+46
| | | | The pager code is mostly stolen from Prophet::CLI.
* Reword perltie/READLINE and correct exampleFather Chrysostomos2011-02-251-6/+6
|
* [perl #84942] perltie.pod READLINE list contextKevin Ryde2011-02-251-4/+19
| | | | | | | | | | | | | | | | | In perltie.pod the handle READLINE says The method should return undef when there is no more data. which made me think that's what it should always do, and didn't need to pay attention to wantarray(). If I'm not mistaken in list context READLINE should return empty list for no more data. It'd be good if the docs noted that, and perhaps cross referenced to perlfunc for the gory details of what readline should do. Maybe something like the following, unless someone can think of a better contrivance for the sample.
* Add Kevin Ryde to AUTHORSFather Chrysostomos2011-02-251-0/+1
|
* [perl #84746] Accessing $2 causes the interpreter to crashFather Chrysostomos2011-02-252-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Actually, it doesn’t. The original test case was: #!/usr/bin/perl my $rx = qr'\$ (?| {(.+?)} | (.+?); | (.+?)(\s) )'x; my $test = '/home/$USERNAME '; die unless $test =~ $rx; print "1: $1\n"; print "2: $2\n" if defined $2; This crashes even if I put an ‘exit’ right after the pattern match. What’s happening is that regcomp miscounts the number of capturing parenthesis pairs (cf. [perl #59734]), so the execution of the regular expression causes a buffer overflow which overwrites the op_sibling field of the regcreset op, causing a crash when the op is freed. (The exact failure may differ between builds, platforms, etc., of course.) S_reg in regcomp.c keeps a count of the parenthesised groups in a (?|...) construct, which it updates after each branch, if that branch has more captures than any previous branch. But it was not updating the count after the last branch. So this bug would occur if the last branch had more capturing paren- theses than any previous branch. Commit ee91d26, which fixed bug #59734, only solved the problem when there was just one branch (by updating the count before the loop that deals with subsequent branches was entered). This commit changes the code at the end of S_reg to take into account that RExC_npar (the current paren count) might have been increased by the last branch. Since the loop to deal with subsequent branches resets the count *before* each branch, the code that commit ee91d26 added is no longer necessary, so this commit removes it.
* bleadperl breaks RCLAMP/Text-GlobKarl Williamson2011-02-252-7/+17
| | | | | | | | This was from commit f424400810b6af341e96230836690da51c37b812 which came from needing a bit in an already-full flags field, and my faulty analysis that two bits could be shared. I found another mechanism to free up another bit, and now can separate these shared bits again.
* Free up bit in ANYOF flagsKarl Williamson2011-02-254-31/+55
| | | | | | | | | | | | | | | | This is the foundation for fixing the regression RT #82610. My analysis was wrong that two bits could be shared, at least not without further work. This changes to use a different mechanism to pass needed information to regexec.c so that another bit can be freed up and, in a later commit, the two bits can become unshared again. The bit that is freed up is ANYOF_UTF8, which basically said there is something that is matched outside the ANYOF bitmap, and requires the target string to be in utf8. This changes things so the existence of something besides the bitmap indicates this, and so no flag is needed. The flag bit ANYOF_NONBITMAP_NON_UTF8 remains to indicate that there is something that should be matched outside the bitmap even if the target string isn't in utf8.
* regcomp.c: ANYOF node handle range to UV_MAXKarl Williamson2011-02-251-2/+11
|
* regcomp.c: Move inversion list conversion codeKarl Williamson2011-02-251-29/+32
| | | | This just moves the code to later in the subroutine, in preparation for future commits
* regcomp.c: Use more precise ANYOF flagKarl Williamson2011-02-251-1/+1
| | | | | | As the comment above the changed line says, \p doesn't have to match only utf8, but it sets the flag that is two bits, meaning UTF8. Set just the one flag.
* regcomp.c: Add commentKarl Williamson2011-02-251-1/+2
|
* Upgrade Tie::RefHash from version 1.38 to 1.39Florian Ragwitz2011-02-255-6/+32
|
* Upgrade Devel::DProf to version 20110225.01Florian Ragwitz2011-02-252-2/+2
| | | | We needed another upload to fix a PAUSE indexing problem.
* DProf is now maintained on CPAN, not by p5p anymoreFlorian Ragwitz2011-02-252-5/+2
|
* Remove DProf's Changes fileFlorian Ragwitz2011-02-252-205/+0
| | | | | From now on all changes will go through CPAN first and the Changes file is being maintained there. No need to keep it around in the core.
* Remove DProf's Makefile.PLFlorian Ragwitz2011-02-252-19/+0
| | | | make_ext.pl can generate it for us.
* Maintainers.pl and perldelta updates for Math::BigInt updateChris 'BinGOs' Williams2011-02-252-1/+5
|
* Update Math::BigInt to CPAN version 1.993Peter John Acklam2011-02-254-8/+8
| | | | | | | | | | | # New Ticket Created by (Peter J. Acklam) # Please include the string: [perl #84844] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=84844 > Change default backend library from Math::BigInt::FastCalc to Math::BigInt::Calc, which is included in the Math-BigInt distro. This avoids recursive distribution dependency (RT #65976).
* Eliminate $::PatchId from t/re/*.t.Nicholas Clark2011-02-253-12/+7
| | | | | | It was only being used in four places across two files, to add perforce revision numbers to test descriptions. Replace this with the git commit hash in the tests' descriptions.
* Remove now-unnecessary C<use File::Spec> from t/op/inccode.tNicholas Clark2011-02-251-1/+0
| | | | | This has been vestigial since 1c25d394345c1b97 converted it to using test.pl's tempfile().
* Migrate t/op/{fork,runlevel,tie}.t to use run_multiple_progs().Nicholas Clark2011-02-255-109/+47
| | | | | | | The addition of "OPTION random" to all fork.t's tests might be overkill, given that run_multiple_progs() can specify "random" per test, but as the previous code in fork.t always sorted before comparison, we are no *worse* off than we were.
* Migrate the test running logic from t/lib/common.pl to t/test/plNicholas Clark2011-02-252-147/+157
| | | | | This will make it available to several tests in t/op, which currently duplicate it.