summaryrefslogtreecommitdiff
path: root/sv.c
Commit message (Collapse)AuthorAgeFilesLines
* better document how the weakref backrefs array is refcountedDave Mitchell2008-08-211-4/+20
| | | p4raw-id: //depot/perl@34211
* Assert that backreferences array is not freed rather than handling itDave Mitchell2008-08-201-9/+5
| | | | | | | | | | | In several places where the weakrefs backreferences array is used or freed, the code checks whether the array has already been freed and if so skips. Since the array already being freed is a bad bug, lets instead assert that this never happens, based on the assumptions that (a) such premature freeing bugs are likely ironed out by now, (b) if they aren't then we want to know about them and fix them rather than silently skip. p4raw-id: //depot/perl@34210
* [perl #56908] DBI memory leak in 5.10.0 due to change 26530Dave Mitchell2008-08-201-1/+2
| | | | | | | | | | | A weakref to a HV would leak, because the xhv_backreferences array is created with a refcount of 2 (to avoid premature freeing during global destruction), but the RC was only decremented once when the parent HV was freed. Also, when thread cloned, the new array was being created with a RC of 1, rather than 2, which coincidentally worked due to the first bug. p4raw-id: //depot/perl@34209
* Fix use of a variable before it is initialised, introduced by changeNicholas Clark2008-07-151-1/+1
| | | | | | 34138, spotted by Jerry D. Hedden. I assume that he's compiling with options that enable trace flow analysis from the C compiler. p4raw-id: //depot/perl@34144
* The assert()ions in sv_chop() that the passed in pointer is within theNicholas Clark2008-07-131-5/+11
| | | | | | SV's buffer should be full-on panics, as bogus values passed in can cause later heap corruption, which is a bad thing (TM). p4raw-id: //depot/perl@34138
* assert() that the pointer passed to Perl_sv_chop() lies within theNicholas Clark2008-07-131-0/+4
| | | | | buffer of the SV. p4raw-id: //depot/perl@34136
* In Perl_sv_utf8_upgrade_flags(), don't assume that the SV is wellNicholas Clark2008-07-111-3/+11
| | | | | formed with a trailing '\0'. And do assume that bytes_to_utf8() does. p4raw-id: //depot/perl@34128
* Some more missing isGV_with_GP()sBen Morrow2008-06-281-13/+24
| | | | | Message-ID: <20080628160017.GA81579@osiris.mauzo.dyndns.org> p4raw-id: //depot/perl@34092
* more incorrect variable reported in uninitialized value warningsDave Mitchell2008-06-241-0/+7
| | | | | | | (the ones that change #34077 missed). It also degrades some print warnings - ie variable names no longer displayed. p4raw-link: @34077 on //depot/perl: 8b0dea507b8f946d8546917b8fda74bfbf233ac0 p4raw-id: //depot/perl@34084
* Incorrect variable reported in uninitialized value warning.Dave Mitchell2008-06-221-2/+70
| | | | | | Ops that can return undef even for defined args, could mistakenly warn that the arg was undefined. p4raw-id: //depot/perl@34077
* DEBUG_LEAKING_SCALARS wasn't reporting the correct line numberDave Mitchell2008-05-181-5/+4
| | | | | of SVs allocated at runtime p4raw-id: //depot/perl@33854
* Call SvMAGICAL_off in mg_freeBram2008-05-101-1/+0
| | | | | Message-ID: <20080505161856.pgz4pjga1w44ksk4@horde.wizbit.be> p4raw-id: //depot/perl@33815
* Fix [perl #52740] crash when localizing a symtab entryRafael Garcia-Suarez2008-05-101-2/+4
| | | p4raw-id: //depot/perl@33807
* Record-style reads in Perl_sv_gets have to be done with read(), notCraig A. Berry2008-05-041-1/+10
| | | | | | | fread() on VMS, and have been for some time. Except that ain't gonna work with PerlIO::Scalar's in-memory files. Old bug exposed by new test in #33769. p4raw-id: //depot/perl@33788
* Fix C portability nit found by Jerry D. Hedden.Rafael Garcia-Suarez2008-04-111-1/+1
| | | p4raw-id: //depot/perl@33669
* Double magic with '\&$x'Vincent Pit2008-04-111-3/+5
| | | | | | From: "Vincent Pit" <perl@profvince.com> Message-ID: <34395.147.210.17.175.1207039697.squirrel@147.210.17.175> p4raw-id: //depot/perl@33668
* In Perl_sv_grow(), no need to do PERL_STRLEN_ROUNDUP() if we haveNicholas Clark2008-04-021-1/+1
| | | | | | malloc_size() to get the true allocated space, as PERL_STRLEN_ROUNDUP() might actually bump the request across an allocation size boundary. p4raw-id: //depot/perl@33632
* Define sv_insert() as a wrapper to sv_insert_flags(), and moveNicholas Clark2008-04-011-14/+4
| | | | | Perl_sv_insert() to mathoms.c p4raw-id: //depot/perl@33627
* Add the correct argument assertion macro to sv_insert_flags().Nicholas Clark2008-04-011-1/+2
| | | | | Don't want anything wrongly marked as non-NULL slipping through. p4raw-id: //depot/perl@33626
* Double magic with substrVincent Pit2008-03-311-2/+16
| | | | | Message-ID: <47F119E8.5010106@profvince.com> p4raw-id: //depot/perl@33618
* Fix compiler warning about comparison of pointer types.Nicholas Clark2008-03-291-1/+3
| | | p4raw-id: //depot/perl@33596
* do not use SVTYPEMASK to prevent cleaning of PL_fdpid and PL_strtabGerard Goossen2008-03-291-0/+2
| | | | | | Message-ID: <20080326130713.GL4409@ostwald> Date: Wed, 26 Mar 2008 14:07:13 +0100 p4raw-id: //depot/perl@33595
* Don't call S_utf8_mg_pos_cache_update(), and hence don't even createNicholas Clark2008-03-261-2/+4
| | | | | the magic for the UTF-8 cache, if the UTF-8 caching is disabled. p4raw-id: //depot/perl@33579
* Repeat change 33508 - change 33561 re-instated the mistake in changeNicholas Clark2008-03-251-1/+1
| | | | | 33507. p4raw-id: //depot/perl@33563
* Re: [PATCH] sv.c: constingSteven Schubiger2008-03-251-9/+9
| | | | | Message-ID: <20080313165800.GD31102@refcnt.homeunix.org> p4raw-id: //depot/perl@33561
* Double warning with perl -we '\&$x'Vincent Pit2008-03-201-1/+1
| | | | | | From: "Vincent Pit" <perl@profvince.com> Message-ID: <38561.147.210.17.175.1206011207.squirrel@147.210.17.175> p4raw-id: //depot/perl@33544
* Silence some warnings introduced by #33507Steve Hay2008-03-181-1/+1
| | | p4raw-id: //depot/perl@33541
* Change 33507 had a const too far (Perl_mg_dup()'s mg is assigned to).Nicholas Clark2008-03-131-1/+1
| | | p4raw-id: //depot/perl@33508
* Re: [PATCH] sv.c: constingSteven Schubiger2008-03-131-12/+14
| | | | | Message-ID: <20080312113846.GB31102@refcnt.homeunix.org> p4raw-id: //depot/perl@33507
* Re: [PATCH] sv.c: constingSteven Schubiger2008-03-121-14/+14
| | | | | Message-ID: <20080311185937.GA18713@refcnt.homeunix.org> p4raw-id: //depot/perl@33489
* Re: [PATCH] sv.c: constingSteven Schubiger2008-03-111-12/+13
| | | | | Message-ID: <20080311104929.GA4950@refcnt.homeunix.org> p4raw-id: //depot/perl@33473
* Re: [PATCH] sv.c: constingSteven Schubiger2008-03-111-18/+18
| | | | | Message-ID: <20080302210951.GD10705@refcnt.homeunix.org> p4raw-id: //depot/perl@33471
* Re: [PATCH] sv.c: constingSteven Schubiger2008-03-021-12/+12
| | | | | | | Message-ID: <20080302191029.GC10705@refcnt.homeunix.org> Plus regen and additional tweaks to silence warnings from VC7 in sv.c from this patch and previous patches from same author. p4raw-id: //depot/perl@33411
* Re: [PATCH] sv.c: constingSteven Schubiger2008-03-021-11/+11
| | | | | Message-ID: <20080302164743.GB10705@refcnt.homeunix.org> p4raw-id: //depot/perl@33409
* Re: [PATCH] sv.c: constingSteven Schubiger2008-03-021-12/+14
| | | | | Message-ID: <20080301182953.GB16742@refcnt.homeunix.org> p4raw-id: //depot/perl@33406
* Re: [PATCH] sv.c: constingSteven Schubiger2008-03-011-9/+9
| | | | | | Message-ID: <20080229202939.GA16742@refcnt.homeunix.org> Date: Fri, 29 Feb 2008 21:29:39 +0100 p4raw-id: //depot/perl@33403
* Re: [PATCH] sv.c: constingSteven Schubiger2008-02-291-10/+10
| | | | | | Message-ID: <20080208131350.GB22321@refcnt.homeunix.org> Date: Fri, 8 Feb 2008 14:13:50 +0100 p4raw-id: //depot/perl@33400
* Use malloc_good_size() to round up the size of requested arenas to theNicholas Clark2008-02-271-4/+13
| | | | | | size that will actually be allocated, to squeeze last few bytes into use. p4raw-id: //depot/perl@33390
* Fix another Win32/VC6 compiler warning caused by #33231Steve Hay2008-02-271-1/+1
| | | | | (missed by #33336--this one only occurs in debug builds) p4raw-id: //depot/perl@33385
* If the C library provides malloc_size(), we can use that in the sameNicholas Clark2008-02-261-5/+5
| | | | | | | places as Perl's malloced_size(), except that we need to be careful of any PERL_TRACK_MEMPOOL manipulations in force. Wrap both as Perl_safesysmalloc_size(), to give a consistent name and interface. p4raw-id: //depot/perl@33379
* In Perl_sv_usepvn_flags(), with MYMALLOC, use the actual malloc()edNicholas Clark2008-02-261-3/+12
| | | | | size for SvLEN(), rather than an estimate. p4raw-id: //depot/perl@33378
* If we have malloced_size() available, then avoid rounding up the stringNicholas Clark2008-02-261-7/+9
| | | | | | | to the next (guessed) plausible alignment size, and instead find out how much memory was actually allocated, so that we can set this in the scalar's SvLEN(). This way, sv_grow() will be called far less often. p4raw-id: //depot/perl@33377
* fix variable names in 'ununit var' warnings in evalsDave Mitchell2008-02-221-0/+1
| | | p4raw-id: //depot/perl@33342
* Fix Win32/VC6 compiler warnings caused by #33231Steve Hay2008-02-201-2/+2
| | | p4raw-id: //depot/perl@33336
* Enable caching of strxfrm() results also for readonly SVs asMarcus Holland-Moritz2008-02-181-5/+0
| | | | | | | | | returned e.g. by "keys %hash". This speeds up sorting of lots of hash keys significantly. See also: Subject: Slowdown of "sort keys %hash" under "use locale" Message-ID: <20080215170015.72f6160d@r2d2> p4raw-id: //depot/perl@33334
* use svtypeRobin Barker2008-02-141-1/+1
| | | | | | From: "Robin Barker" <Robin.Barker@npl.co.uk> Message-ID: <46A0F33545E63740BC7563DE59CA9C6D093A35@exchsvr2.npl.ad.local> p4raw-id: //depot/perl@33304
* assert() that every NN argument is not NULL. Otherwise we have theNicholas Clark2008-02-121-7/+307
| | | | | | | | | | | | ability to create landmines that will explode under someone in the future when they upgrade their compiler to one with better optimisation. We've already done this at least twice. (Yes, some of the assertions are after code that would already have SEGVd because it already deferences a pointer, but they are put in to make it easier to automate checking that each and every case is covered.) Add a tool, checkARGS_ASSERT.pl, to check that every case is covered. p4raw-id: //depot/perl@33291
* Re: [PATCH] sv.c: constingSteven Schubiger2008-02-081-10/+10
| | | | | Message-ID: <20080207165158.GA22321@refcnt.homeunix.org> p4raw-id: //depot/perl@33249
* Re: [PATCH] sv.c: constingSteven Schubiger2008-02-071-11/+11
| | | | | Message-ID: <20080204144419.GB20276@refcnt.homeunix.org> p4raw-id: //depot/perl@33245
* sv.c: constingSteven Schubiger2008-02-041-8/+8
| | | | | Message-ID: <20080203185315.GA20276@refcnt.homeunix.org> p4raw-id: //depot/perl@33231