summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Most socket ops weren't warning for unopened handles unless 'closed' was enabledNicholas Clark2010-12-302-14/+190
| | | | | | They were checking that category 'closed' was enabled for warnings before calling report_evil_fh(), which in turn was (correctly) checking category 'unopened'.
* Convert a pp_sys test to use warnings 'closed', instead of the broader 'io'.Nicholas Clark2010-12-301-2/+2
| | | | | It's actually only testing warnings enabled by 'closed', so test using the tighter category.
* pp_leavewrite wasn't warning for unopened handles unless 'closed' was enabled.Nicholas Clark2010-12-302-2/+39
| | | | | It was checking that category 'closed' was enabled for warnings before calling report_evil_fh(), which in turn was (correctly) checking category 'unopened'.
* Better handling of magic methods freeing the SVDavid Mitchell2010-12-303-20/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fix for RT #81230 (and more). Currently, mg_get() works around the case where the called magic (e.g. FETCH) frees the magic SV. It does this by unconditionally pushing the SV on the tmps stack before invoking the method. There are two issues with this. Firstly, it may artificially extend the life of the SV. This was the root of the problem with #81230. There, the DB_File code, under -T, created a tainted tied object. Accessing the object (within FETCH as it happens), caused mg_get() to be invoked on the object (due to the taint magic), and thus extend the life of the object. This then caused c<untie %h if $h{k}> to give the warning untie attempted while 1 inner references still exist. This only became noticeable after efaf36747029c85b4d8825318cb4d485a0bb350e, which stopped wrapping magic method calls in SAVETMPS/FREETMPS. The second issue issue that this protection only applies to mg_get(); functions like mg_set() can still segfault if the SV is deleted. This commit fixes both problems as follows: First, the protection mechanism is moved out of mg_get() and into save_magic() / restore_magic(), so that it protects more things. Secondly, the protection is now: * in save_magic(), SvREFCNT_inc() the SV, thus protecting it from being freed during FETCH (or whatever) * in restore_magic(), SvREFCNT_dec() the SV, undoing the protection without extending the life of the SV, *except* if the refcount is 1 (ie FETCH tried to free it), then push it on the mortals stack to extend it life a bit so our callers wont choke on it.
* Update Renee Baeckers mail addressRenee Baecker2010-12-292-2/+3
| | | | Signed-off-by: David Golden <dagolden@cpan.org>
* properly clean up work files from testing GDBM_FileTony Cook2010-12-291-1/+1
|
* close the produced test file so win32 can unlink itTony Cook2010-12-281-0/+1
| | | | Previously runs would leave a GLOB(0x...) file in t/
* skip ExtUtils-CBuilder base tests expected and known to fail on Win32Tony Cook2010-12-281-25/+31
|
* As report_evil_fh() checks WARN_{CLOSED,UNOPENED}, don't duplicate this.Nicholas Clark2010-12-283-53/+29
| | | | | | | | | | This trades reduced code size for an extra function call in the error path with warnings disabled. (And removes a duplicated check for the case of taking the error path *with* warnings enabled.) Removing the check from Perl_do_close() does not change behaviour, as io is NULL there, hence Perl_report_evil_fh() will always be checking WARN_UNOPENED and setting vile to "unopened".
* As report_wrongway_fh() checks ckWARN(WARN_IO) internally, don't duplicate this.Nicholas Clark2010-12-283-21/+15
| | | | | | This trades reduced code size for an extra function call in the error path with warnings disabled. (And removes a duplicated check for the case of taking the error path *with* warnings enabled.)
* Remove OP_phoney_{IN,OUT}PUT_ONLY, as they are no longer used or supported.Nicholas Clark2010-12-282-5/+0
|
* Argument op to report_evil_fh() is always PL_op->op_type, so need not be passedNicholas Clark2010-12-287-38/+38
|
* The io argument to report_evil_fh() is always GvIO(gv), so need not be passed.Nicholas Clark2010-12-287-40/+41
|
* Extract the OP_phoney_* code from report_evil_fh() into report_wrongway_fh()Nicholas Clark2010-12-287-66/+71
| | | | | Previously Perl_report_evil_fh()'s body was just an if/else at the top level - a good sign that it is actually implementing two disjoint functions.
* In pp_sockpair, remove duplication of code to close the supplied file handles.Nicholas Clark2010-12-281-7/+5
| | | | | | It's not necessary to (also) test gv1 and gv2 before returning undef as an error, because io1 will automatically be NULL if gv1 is NULL, and similarly io2 if gv2 is.
* Fix typo in warning code added to pp_sockpair in c289d2f7288798f8.Nicholas Clark2010-12-281-1/+1
| | | | | | | That should be gv2, not gv1. However, I believe that it's impossible to reach the warning code, given the structure of the optree that the perl 5 implementation produces, as gv1 and gv2 will never be NULL, and GvIOn() will always return non-NULL. (Or croak, but that won't return).
* avoid undefined behaviour in fetch and modify of SP from 0a0e3cc51eTony Cook2010-12-281-1/+2
| | | | | pp_sys.c: In function ‘Perl_pp_send’: pp_sys.c:1845: warning: operation on ‘sp’ may be undefined
* Add CPAN::Meta::YAML as a dual-life core moduleDavid Golden2010-12-2731-1/+3545
|
* Simplify return handling for tied handle OPEN/PRINTF/READ/WRITE.Nicholas Clark2010-12-271-22/+5
| | | | | | | | Their code used to explicitly move the return value from its current position on the stack, to the position that was top of top of the stack just before the call was made. However, the POPBLOCK() in pp_leavesub will restore the stack pointer, and passing G_SCALAR to call_method() will force exactly one return value, so all of this is needless defensiveness.
* A perldelta entry describing the refactoring of the chop/chomp implementation.Nicholas Clark2010-12-271-1/+6
|
* Move do_chomp() from pp.c to doop.c, and make it static.Nicholas Clark2010-12-275-176/+175
| | | | It was never part of the public API, and only ever used by pp_{s,}cho{,m}p.
* Merge the opcode bodies for chop/chomp and schop/schomp.Nicholas Clark2010-12-274-26/+25
|
* Merge Perl_do_chop() and Perl_do_chomp().Nicholas Clark2010-12-275-106/+53
| | | | | | They share code for dealing with PVAVs, PVHVs, read only values and handling PL_encoding. They are not part of the public API, and Google codesearch shows no users outside the core.
* Convert Perl_do_chomp() to the same prototype as Perl_do_chop().Nicholas Clark2010-12-275-23/+23
| | | | Pass in an SV to hold the count, rather than returning the count.
* Refactor pp_chomp to process arguments in the same order as pp_chop.Nicholas Clark2010-12-272-6/+7
| | | | | Previously list chomp worked from last to first, whilst list chop worked from first to last.
* Fix links (and hence the podchecker test) after cce04bebd8af026c.Nicholas Clark2010-12-271-3/+3
|
* [perl #81016] Document ord("")Zsbán Ambrus2010-12-261-2/+2
| | | | | | | | | | The following patch clarifies what ord("") does in pod/perlfunc.pod. From the current documentation, it's not documented what it does, and one could guess several different things: returns zero, returns undef, returns zero with a warning, returns undef with a warning, dies. (There's precedent for dying: some BASIC implementations give an error if you ask for ASC("") -- here ASC is their equivalent of our ord function.)
* Upgrade to Thread::Queue 2.12Jerry D. Hedden2010-12-262-9/+4
|
* Upgrade to Thread::Semaphore 2.12Jerry D. Hedden2010-12-263-14/+5
|
* Reorganize perlhack.podDavid Golden2010-12-261-675/+683
| | | | | | | | | | | | | Following on an IRC conversation, I've attempted to reorganize perlhack for greater clarity. I have only cut and paste blocks of text and amended section titles and levels. (I have not addressed any of the numerous factual issues which remain.) The resulting guide should be clearer for those trying to skim the table of contents to understand what is covered in perlhack and whether it is worth an in-depth read. I see this change as the first step towards future improvements.
* [perl #81218] Note that perlbug to p5p is subject to moderationDavid Leadbeater2010-12-261-3/+3
|
* Calc.pm: Fix _modpow() part of RT#63237Peter John Acklam2010-12-261-1/+1
|
* Fix RT 62764: Math::BigFloat->bcmp() fails.Peter John Acklam2010-12-266-51/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: The Math::BigFloat->bcmp() method returns the wrong result when the exponent is too large to be represented exactly as a Perl numerical scalar. In such cases, bcmp() returns 0 because it fails to distinguish between the two exponents. How: With this fix, bcmp() does not convert the exponents to Perl numerical scalars, but keeps them as arbitrary precision integers, thus returning the correct result regardsless of the number of digits in the exponent. Test: Two tests added. These tests fail with the old code. Files: - lib/Math/BigFloat.pm: New version of bcmp(). - t/bigfltpm.inc: Add two tests confirming desired behaviour. - t/bare_mbf.t: Increment test count. - t/bigfltpm.t: Increment test count. - t/sub_mbf.t: Increment test count. - t/with_sub.t Increment test count.
* Fix RT 25274: Math::BigInt::Calc->_num() overflow.Peter John Acklam2010-12-261-9/+14
| | | | | | | | | | | | | | | | | | | | Why: Math::BigInt::Calc->_num() converts a big integer (in the internal format) to a Perl scalar. If the big integer is too large to be represented as a Perl scalar, it might return a Perl scalar numeric "nan", rather than "inf". The reason is that the current algorithm might multiply "inf" by "0", giving a "nan" which propagates. The following example illustrates the bug: perl -MMath::BigInt=lib,Calc -wle \ 'print Math::BigInt->new("1e999999")->numify()' How: This fix computes the output in a different way, never multiply "inf" by "0". Test: It is not obvious to me how to test this automatically in a portable way, since Perl has no standard way of stringifying a scalar numeric infinity. However the desired behaviour is verified manually and no existing tests fail with the new code.
* Update perldelta for threads and threads::sharedChris 'BinGOs' Williams2010-12-241-0/+8
|
* [PATCH] Upgrade to threads::shared 1.36Jerry D. Hedden2010-12-242-9/+3
| | | | Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
* [PATCH] Upgrade to threads 1.82Jerry D. Hedden2010-12-244-15/+9
| | | | Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
* Quote 'threads' in test.plVincent Pit2010-12-231-1/+1
| | | | If unquoted, it may throw a warning when threads.pm can't be loaded.
* Update Encode to CPAN version 2.41Chris 'BinGOs' Williams2010-12-2313-29/+66
| | | | | | | | | | | | [DELTA] $Revision: 2.41 $ $Date: 2010/12/23 11:05:58 $ lib/Encode/MIME/Header.pm Applied: RT#63387 encode of MIME-Header inserts too much whitespace http://rt.cpan.org/Ticket/Display.html?id=63387 t/Aliases.t lib/Encode/Alias.pm Applied: RT#63286: Various Encode::Alias improvements http://rt.cpan.org/Ticket/Display.html?id=63286
* update RMG discussion of post-release actionsZefram2010-12-221-13/+21
| | | | | use.perl.org is dead. www.cpan.org is maintained by Ask, not Jarkko any more. Separate CPAN/src and www.cpan.org issues into distinct steps.
* Fix IS_UTF8_CHAR() to recognise start bytes 0xF5, 0xF6, 0xF7.Nicholas Clark2010-12-212-3/+23
| | | | | | | The refactoring of 3b0fc154d4e77cfb inadvertently introduced a bug in Perl_is_utf8_char() and its callers, such as Perl_is_utf8_string(), whereby the beyond-Unicode characters 0x140000 to 0x1fffff were no longer recognised as valid.
* Convert lib/utf8.t to strict and warnings throughout.Nicholas Clark2010-12-211-4/+6
|
* Re-sort MANIFEST after a7dcd8d74e57d2a8.Nicholas Clark2010-12-211-1/+1
|
* No reference to $Id: in generated filesH.Merijn Brand2010-12-214-19/+6
| | | | | | They might have served a purpose in the original files, but Nicholas and Zefram expressed their concern that in the generated files, these tags are misleading and unneeded.
* Move metaconfig control comments into its own filesH.Merijn Brand2010-12-215-31/+78
|
* Restore a reference to $perlpath. Installation needs itH.Merijn Brand2010-12-213-70/+117
| | | | cbeaa1895 removed the reference to $perlpath
* sin6_scope_id is supported by Winsock2.Jan Dubois2010-12-216-6/+6
| | | | | The field is missing in the headers included with VC6, but commit 1ab9ebc11 adds it in our win32/include/sys/socket.h.
* avoid emitting control characters in test commentsTony Cook2010-12-211-1/+1
|
* multiple watchdog()s in the one test script are meaninglessTony Cook2010-12-211-1/+0
|
* d_sin6_scope_id configuration probe for VMS.Craig A. Berry2010-12-201-1/+35
| | | | | It's present on recent versions, but not all versions. Follow-up to f53580fec42f3b12264ee27b756dec257c0bb77a.