summaryrefslogtreecommitdiff
path: root/pad.h
Commit message (Collapse)AuthorAgeFilesLines
* Use of freed comppad array during clear_yystack()Marcus Holland-Moritz2009-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Message-ID: <20081026231720.34258457@r2d2> Patch description from the original email : I tried to make tests pass on a perl built with -DPERL_POISON, as some tests were dying with segfaults. They all originated from the same source: clear_yystack() after a compile error. [...] As far as I can see, after croaking the newly created CV is destroyed and its pad is undef'd. [...] This will SvREFCNT_dec PL_comppad and set PL_comppad to NULL. However, later, in clear_yystack(), when the ops are freed, the old PL_comppad is restored by PAD_RESTORE_LOCAL, as a reference is still in ps->comppad. But now the pad AV is already dead. Normally (i.e. without PERL_POISON), the dead AV will have AvARRAY(av) set to NULL by av_undef(). So PAD_RESTORE_LOCAL will actually set PL_curpad to NULL, and thus pad_free() will not attempt to do anything. But with PERL_POISON, the storage for AvARRAY(av) (i.e. sv_u) will be reused for chaining the free SV heads in the arena (as opposed to SvANY(sv) in case of !PERL_POISON). This means that PAD_RESTORE_LOCAL will find AvARRAY(av) non-NULL and will set PL_curpad to that value, finally causing the segfault in pad_free(). While I think I understand what's going on, I don't have the slightest clue how to properly fix this. Given that it's not a problem only under PERL_POISON, but always (as dead SV heads are being used), I think it should ultimately be fixed. The only thing I can offer right now is a patch to make it work with PERL_POISON as good (or as bad) as without by making PAD_RESTORE_LOCAL explicitly check if the pad passed in is already dead and refusing to use it if it is. (cherry picked from commit a8ba03fb2070c532259a5d9d434d5b61c757d31d)
* Add MUTABLE_AV(), and remove (AV *) casts from headers.Nicholas Clark2009-03-291-3/+3
| | | | | | p4raw-id: //depot/perl@34608 (cherry picked from commit a062e10d14f53c3718ae4dbf13be27233d85afcc)
* Add a macro MUTABLE_PTR(p), which on (non-pedantic) gcc will not castNicholas Clark2009-03-291-8/+8
| | | | | | | | | | | | | 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 (cherry-picked from commit b1bc3f345d4dfe19cd94c120c46649336b5cb92b)
* Integrate:Reini Urban2008-12-041-35/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ 34029] Subject: [PATCH] readable assertion names From: "Reini Urban" <rurban@x-ray.at> Date: Sun, 8 Jun 2008 14:41:51 +0200 Message-ID: <6910a60806080541n4f7e1939q254797411545ebea@mail.gmail.com> [ 34030] Subject: Re: [PATCH] readable assertion names, now the rest From: "Reini Urban" <rurban@x-ray.at> Date: Sun, 8 Jun 2008 16:17:32 +0200 Message-ID: <6910a60806080717h1aaaef1fh425a2ef21a62c9ed@mail.gmail.com> [ 34031] Subject: Re: [PATCH] readable assertion names, now sv.h From: "Reini Urban" <rurban@x-ray.at> Date: Sun, 8 Jun 2008 15:26:41 +0200 Message-ID: <6910a60806080626kfda0dd1ja906513e8fd0aa39@mail.gmail.com> p4raw-link: @34031 on //depot/perl: e5ae200f29f943d2dad731c89f20babe8c7c8786 p4raw-link: @34030 on //depot/perl: 7948fc082b7916e5f602700f36d83fdcf421314c p4raw-link: @34029 on //depot/perl: 603aa20df51288786331f1d6680081156c2ce5a9 p4raw-id: //depot/maint-5.10/perl@35005 p4raw-integrated: from //depot/perl@34031 'edit in' sv.h (@33627..) p4raw-integrated: from //depot/perl@34030 'edit in' regexp.h (@33292..) 'ignore' op.h (@33679..) 'merge in' pad.h (@32982..) cv.h (@33051..) p4raw-integrated: from //depot/perl@34029 'merge in' gv.h (@33702..)
* Integrate:Nicholas Clark2008-10-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ 34585] Update copyright years. [ 34586] Update copyright year in embed.pl, and everything that it builds. p4raw-link: @34586 on //depot/perl: 67edeb9aab7e64ec46e81a9ccb767449a20cad5f p4raw-link: @34585 on //depot/perl: 1129b882ced9d5881a47214405219a2e6e332a92 p4raw-id: //depot/maint-5.10/perl@34599 p4raw-integrated: from //depot/perl@34593 'copy in' perlapi.c (@31245..) perlsdio.h (@32793..) XSUB.h (@32820..) perly.c (@33370..) cc_runtime.h (@34002..) pp.h (@34055..) 'merge in' av.h (@33051..) mg.h (@33256..) deb.c locale.c numeric.c pad.c pp_pack.c regexec.c taint.c (@33291..) embed.pl (@33539..) mathoms.c (@33627..) scope.h (@33654..) cop.h (@33656..) gv.c (@33814..) doop.c (@33831..) perly.y (@33858..) global.sym (@33901..) pp_sort.c (@33937..) gv.h (@34029..) op.h pad.h regexp.h (@34030..) perl.h (@34069..) doio.c mg.c pp.c pp_sys.c xsutils.c (@34092..) pp_ctl.c (@34140..) cv.h dump.c (@34167..) toke.c (@34224..) universal.c (@34354..) mro.c (@34357..) op.c (@34358..) av.c (@34381..) hv.c (@34383..) utf8.c (@34416..) scope.c (@34494..) pp_hot.c (@34506..) regcomp.c (@34507..) intrpvar.h sv.h (@34568..) embed.h embedvar.h perlapi.h (@34569..) util.c (@34574..) sv.c (@34576..) p4raw-integrated: from //depot/perl@34585 'ignore' proto.h (@34574..) 'merge in' perlio.c (@33978..) handy.h (@34577..)
* Integrate:Nicholas Clark2008-01-301-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ 32688] Update the hash documentation to reflect the changes between 5.8.1 and 5.8.2, that disabled the automatic randomisation of all hashes. [ 32729] Subject: [PATCH] docs: replace FH by my $fh in open From: "Gabor Szabo" <szabgab@gmail.com> Date: Wed, 26 Dec 2007 06:03:29 +0200 Message-ID: <d8a74af10712252003m2d3244fbv2955fe17e683063d@mail.gmail.com> [ 32730] Subject: [PATCH] docs: list of places where $_ is used From: "Gabor Szabo" <szabgab@gmail.com> Date: Wed, 26 Dec 2007 06:49:34 +0200 Message-ID: <d8a74af10712252049t1b63b475mfca9225324f5fce6@mail.gmail.com> [ 32732] Subject: [PATCH perl5100delta.pod] change/correction to 32246 From: "Robin Barker" <Robin.Barker@npl.co.uk> Date: Fri, 9 Nov 2007 14:40:22 -0000 Message-ID: <2C2E01334A940D4792B3E115F95B722601604912@exchsvr1.npl.ad.local> [ 32759] Note to future self about moving the regexp flag bits around. [ 32793] Add editor blocks to some header files. [ 32805] Subject: [PATCH] Small documentation nits From: Sébastien Aperghis-Tramoni <maddingue@free.fr> Date: Mon, 31 Dec 2007 21:05:47 +0100 Message-Id: <2AF110D6-9183-47C5-BBBA-26C3FB97C3D3@free.fr> [ 32844] Remove a comment that is no longer necessary since Perl Object bit the dust some time around 5.6 [ 32875] Document that sitecustomize.pl in run from a BEGIN block [ 32887] Subject: - perlcommunity.patch (1/1) [PATCH] perlcommunity: "Perl Mongers" and calendar corrections From: brian d foy <brian.d.foy@gmail.com> Date: Fri, 04 Jan 2008 14:07:27 -0600 Message-ID: <040120081407272341%brian.d.foy@gmail.com> [ 32895] Clarify the use of SVf_BREAK on PL_reg_curpm. [ 32904] Subject: Re: [PATCH] docs more open() and $_ related entries From: "Gabor Szabo" <szabgab@gmail.com> Date: Tue, 8 Jan 2008 22:07:54 +0200 Message-ID: <d8a74af10801081207q2637419dy59f1a3600bcc4a76@mail.gmail.com> [ 32916] Add a few =cuts (so configpm is displayed mostly correctly by perldoc or by search.cpan.org) [ 32944] Better descriptions for PL_regex_pad and PL_regex_padav. [ 32982] A couple of POD fixes by Steven Schubiger [ 32993] Add Weed out needless PERL_UNUSED_ARG to perltodo. It's a good "cage cleaner" task. [ 33066] Subject: [PATCH] socketpair() *is* available on Win32 From: "Jan Dubois" <jand@activestate.com> Date: Thu, 24 Jan 2008 14:17:23 -0800 Message-ID: <032201c85ed6$e56edf40$b04c9dc0$@com> [ 33082] fix misleading comment in op.h [ 33095] Minor rewording of the localtime() documentation, based on : Subject: [perl #49914] gmtime()/localtime() do not use time() From: Abe Timmerman (via RT) <perlbug-followup@perl.org> Date: Thu, 17 Jan 2008 18:05:07 -0800 Message-ID: <rt-3.6.HEAD-18434-1200621906-376.49914-75-0@perl.org> [ 33101] Subject: [PATCH] mistaken variable in pod From: "Yitzchak Scott-Thoennes" <sthoenna@efn.org> Date: Mon, 28 Jan 2008 13:39:29 -0800 (PST) Message-ID: <40783.64.81.167.122.1201556369.squirrel@webmail.efn.org> [ 33104] More wording nits about perl's time() versus the libc's time() p4raw-link: @33104 on //depot/perl: e3176d09175983fa5c9fa7bc6d286b6349cbc891 p4raw-link: @33101 on //depot/perl: a0604b4cdf35e86e96dd5002c652cb32430e1735 p4raw-link: @33095 on //depot/perl: e199845280bc7d6fec24a11bbe30c154943f9814 p4raw-link: @33082 on //depot/perl: b900987b60cce8e0dffc3b8fd3835992d58ce664 p4raw-link: @33066 on //depot/perl: f38e12df2246599f9c1104d703d0b8bb03353e86 p4raw-link: @32993 on //depot/perl: 3d826b294b9e4cbc002b8f9eeaf0e88c52d9ee96 p4raw-link: @32982 on //depot/perl: d77cdebfaf0c7eb784a132b575c93953a56db215 p4raw-link: @32944 on //depot/perl: e68531976a39b1bb777ce9a7b75bd5a3eaf8de8b p4raw-link: @32916 on //depot/perl: c90cd22b2f0d69bba1abd4ca7cd7ece1531bbb93 p4raw-link: @32904 on //depot/perl: b0169937a1833d262bdcef83fc6595ccc076cb56 p4raw-link: @32895 on //depot/perl: 36c662f48c9a23ec4251c3cf747c3f42c63a6fd9 p4raw-link: @32887 on //depot/perl: 10a3d64ebfb9fbd83a25907c9ad1c5709db66e15 p4raw-link: @32875 on //depot/perl: e846cbe53fd65a133ee59961dd2b0d9ae211552a p4raw-link: @32844 on //depot/perl: e16f71082347dd9854a05b7cece1dc02f0f9f3a8 p4raw-link: @32805 on //depot/perl: d991eed6a698716065b2039839dd7d319bc188db p4raw-link: @32793 on //depot/perl: e9a8c0991ec6634f51266c0ad53e02c328bc0761 p4raw-link: @32759 on //depot/perl: a1cf41cd41cfa3d3c737acde06e0d3bbd02dd08d p4raw-link: @32732 on //depot/perl: 62ba2c934831b412d226e94c53b2ed4d0a5c0726 p4raw-link: @32730 on //depot/perl: db1511c850bfe94373082caa16c1f91ab1ce8510 p4raw-link: @32729 on //depot/perl: 460b70c2ae94a254c087c06a9e5a5c4c3d88a0b5 p4raw-link: @32688 on //depot/perl: 22883ac550dc5dbe0c35890635d3c37c4084f3a1 p4raw-id: //depot/maint-5.10/perl@33123 p4raw-integrated: from //depot/perl@33122 'copy in' fakethr.h (@19242..) nostdio.h (@26736..) fakesdio.h (@27355..) thread.h (@27834..) pod/perlsec.pod (@28800..) ext/POSIX/POSIX.pod (@31137..) configpm (@31366..) parser.h (@31618..) pod/perlcommunity.pod (@31626..) iperlsys.h (@32013..) perliol.h (@32215..) dosish.h mg.h perlio.h perlsdio.h perlsfio.h unixish.h utf8.h utfebcdic.h util.h (@32237..) pod/perlport.pod (@32492..) pod/perlsyn.pod (@32559..) pod/perlvar.pod (@32730..) pad.h (@32793..) 'edit in' op.h (@33030..) 'merge in' pod/perltodo.pod (@32731..) p4raw-integrated: from //depot/perl@33095 'edit in' pod/perlfunc.pod (@32969..) p4raw-integrated: from //depot/perl@32982 'copy in' pod/perlintern.pod (@32148..) 'merge in' pod/perlapi.pod (@32925..) sv.c (@32969..) p4raw-integrated: from //depot/perl@32944 'merge in' intrpvar.h (@32681..) p4raw-integrated: from //depot/perl@32895 'merge in' regexec.c sv.h (@32861..) p4raw-integrated: from //depot/perl@32875 'copy in' pod/perlrun.pod (@32461..) p4raw-integrated: from //depot/perl@32844 'merge in' embed.fnc (@32840..) p4raw-integrated: from //depot/perl@32793 'copy in' scope.h (@29695..) regcomp.h (@32237..) 'merge in' handy.h (@32707..) perl.h (@32789..) p4raw-integrated: from //depot/perl@32759 'merge in' regexp.h (@32758..) p4raw-integrated: from //depot/perl@32732 'ignore' pod/perl5100delta.pod (@32649..)
* Update copyright years in .h files. Also, in .plRafael Garcia-Suarez2007-01-051-1/+1
| | | | | | files that generate .h files, so they'll be ready next time. p4raw-id: //depot/perl@29695
* Rename OURSTASH to SvOURSTASH and OURSTASH_set to SvOURSTASH_set.Nicholas Clark2007-01-031-1/+1
| | | p4raw-id: //depot/perl@29679
* With PAD_COMPNAME_GEN in SvUVX, SvCUR is trustworthy once more.Nicholas Clark2006-12-281-3/+4
| | | p4raw-id: //depot/perl@29633
* Move PAD_COMPNAME_GEN from SvCUR to SvUVX.Nicholas Clark2006-12-281-4/+4
| | | p4raw-id: //depot/perl@29632
* Move PAD_FAKELEX_ANON and PAD_FAKELEX_MULTI to pad.h, export them viaNicholas Clark2006-12-281-0/+5
| | | | | B.pm, so that B::Concise doesn't need to hard code magic numbers. p4raw-id: //depot/perl@29631
* Move the low/high cop sequences from NVX/IVX to a two U32 structureNicholas Clark2006-12-281-4/+53
| | | | | | 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
* Abstract the pad code's overloaded use of SvNVX and SvIVX intoNicholas Clark2006-12-281-1/+9
| | | | | | 4 macros COP_SEQ_RANGE_LOW, COP_SEQ_RANGE_HIGH, PARENT_PAD_INDEX and PARENT_FAKELEX_FLAGS p4raw-id: //depot/perl@29629
* es: quiet some warnings (with a free AIX cpp insanity avoidance tip)Jarkko Hietaniemi2006-04-101-5/+5
| | | | | | Message-ID: <44375F23.6030900@gmail.com> Date: Sat, 08 Apr 2006 09:58:43 +0300 p4raw-id: //depot/perl@27754
* Add MAD changes to pad code (new function Perl_pad_peg)Nicholas Clark2006-03-081-0/+6
| | | p4raw-id: //depot/perl@27419
* Replace usage of GvSTASH for storing the stash of C<our> withNicholas Clark2006-02-241-1/+1
| | | | | OURSTASH. Set the stash with OURSTASH_SET. p4raw-id: //depot/perl@27306
* As SVs can't both be in a pad, and the name of a variable in the pad,Nicholas Clark2006-02-241-1/+2
| | | | | overlay SVs_PADTMP with SVpad_TYPED and SVs_PADMY with SVpad_OUR. p4raw-id: //depot/perl@27297
* Replace direct flags tests & manipulations for SVpad_TYPED andNicholas Clark2006-02-231-0/+1
| | | | | | SVpad_OUR with macros SvPAD_TYPED(), SvPAD_OUR() etc, to abstract away the flags bits acutally used to store this information. p4raw-id: //depot/perl@27294
* More NullXXX macro removal from Andy LesterRafael Garcia-Suarez2006-02-201-4/+4
| | | p4raw-id: //depot/perl@27238
* Re: [PATCH] s/Null(gv|hv|sv)/NULL/gSteven Schubiger2006-02-031-1/+1
| | | | | | Message-ID: <20060203152449.GI12591@accognoscere.homeunix.org> Date: Fri, 3 Feb 2006 16:24:49 +0100 p4raw-id: //depot/perl@27065
* Update copyright with the 2 years where changes were made.Nicholas Clark2006-01-081-1/+1
| | | p4raw-id: //depot/perl@26737
* Sync change 25229 to .h source filesRafael Garcia-Suarez2005-07-281-1/+1
| | | p4raw-id: //depot/perl@25233
* the PAD_SET_CUR macro expanded too much for AIX compilersDave Mitchell2005-07-011-1/+6
| | | p4raw-id: //depot/perl@25042
* pad_compname_type(), takes care of a clunky macroAndy Lester2005-04-191-4/+1
| | | | | Message-Id: <20050419163844.GA19747@petdance.com> p4raw-id: //depot/perl@24256
* Refactoring to Sv*_set() macros - patch #5Steve Peters2005-04-191-1/+6
| | | | | | Message-ID: <20050419000925.GA21640@mccoy.peters.homeunix.org> Date: Mon, 18 Apr 2005 19:09:25 -0500 p4raw-id: //depot/perl@24248
* Casting to/from (void *) sufficient to make a C++ compiler happy.Nicholas Clark2005-04-061-1/+1
| | | p4raw-id: //depot/perl@24175
* Ensure PL_comppad/curpad point to PL_main_cv's padlist whenDave Mitchell2003-10-161-2/+9
| | | | | | PL_main_root is freed; this may not have been be the case if a thread other than the main one is the last to be destroyed p4raw-id: //depot/perl@21470
* Fix up Larry's copyright statements to my best knowledge.Jarkko Hietaniemi2003-04-161-1/+1
| | | | | | | (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
* Re: [jhi@iki.fi: enums are not nums]Dave Mitchell2002-12-171-5/+3
| | | | | Message-ID: <20021214191649.B3992@fdgroup.com> p4raw-id: //depot/perl@18311
* Re: threads and Win2000 (Smoke 18064 FAIL(F) MSWin32 5.0 W2000Pro)Dave Mitchell2002-11-121-7/+9
| | | | | Message-ID: <20021107163802.C25337@fdgroup.com> p4raw-id: //depot/perl@18142
* PL_curpad == AvARRAY(PL_comppad) alwaysDave Mitchell2002-10-221-19/+67
| | | | | Message-ID: <20021018133640.A19172@fdgroup.com> p4raw-id: //depot/perl@18048
* Non ANSI feature detection in enumH.Merijn Brand2002-10-041-1/+1
| | | p4raw-id: //depot/perl@17975
* move all pad-related code to its own src fileDave Mitchell2002-10-021-0/+214
Message-ID: <20020925234023.A20044@fdgroup.com> p4raw-id: //depot/perl@17953