Please do not reply directly to this email. All additional comments should be made in the comments box of this bug. https://bugzilla.redhat.com/show_bug.cgi?id=598160 --- Comment #11 from Petr Pisar <ppisar@xxxxxxxxxx> 2010-06-17 03:41:24 EDT --- Yet shorter reproducer: #!/usr/bin/perl -w use Newt; Newt::Init(); my $form = Newt::Form(); $form->DESTROY(); sleep 2; Newt::Finished(); If you run this under debugger, you will get segfault in free(3) called from newt dynamic library: (gdb) bt full #0 0x000000385ac7a83c in __libc_free (mem=0x69e1e0) at malloc.c:3724 ar_ptr = <value optimized out> p = 0x69e1d0 hook = <value optimized out> #1 0x00007ffff1d1e6e6 in newtFormDestroy (co=0x6bd290) at form.c:828 form = 0x636db0 i = <value optimized out> #2 0x00007ffff1f37c90 in XS_Newt_newtFormDestroy (my_perl=<value optimized out>, cv=<value optimized out>) at Newt.c:3136 Perl_form_nocontext = <value optimized out> sp = <value optimized out> ax = <value optimized out> mark = <value optimized out> #3 0x0000003fb7ca6375 in Perl_pp_entersub (my_perl=0x603010) at pp_hot.c:2888 markix = 0 sp = <value optimized out> sv = 0x70b750 gv = 0x6c5220 cv = 0x70b768 cx = <value optimized out> gimme = 128 hasargs = 0 '\000' #4 0x0000003fb7ca4666 in Perl_runops_standard (my_perl=0x603010) at run.c:40 No locals. [...] If you remove the explicit $form->DESTROY(), it segfaults too but in perl itself: (gdb) run newt-reproducer arg Starting program: /usr/bin/perl newt-reproducer arg [Thread debugging using libthread_db enabled] Program received signal SIGSEGV, Segmentation fault. 0x0000003fb7cb89ec in Perl_sv_clear (my_perl=0x603010, sv=0x606d48) at sv.c:5422 5422 || CvSTART(destructor)->op_next->op_type != OP_LEAVESUB)) And if you run the code with explicit DESTROY() with non-empty command line argument AND in UTF-8 locale, you get beautiful invalid-pointer free() abort initiated by glibc: $ LANG=en_US.UTF-8 ./newt-reproducer arg *** glibc detected *** /usr/bin/perl: free(): invalid pointer: 0x000000385af7af68 *** ======= Backtrace: ========= /lib64/libc.so.6[0x385ac75726] /usr/lib64/libnewt.so.0.52(newtFormDestroy+0x56)[0x7f48c98416e6] /usr/lib64/perl5/auto/Newt/Newt.so(XS_Newt_newtFormDestroy+0x130)[0x7f48c9a5ac90] /usr/lib64/perl5/CORE/libperl.so(Perl_pp_entersub+0x5a5)[0x3fb7ca6375] /usr/lib64/perl5/CORE/libperl.so(Perl_runops_standard+0x16)[0x3fb7ca4666] /usr/lib64/perl5/CORE/libperl.so(Perl_call_sv+0x4cf)[0x3fb7c4c6af] /usr/lib64/perl5/CORE/libperl.so(Perl_sv_clear+0xb6)[0x3fb7cb8916] /usr/lib64/perl5/CORE/libperl.so(Perl_sv_free2+0x52)[0x3fb7cb9112] /usr/lib64/perl5/CORE/libperl.so(Perl_leave_scope+0xe45)[0x3fb7cd5bf5] /usr/lib64/perl5/CORE/libperl.so(Perl_pp_leave+0x105)[0x3fb7ca5c85] /usr/lib64/perl5/CORE/libperl.so(Perl_runops_standard+0x16)[0x3fb7ca4666] /usr/lib64/perl5/CORE/libperl.so(perl_run+0x338)[0x3fb7c4d1a8] /usr/bin/perl(main+0xdc)[0x400c5c] /lib64/libc.so.6(__libc_start_main+0xfd)[0x385ac1ec5d] /usr/bin/perl[0x400ab9] ======= Memory map: ======== 00400000-00401000 r-xp 00000000 fd:02 10077 /usr/bin/perl 00601000-00603000 rw-p 00001000 fd:02 10077 /usr/bin/perl 01aac000-01bf5000 rw-p 00000000 00:00 0 [heap] 385a800000-385a81e000 r-xp 00000000 fd:02 4525 /lib64/ld-2.12.so 385aa1e000-385aa1f000 r--p 0001e000 fd:02 4525 /lib64/ld-2.12.so 385aa1f000-385aa20000 rw-p 0001f000 fd:02 4525 /lib64/ld-2.12.so 385aa20000-385aa21000 rw-p 00000000 00:00 0 <== 385ac00000-385ad75000 r-xp 00000000 fd:02 6828 /lib64/libc-2.12.so 385ad75000-385af75000 ---p 00175000 fd:02 6828 /lib64/libc-2.12.so 385af75000-385af79000 r--p 00175000 fd:02 6828 /lib64/libc-2.12.so 385af79000-385af7a000 rw-p 00179000 fd:02 6828 /lib64/libc-2.12.so 385af7a000-385af7f000 rw-p 00000000 00:00 0 385b000000-385b002000 r-xp 00000000 fd:02 21846 /lib64/libdl-2.12.so [...] -- Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel