From bad4ae388d7276039782b23915670f267acaff1d Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Tue, 16 Aug 2011 14:57:47 -0700 Subject: [perl #96126] Allocate CvFILE more simply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See the thread starting at: http://www.nntp.perl.org/group/perl.perl5.porters/2011/07/msg175161.html Instead of assuming that only Perl subs have mallocked CvFILEs and only under threads, resulting in various hackery to borrow parts of the SvPVX buffer where that assumption proves wrong, we can simply add another flag (DYNFILE) to indicate whether CvFILE is mallocked, instead of trying to use the ISXSUB flag for two purposes. This simplifies the code greatly, eliminating bug #96126 in the pro- cess (which had to do with sv_dup not knowing about the hackery that this commit removes). I removed that comment from cv_ckproto_len about CONSTSUBs doubling up the buffer field, as it is no longer relevant. But I still left the code as it is, since it’s better to do an explicit length check. --- dump.c | 1 + 1 file changed, 1 insertion(+) (limited to 'dump.c') diff --git a/dump.c b/dump.c index c19cb8e16b..232ab0167d 100644 --- a/dump.c +++ b/dump.c @@ -1446,6 +1446,7 @@ const struct flag_to_name cv_flags_names[] = { {CVf_METHOD, "METHOD,"}, {CVf_WEAKOUTSIDE, "WEAKOUTSIDE,"}, {CVf_CVGV_RC, "CVGV_RC,"}, + {CVf_DYNFILE, "DYNFILE,"}, {CVf_ISXSUB, "ISXSUB,"} }; -- cgit v1.2.1