nayakgi / perl-compiler

Automatically exported from code.google.com/p/perl-compiler
Other
0 stars 0 forks source link

CC CvPADLIST for the END cv must be dynamic since 5.18 #298

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
5.18:
t/testcc.sh -A 
-Ds,-UB,-UConfig,-UCarp,-UIO::Handle,-UExporter,-Uwarnings,-UErrno 48

#4  0x00007ffff6f56793 in _int_free (av=<optimized out>, p=0xa9b5c0 
<padlist_list+416>, have_lock=0)
    at malloc.c:3779
#5  0x00000000005dd0a1 in Perl_safesysfree (where=0xa9b5d0 <padlist_list+432>) 
at util.c:276
#6  0x00000000005811c0 in Perl_cv_undef (cv=0xaa2720 <sv_list+12672>) at 
pad.c:470
#7  0x000000000066b6ac in Perl_sv_clear (orig_sv=0xaa2720 <sv_list+12672>) at 
sv.c:6165
#8  0x000000000066e2d2 in Perl_sv_free2 (sv=0xaa2720 <sv_list+12672>, rc=1) at 
sv.c:6590
#9  0x00000000006ba4f9 in S_SvREFCNT_dec (sv=0xaa2720 <sv_list+12672>) at 
inline.h:73
#10 0x00000000006c06ba in Perl_leave_scope (base=0) at scope.c:974
#11 0x00000000006bab8e in Perl_pop_scope () at scope.c:110
#12 0x00000000004da2ab in fast_perl_destruct (my_perl=0xaaf010) at 
cccode48.c:25228
#13 0x00000000004daef6 in main (argc=1, argv=0x7fffffffe758, 
env=0x7fffffffe768) at cccode48.c:25437
(gdb) f 6
#6  0x00000000005811c0 in Perl_cv_undef (cv=0xaa2720 <sv_list+12672>) at 
pad.c:470
470     Safefree(padlist);

Needs the same fix as in #296

Original issue reported on code.google.com by reini.urban on 13 Feb 2014 at 7:42

GoogleCodeExporter commented 9 years ago
Fixed with commit 51232f77af404e3e510f7448b1e9b4ceab155fc6
Author: Reini Urban <rurban@cpanel.net>
Date:   Thu Feb 13 14:39:52 2014 -0600

    CC 5.18: fix #298, dynamic CvPADLIST(&END) since 5.18 - END{} blocks

    similar fix to #296, just in C.
    cv_undef calls now unconditionally Safefree(padlist)
    and END blocks do a LEAVE explicitly

Original comment by reini.urban on 13 Feb 2014 at 8:50