summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* more mods to -Dl debugging outputDavid Mitchell2010-04-061-9/+6
|
* improve -Dl debugging outputDavid Mitchell2010-03-304-33/+76
| | | | | In particular, distinguish between scope and context stack push/pops, show depth of JUMPENV stack, and show STACKINFO push/pops
* PL_defoutgv isn't always a GV.David Mitchell2010-03-308-25/+98
| | | | | | | | | | | | | | | | | | | | Nasty code like the following results in PL_defoutgv not pointing to a valid GV: my $x = *STDERR; select($x); $x = 1; This causes all sorts of SEGVs when PL_defoutgv is subsequently accessed, because most code assumes that it has a valid gv_gp pointer. It also turns out that PL_defoutgv is under-tested; for example, temporarily hacking pp_close to make an arg-less close() croak didn't cause any minitest failures. Add a new test file that does some basic testing of a bad PL_defoutgv, and fix all the obvious badness in accessing it. This also fixes #20727, which although ostensibly a tie bug, was due to PL_defoutgv pointing to a tiedelem scalar, and fun like that described above happening.
* RT #67962: $1 treated as tainted in untainted matchDavid Mitchell2010-03-252-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | Fix the issue in the following: use re 'taint'; $tainted =~ /(...)/; # $1 now correctly tainted $untainted =~ s/(...)/$1/; # $untainted now incorrectly tainted The problem stems from when $1 is updated. pp_substcont, which is called after the replacement expression has been evaluated, checks the returned expression for taintedness, and if so, taints the variable being substituted. For a substitution like s/(...)/x$1/ this works fine: the expression "x".$1 causes $1's get magic to be called, which sets $1 based on the recent match, and is marked as not tainted. Thus the returned expression is untainted. In the variant s/(...)/$1/, the returned value on the stack is $1 itself, and its get magic hasn't been called yet. So it still has the tainted flag from the previous pattern. The solution is to mg_get the returned expression *before* testing for taintedness.
* Fix assorted bugs related to magic (such as pos) not "sticking" toDavid Mitchell2010-03-236-23/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | magical array and hash elements; e.g. the following looped infinitely: $h{tainted_element} =~ /..../g There are two side-effects of this fix. First, MGf_GSKIP has been extended to work on tied array elements as well as hash elements. This is the mechanism that skips all but the first tied element magic gets until after the next set. Second, rvalue hash/array element access where the element has get magic, now directly returns the element rather than a mortal copy. The root cause of the bug was code similar to the following in pp_alem, pp_aelemfast, pp_helem and pp_rv2av: if (!lval && SvGMAGICAL(sv)) /* see note in pp_helem() */ sv = sv_mortalcopy(sv); According to the note, this was added in 1998 to make this work: local $tied{foo} = $tied{foo} Since it returns a copy rather than the element, this make //g fail. My first attempt, a few years ago, to fix this, took the approach that the LHS of the bind should be made an lvalue in the presence of //g, since it now modifies its LHS; i.e. expr =~ // expr is rvalue expr =~ s/// expr is lvalue expr =~ //g expr was rvalue, I proposed to change it to lvalue Unfortunately this fix broke too much stuff (stuff that was arguably already broken, but it upset people). For example, f() ~= s//// correctly gives the error Can't modify non-lvalue subroutine call My fix extended f() =~ //g to give the same error. Which is reasonable, because the g isn't doing what you want. But plenty of people had code that only needed to match once and the g had just been cargo-culted. So it broke their working code. So lets not do this. My new approach has been to remove the sv_mortalcopy(). It turns out that this is no longer needed to fix the local $tied{foo} issue. Presumably that went away as a side-effect of my container/value magic localisation rationalisation of a few years ago, although I haven't analysed it - just noted that the tests still pass (!). However, an issue with removing it is that mg_get() no longer gets called. So a plain $tied_hash{elem}; in void context no longer calls FETCH(). Which broke some tests and might break some code. Also, there's an issue with the delayed calling of magic in @+[n] and %+{foo}; by the time the get magic is called, the original pattern may have gone out of scope. The solution is to simply replace the original sv = sv_mortalcopy(sv); with mg_get(sv); This then caused problems with tied array FETCH() getting called too much. I fixed this by extending the MGf_GSKIP mechanism to tied arrays as well as hashes. I don't understand why tied arrays have always been treated differently than tied hashes, but unifying them didn't seem to break anything (except for a Storable test, whose comment indicated that the test's author thought FETCH() was being called to often anyway).
* [perl #73626] get magic wasn't called on 3rd arg of openDavid Mitchell2010-03-212-2/+17
| | | | | | | Change f6c77cf1bf4d7cb2c7a64dd7608120b471f84062 introduced open($fh,"+<",undef) but in the process stopped calling mg_get() on the third arg, so tied values etc weren't getting processed
* [perl #45167] Taint removal by sprintfDavid Mitchell2010-03-213-1/+30
| | | | | | | | | | | | | | | | Under some circumstances the value returned by sprintf wasn't tainted, even though its args were. While trying to fix this, I also came across a second bug (which made fixing the first bug very confusing!) where the TARG of the sprintf op, after getting tainted once, permanently retained taint magic, which depending on circumstances, wasn't always set to untainted (mg_len =0) The original bug basically boiled down to parts of Perl_sv_vcatpvfn() directly manipulating the target with SvGROW() / Copy(), which failed to taint the target. Other parts used sv_catsv(), which did. So for example: "%s%s" failed, (only SvGROW) "%s %s" worked (the space char was appended using sv_catsv).
* [perl #6758] tainted values become untainted in tied hashesDavid Mitchell2010-03-202-2/+52
|
* Add Porting/corelist-diff to MANIFESTH.Merijn Brand2010-03-151-1/+2
|
* Updated AUTHORS file to be current with checkAUTHORS outputJesse Vincent2010-03-141-0/+1
|
* several typos in perldeltaJesse Vincent2010-03-141-3/+3
|
* feature.pm needed to be taught about "use feature ':5.12'"Jesse Vincent2010-03-143-3/+4
|
* perldelta updated for new version of Module::CoreListJesse Vincent2010-03-141-1/+1
|
* Module::CoreList bumped to 2.27 and updated with versions of thingsJesse Vincent2010-03-143-7/+644
| | | | we'll ship in 5.12.0
* Added placeholder for RC0 in perlhistJesse Vincent2010-03-141-0/+1
|
* README updates for 5.12.0Jesse Vincent2010-03-141-4/+4
|
* The "right" perldelta is now 5.12.0'sJesse Vincent2010-03-141-2/+2
|
* Update patchlevel.h to note that this is RC0 and not yet a real releaseJesse Vincent2010-03-141-0/+1
|
* Bump to 5.12.0Jesse Vincent2010-03-1423-169/+169
|
* perldelta typo caught by KarlJesse Vincent2010-03-141-1/+1
|
* A few small fixes to perl5120delta.podKarl Williamson2010-03-141-7/+7
|
* Left a debugging statement in a Porting tool. Oops!Jesse Vincent2010-03-141-2/+0
|
* Remove TODO section from perldeltaJesse Vincent2010-03-141-4/+0
|
* Further updates to perldelta:Jesse Vincent2010-03-142-68/+550
| | | | rewrapping and module list updates
* Add the author list for 5.12.0Jesse Vincent2010-03-141-4/+52
|
* Update Perl 5.12.0 delta. It needs a spellcheck, proofreading and a module list.Jesse Vincent2010-03-141-708/+514
|
* better perl version output in corelist-diffRicardo Signes2010-03-141-3/+3
|
* tool to produce corelist diffsRicardo Signes2010-03-141-0/+26
|
* pod cleanupJesse Vincent2010-03-131-15/+18
|
* Some copyediting perldelta. Pulled in .11.5 deltaJesse Vincent2010-03-131-233/+363
|
* Revive threaded builds for AIXH.Merijn Brand2010-03-131-0/+1
| | | | | | | If random_r is disabled, so should srandom_r be. Changes in a distant caused errors like: "reentr.h", line 773.16: 1506-007 (S) "struct random_data" is undefined.
* In Perl_sv_compile_2op(), remove a suggestion to merge code with pp_entersub.Nicholas Clark2010-03-131-1/+8
| | | | Add a comment explaining the problems with this function.
* Use POD references to documentation when possible.Tom Hukins2010-03-125-7/+7
|
* Use simpler language.Tom Hukins2010-03-123-3/+3
|
* Use POD-style references in the "SEE ALSO" section.Tom Hukins2010-03-121-1/+1
|
* Use POD-style referencesTom Hukins2010-03-121-2/+2
|
* Tighten the ropes on sGMTIME_min for HP-UX 11.00H.Merijn Brand2010-03-121-2/+2
| | | | | | The original long-running test had a tighter limit for sGMTIME_min and sLOCALTIME_min than the 2**47-1 limit that was now hardcoded. Take the safe route.
* [perl# 73490] Bump Time::Piece to a devel release that's newer than whatJesse Vincent2010-03-112-3/+3
| | | | | | | was in Blead but is old than the current updated CPAN release. Comment out a now deprecated 'use UNIVERSAL' line to prevent warnings from production code. It's bad form to ship software that deprecates things and then keeps using them and warning. Thanks to xdg++ for the spotting.
* Clarify that patching deprecate.pm is intended to facilitate a staged ↵Nicholas Clark2010-03-111-1/+5
| | | | transition.
* Describe the limitations and pitfalls of @DB::args.Nicholas Clark2010-03-111-0/+14
|
* Fix stringification assumption bug in overload.t, revealed by ia64-linux-ld.Nicholas Clark2010-03-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | Specifically: 1: / returns and NV where possible, only returning an integer if the dividend is an integer larger than an NV can represent accurately, and integer division is exact (ie no fractional part/remainder). 2: The test is performing $ref/1, intending it to be an identity operation on the numeric value of the reference. 3: The test assumes that the return result of the division will be a number that stringifies identically to the integer value of the reference. The fails if both: 1: The system memory map is such that addresses are very large (ia64 does) 2: NVs are large enough to hold these addresses because then the address becomes converted to an NV which has sufficient decimal digits that stringification defaults to scientific notation. Itanium Linux users the world over will be cheering because they can now compile Perl with long doubles with confidence that all tests pass.
* remove gv_try_downgrade from the public APIDavid Mitchell2010-03-112-1/+5
| | | | it's a recently added function, so removing it now does no harm.
* Limit HP-UX 11.00 time to 48 bit in 64bit modeH.Merijn Brand2010-03-111-1/+9
|
* Re-TODO one more Deparse testRafael Garcia-Suarez2010-03-111-1/+2
| | | | (was missing from 0fa4a26596a4646f9aae1dcd199a2f30933e6f01)
* Note that can be warned on implicit utf8 upgradeKarl Williamson2010-03-111-1/+2
| | | | | | | | The module encoding::warnings can be used to warn when two strings are concatenated where one is utf8 and the other is not and contains non-ASCII. Note the existence of this in the pod documentation.
* revert const deparsing in Deparse.pmDavid Mitchell2010-03-102-28/+8
| | | | | | | | | | | The code was added in 5.11.0 by 2990415a4519bc3988d7224ae15100c3e9e901ee 805b10112885d8868f21f8e860792d65e1e6c19d but causes a big slowdown on most deparsing, due to the need to walk the entire package tree looking for constant subs. For more details, see [perl #73052] Storable considerably slower at storing coderefs
* [perl #72740]: Blead breaks LEMBARK/LinkedList-Single-0.99.1.tar.gzZefram2010-03-102-11/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | f7461760003db2ce68155c97ea6c1658e96fcd27 improved the PL_check hook for bareword subs, but broke the above module. This is Zefram's followup: The issue is that speculative function lookups were leaving detritus consisting of empty GVs in the stash. These didn't affect normal functioning, but code that looks inside the stash could see them, and code that makes unreliable assumptions about the format of the stash can be broken. This is the same general mode of failure that we saw with namespace::clean. LinkedList-Single's failing test was using direct stash access poorly, in a way that made for a poor test, quite apart from making too many assumptions about stash structure. In the latest version of the package, 0.99.6, the test has been changed to a much better form, which actually tests what it meant to and incidentally doesn't read the stash at all. Although they don't affect normal functioning, the empty GVs shouldn't be there. It's much like the upgraded constant subs, which we concluded ought to be downgraded when the upgraded form is no longer required, in order to save memory. The solution here is similar: delete the empty GV when it is detected that a real GV is no longer required. The present patch does this at the same time as checking for constant-sub downgradability.
* In comments, correct two instances of SVf_PADSTALE to SVs_PADSTALE.Nicholas Clark2010-03-081-2/+2
|
* add makerel option to skip tarball creationDavid Golden2010-03-081-2/+5
|
* Fix comments about @INC orderingRafael Garcia-Suarez2010-03-081-2/+2
|