summaryrefslogtreecommitdiff
path: root/av.h
Commit message (Collapse)AuthorAgeFilesLines
* [perl #97020] Carp (actually caller) leaking memoryFather Chrysostomos2011-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit eff7e72c3 (Detect incomplete caller overrides in Carp) used this little trick for detecting a @DB::args that an overridden caller() failed to set: + @args = \$i; # A sentinal, which no-one else has the address of But there is a bug in caller(). The first time caller tries to write to @DB::args, it calls Perl_init_dbargs first. That function checks whether @DB::args is AvREAL, in case someone has assigned to it, and takes appropriate measures. But caller doesn’t bother calling Perl_init_dbargs more than once. So manually-assigned items in @DB::args would leak, starting with the *second* call to caller. Commit eff7e72c3 triggered that bug, resulting in a regression in Carp, in that it started leaking. eff7e72c3 was backported to 5.12.2 with commit 97705941a4, so in both 5.12 and 5.14 Carp is affected. This bug (the caller bug, not Carp’s triggering thereof) also affects any caller overrides that set @DB::args themselves, if there are alternate calls to the overridden caller and CORE::caller. This commit fixes that by changing the if (!PL_dbargs) condition in pp_caller to if (!PL_dbargs || AvREAL(PL_dbargs)). I.e., if @args is either uninitialised or AvREAL then call Perl_init_dbargs. Perl_init_dbargs also has a bug in it, that this fixes: The array not only needs AvREAL turned off, but also AvREIFY turned on, so that assignments to it that occur after its initialisation turn AvREAL back on again. (In fact, Larry Wall added a comment suggesting this back in perl 5.000.)
* perlapi.pod EnhancementsShlomi Fish2011-07-181-0/+2
| | | | | This is a patch to enhance perlapi.pod by providing Perl equivalents and clarifying documentation where appropriate.
* Remove union _xivu from struct xpvav - replace it with a non-union xav_alloc.Nicholas Clark2010-05-211-4/+2
| | | | This was the only user of xivu_p1 in union _xivu, so remove that too.
* In the SV body, exchange the positions of the NV and stash/magic.Nicholas Clark2010-05-211-2/+3
|
* Eliminate *_ALLOCATED_HEAD and *_HEAD macros which are now used only once.Nicholas Clark2009-08-221-12/+3
|
* Eliminate the remaining definitions for *_allocated structs.Nicholas Clark2009-08-221-5/+0
|
* Add MUTABLE_AV(), and remove (AV *) casts from headers.Nicholas Clark2008-10-271-2/+2
| | | p4raw-id: //depot/perl@34608
* Add a macro MUTABLE_PTR(p), which on (non-pedantic) gcc will not castNicholas Clark2008-10-271-2/+2
| | | | | | | | | | away const, returning a void *. Add MUTABLE_SV(sv) which uses this, and replace all (SV *) casts either with MUTABLE_SV(sv), or (const SV *). This probably still needs some work - assigning to SvPVX() and SvRV() is now likely to generate a casting error. The core doesn't do this. But as-is it's finding bugs that can be fixed. p4raw-id: //depot/perl@34605
* Update copyright years.Nicholas Clark2008-10-251-2/+2
| | | p4raw-id: //depot/perl@34585
* Deprecate (and remove core use of ) Nullav, Nullcv, Nullgv, Nullhe,Nicholas Clark2008-01-231-1/+5
| | | | | Nullhek and Nullhv. Nullop is going to be a bit less simple. p4raw-id: //depot/perl@33051
* factor out duplicate code in struct xpv*Marcus Holland-Moritz2007-12-301-41/+15
| | | | | Message-ID: <20071229181742.1933db40@r2d2> p4raw-id: //depot/perl@32783
* Perl_newAV() can become a mathom by making newAV() a wrapper aroundNicholas Clark2007-12-201-0/+10
| | | | | newSV_type() and tweaking Perl_sv_upgrade(). p4raw-id: //depot/perl@32675
* Update copyright years to include 2007. (Plus a couple of 2006s andNicholas Clark2007-01-021-1/+1
| | | | | earlier we missed in av.h and hv.h) p4raw-id: //depot/perl@29670
* Remove the vestigal "#if 0"s from header files that defined same-sizedNicholas Clark2007-01-021-4/+0
| | | | | *allocated structs, as these are not going to be needed again. p4raw-id: //depot/perl@29664
* Move all the FBM data fields from the table into a struct xbm_s whichNicholas Clark2006-12-281-0/+5
| | | | | is part of the xnv union. p4raw-id: //depot/perl@29634
* Move the low/high cop sequences from NVX/IVX to a two U32 structureNicholas Clark2006-12-281-0/+4
| | | | | | in the xnv union. This frees up IVX for the PL_generation code, which in turn will allow SvCUR to return to its real purpose. p4raw-id: //depot/perl@29630
* Move the GvNAME HEK into the IV union - every GV is now 1 pointerNicholas Clark2006-03-051-0/+4
| | | | | smaller. p4raw-id: //depot/perl@27380
* xgv_stash can be stored as a union with the NV, reducing the size ofNicholas Clark2006-02-251-1/+4
| | | | | PVGVs by another pointer. p4raw-id: //depot/perl@27326
* Store the stash for our in the magic slot. This will allow us to useNicholas Clark2006-02-241-2/+8
| | | | | | PVMGs in pad names where previously PVGVs were used. In turn, this gives much greater flexibility for the layout of PVGVs. p4raw-id: //depot/perl@27312
* Fix obsolete identifiers in commentRafael Garcia-Suarez2005-09-151-2/+2
| | | p4raw-id: //depot/perl@25417
* Attempt 2 at a diet memory layout can go live.Nicholas Clark2005-05-311-1/+1
| | | p4raw-id: //depot/perl@24649
* Goodbye xav_arylen. You won't be missed that much.Nicholas Clark2005-05-291-3/+1
| | | | | So now there's a buy 5 get one free offer on PVAV bodies. p4raw-id: //depot/perl@24619
* Change the IV to a union.Nicholas Clark2005-05-291-21/+12
| | | | | | | | Revert the NV union back to a plain NV Transpose the positions of IV and NV (NV is now first) Don't allocate the NV for PV,PVIV,PVAV and PVHV (last 2 non-allocations currently disabled by default) p4raw-id: //depot/perl@24617
* Rename the members of the SV head union to avoid pre-processorNicholas Clark2005-05-261-1/+1
| | | | | arguments with embed.h p4raw-id: //depot/perl@24590
* I think for now these have to be disabled by default.Nicholas Clark2005-05-251-1/+1
| | | p4raw-id: //depot/perl@24572
* Reorder the union to cause Win32 compilers to use void * alignment forNicholas Clark2005-05-241-1/+1
| | | | | it. p4raw-id: //depot/perl@24569
* Don't allocate an IV slot where the type doesn't use the IV slot.Nicholas Clark2005-05-231-0/+19
| | | p4raw-id: //depot/perl@24557
* create an "allocated" structure for PVs, PVAVs and PVHVsNicholas Clark2005-05-231-0/+2
| | | p4raw-id: //depot/perl@24544
* Re-order IVX slot in SV bodiesNicholas Clark2005-05-221-2/+12
| | | p4raw-id: //depot/perl@24542
* Add a union in place of xnv_nv, which allows AVs and HVs to re-useNicholas Clark2005-05-211-7/+17
| | | | | | | the memory to store pointers and integers. (Part 1 - will be reworked to be more efficient when IV or void* is 64 bit soon) p4raw-id: //depot/perl@24538
* Move the xpv_pv/xrv_rv member into the SV head, in a union withNicholas Clark2005-05-211-2/+1
| | | | | IV and UV. Avoid allocating a body for IVs and RVs. p4raw-id: //depot/perl@24531
* Goodbye AvFLAGSNicholas Clark2005-05-201-17/+9
| | | p4raw-id: //depot/perl@24518
* Fix up Larry's copyright statements to my best knowledge.Jarkko Hietaniemi2003-04-161-1/+2
| | | | | | | (Lots of Perl 5 source code archaeology was involved.) Larry didn't make strangled noises when I showed him the patch, either :-) p4raw-id: //depot/perl@19242
* Reverse copyright update (#18801) for files not changed in 2003.Hugo van der Sanden2003-03-021-1/+1
| | | p4raw-id: //depot/perl@18807
* Update all copyrights to 2003, from JarkkoHugo van der Sanden2003-03-021-1/+1
| | | p4raw-id: //depot/perl@18801
* Negative subscripts optionally passed to tied array methodsMark-Jason Dominus2002-08-171-0/+1
| | | | | Message-id: <20020415033855.6343.qmail@plover.com> p4raw-id: //depot/perl@17727
* Copyright++. (Not all the toplevel *.h have one, it seems.)Jarkko Hietaniemi2002-01-231-1/+1
| | | p4raw-id: //depot/perl@14391
* Missed the =head1 additions.Jarkko Hietaniemi2002-01-031-0/+4
| | | p4raw-id: //depot/perl@14041
* av.h cosmeticsSimon Cozens2001-03-301-1/+1
| | | | | Message-ID: <20010330181228.A9319@netthink.co.uk> p4raw-id: //depot/perl@9476
* Bump up Larry's copyright.Jarkko Hietaniemi2001-01-011-1/+1
| | | p4raw-id: //depot/perl@8289
* tweak comment about @DB::argsGurusamy Sarathy2000-06-081-2/+2
| | | p4raw-id: //depot/perl@6215
* set SvUTF8 on vectors only if there are chars > 127; update copyrightGurusamy Sarathy2000-02-061-1/+1
| | | | | years (from Gisle Aas) p4raw-id: //depot/perl@5009
* autogenerate API listing from comments in the source (from BenjaminGurusamy Sarathy2000-01-281-0/+10
| | | | | | | Stuhl <sho_pi@hotmail.com>); fix the markup format to be more flexible for better readability; add missing docs in sv.c; regenerate perltoc p4raw-id: //depot/perl@4915
* preliminary support for perl_clone() (still needs work inGurusamy Sarathy1999-11-081-1/+1
| | | | | | | | the following areas: SVOPs must indirect via pad; context stack, scope stack, and runlevels must be cloned; must hook up the virtualized pseudo-process support provided by "host"; ...) p4raw-id: //depot/perl@4538
* note about AVf_*Gurusamy Sarathy1999-09-101-0/+20
| | | p4raw-id: //depot/perl@4123
* slightly tweaked version of suggested patchDan Sugalski1999-07-061-1/+1
| | | | | | Message-Id: <3.0.6.32.19990608140938.030f12e0@ous.edu> Subject: [PATCH 5.005_57]Use NV instead of double in the core p4raw-id: //depot/perl@3602
* update copyright yearsGurusamy Sarathy1999-03-221-1/+1
| | | p4raw-id: //depot/perl@3124
* TIEARRAY updates - almost works ...Nick Ing-Simmons1998-01-141-2/+1
| | | p4raw-id: //depot/ansiperl@424
* tie array changes to core and testsNick Ing-Simmons1998-01-131-4/+8
| | | p4raw-id: //depot/ansiperl@418
* [inseparable changes from match from perl-5.003_91 to perl-5.003_92]Perl 5 Porters1997-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CORE LANGUAGE CHANGES Subject: Strictly follow lexical context of C<eval ''> and nested subs From: Chip Salzenberg <chip@perl.com> Files: op.c Subject: Make ::SUPER and UNIVERSAL work together From: Chip Salzenberg <chip@perl.com> Files: gv.c pod/perlguts.pod CORE PORTABILITY Subject: OS/2 patches Date: Wed, 5 Mar 1997 22:08:43 -0500 (EST) From: Ilya Zakharevich <ilya@math.ohio-state.edu> Files: hints/os2.sh lib/ExtUtils/MakeMaker.pm t/op/taint.t Msg-ID: 199703060308.WAA22211@monk.mps.ohio-state.edu (applied based on p5p patch as commit eda4d5189d403b15f244b4696a710fb91d15053e) Subject: VMS patches Date: Wed, 05 Mar 1997 23:10:24 -0500 (EST) From: Charles Bailey <bailey@HMIVAX.HUMGEN.UPENN.EDU> Files: lib/ExtUtils/MM_VMS.pm lib/ExtUtils/Manifest.pm perlsdio.h t/op/runlevel.t t/op/taint.t vms/descrip.mms vms/perly_c.vms vms/sockadapt.c vms/sockadapt.h vms/vms_yfix.pl private-msgid: 01IG5SQE4A6U00661G@hmivax.humgen.upenn.edu DOCUMENTATION Subject: Add taint checks and srand to perldelta Date: Sun, 2 Mar 1997 11:56:08 -0800 (PST) From: Tom Phoenix <rootbeer@teleport.com> Files: pod/perldelta.pod Msg-ID: Pine.GSO.3.95q.970302115355.23058D-100000@kelly.teleport.com (applied based on p5p patch as commit b28e0bc0aa3232e18d1bacb3efcbfb755ad100e0) Subject: Don't call FileHandle 'deprecated' From: Chip Salzenberg <chip@perl.com> Files: pod/perldelta.pod Subject: Improve sample module header Date: Sat, 01 Mar 1997 10:32:31 -0700 From: Tom Christiansen <tchrist@jhereg.perl.com> Files: pod/perlmod.pod Msg-ID: 199703011732.KAA14693@jhereg.perl.com (applied based on p5p patch as commit 3e1e15658152387f41e00ded4796cede4e1e10d3) Subject: Update list of CPAN sites Date: Sun, 2 Mar 1997 16:54:22 +0200 (EET) From: Jarkko Hietaniemi <jhi@iki.fi> Files: pod/perlmod.pod Msg-ID: 199703021454.QAA07446@alpha.hut.fi (applied based on p5p patch as commit 9423903e60e6c92c1893f5f4cab2476f403f8a4b) Subject: Enhance description of 'server error' Date: Tue, 4 Feb 1997 21:03:23 +0200 (EET) From: Jarkko Hietaniemi <jhi@cc.hut.fi> Files: pod/perldiag.pod private-msgid: 199702041903.VAA16070@alpha.hut.fi Subject: Regularize format of E-Mail addresses in *.pod From: Chip Salzenberg <chip@perl.com> Files: pod/*.pod LIBRARY AND EXTENSIONS Subject: Use IV instead of double for tms structure members From: Chip Salzenberg <chip@perl.com> Files: ext/POSIX/POSIX.xs OTHER CORE CHANGES Subject: Make sure $^X is tainted when ARG_ZERO_IS_SCRIPT From: Chip Salzenberg <chip@perl.com> Files: toke.c Subject: Clarify '-T too late' error From: Chip Salzenberg <chip@perl.com> Files: perl.c pod/perldiag.pod Subject: Warn when redefining or undefining a constant sub From: Chip Salzenberg <chip@perl.com> Files: pod/perldiag.pod pp.c sv.c Subject: Don't generate spurious 'not imported' warning From: Chip Salzenberg <chip@perl.com> Files: gv.c t/pragma/strict-vars pod/perldiag.pod Subject: Clarify message re: @host in string From: Chip Salzenberg <chip@perl.com> Files: pod/perldiag.pod pod/perltrap.pod toke.c Subject: Disconnect refs that are targets of pp_readline From: Chip Salzenberg <chip@perl.com> Files: pp_hot.c Subject: Fix typo in test of HvFILL() From: Chip Salzenberg <chip@perl.com> Files: op.c Subject: Allow for pad name array to be shorter than pad array From: Chip Salzenberg <chip@perl.com> Files: op.c Subject: Eliminate format-string type warnings Date: Mon, 3 Mar 1997 10:15:11 +0100 (MET) From: Hallvard B Furuseth <h.b.furuseth@usit.uio.no> Files: doio.c ext/POSIX/POSIX.xs gv.c hints/dec_osf.sh pp.c pp_ctl.c pp_hot.c run.c sv.c x2p/a2py.c private-msgid: 199703030915.KAA11634@bombur2.uio.no Subject: Update copyright dates From: Chip Salzenberg <chip@perl.com> Files: *.[hc] x2p/*.[hc] win32/EXTERN.h vms/vmsish.h vms/vms.c TESTS Subject: Smarter t/op/taint.t Date: Mon, 3 Mar 1997 10:31:54 -0800 (PST) From: Tom Phoenix <rootbeer@teleport.com> Files: t/op/taint.t private-msgid: Pine.GSO.3.95q.970303103047.24000A-100000@kelly.teleport.com Subject: Fix taint test for systems without csh From: Chip Salzenberg <chip@perl.com> Files: t/op/taint.t