diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-07-05 22:51:50 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-08-09 19:44:13 -0700 |
commit | 1dc74fdba201402174cfbd293adc42f5a0bafc22 (patch) | |
tree | bf675ece5baae52ad8e311dd1b9de36514736c4c /scope.h | |
parent | 449dd03960bf018889fc68eb9ff03ef613eb893b (diff) | |
download | perl-1dc74fdba201402174cfbd293adc42f5a0bafc22.tar.gz |
Revert "[perl #117855] Store CopFILEGV in a pad under ithreads"
This reverts commit c82ecf346.
It turn out to be faulty, because a location shared betweens threads
(the cop) was holding a reference count on a pad entry in a particu-
lar thread. So when you free the cop, how do you know where to do
SvREFCNT_dec?
In reverting c82ecf346, this commit still preserves the bug fix from
1311cfc0a7b, but shifts it around.
Diffstat (limited to 'scope.h')
-rw-r--r-- | scope.h | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -39,14 +39,12 @@ #define SAVEt_PARSER 19 #define SAVEt_STACK_POS 20 #define SAVEt_READONLY_OFF 21 -#ifdef USE_ITHREADS -# define SAVEt_COPFILEFREE 22 -#endif -#define SAVEt_ARG1_MAX 22 +#define SAVEt_ARG1_MAX 21 /* two args */ +#define SAVEt_APTR 22 #define SAVEt_AV 23 #define SAVEt_DESTRUCTOR 24 #define SAVEt_DESTRUCTOR_X 25 @@ -71,18 +69,17 @@ #define SAVEt_SVREF 44 #define SAVEt_VPTR 45 #define SAVEt_ADELETE 46 -#define SAVEt_APTR 47 -#define SAVEt_ARG2_MAX 47 +#define SAVEt_ARG2_MAX 46 /* three args */ +#define SAVEt_DELETE 47 #define SAVEt_HELEM 48 #define SAVEt_PADSV_AND_MORTALIZE 49 #define SAVEt_SET_SVFLAGS 50 #define SAVEt_GVSLOT 51 #define SAVEt_AELEM 52 -#define SAVEt_DELETE 53 #define SAVEf_SETMAGIC 1 #define SAVEf_KEEPOLDELEM 2 @@ -295,11 +292,8 @@ scope has the given name. Name must be a literal string. #ifdef USE_ITHREADS # define SAVECOPSTASH_FREE(c) SAVEIV((c)->cop_stashoff) -# define SAVECOPFILE(c) SAVEIV((c)->cop_filegvoff) -# define SAVECOPFILE_FREE(c) ( \ - SAVEIV((c)->cop_filegvoff), \ - save_pushptr((void *)(c), SAVEt_COPFILEFREE) \ - ) +# define SAVECOPFILE(c) SAVEPPTR(CopFILE(c)) +# define SAVECOPFILE_FREE(c) SAVESHAREDPV(CopFILE(c)) #else # /* XXX not refcounted */ # define SAVECOPSTASH_FREE(c) SAVESPTR(CopSTASH(c)) |