Bug#537996: More details

Tomaž Šolc tomaz.solc at tablix.org
Thu Jul 30 08:32:38 UTC 2009


> I'll apply your SvTRUE workaround for speedy-cgi-perl, but I'm cloning
> a separate bug against perl. If the C program is doing something wrong,
> I suppose perlembed.pod should have a note about it.

Thanks Niko.

In case it will help anyone, here's what valgrind says about the crash
in your C program.

Tomaž

==4874== Memcheck, a memory error detector.
==4874== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al.
==4874== Using LibVEX rev 1884, a library for dynamic binary translation.
==4874== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP.
==4874== Using valgrind-3.4.1-Debian, a dynamic binary instrumentation
framework.
==4874== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
==4874== For more details, rerun with: -v
==4874==
==4874== Invalid read of size 4
==4874==    at 0x412A12C: S_find_uninit_var (sv.c:12139)
==4874==    by 0x412A2DF: Perl_report_uninit (sv.c:12182)
==4874==    by 0x410ECC9: S_sv_2iuv_common (sv.c:2121)
==4874==    by 0x410F089: Perl_sv_2iv_flags (sv.c:2208)
==4874==    by 0x80487E4: main (test.c:15)
==4874==  Address 0x43ca890 is 0 bytes after a block of size 16 alloc'd
==4874==    at 0x402601E: malloc (vg_replace_malloc.c:207)
==4874==    by 0x40D4DBA: Perl_safesysmalloc (util.c:92)
==4874==    by 0x40F22CF: Perl_av_extend (av.c:164)
==4874==    by 0x40F2B8E: Perl_av_store (av.c:329)
==4874==    by 0x40AEC0A: Perl_pad_new (pad.c:198)
==4874==    by 0x40F8C25: S_parse_body (perl.c:2102)
==4874==    by 0x40F7DAE: perl_parse (perl.c:1657)
==4874==    by 0x804877F: main (test.c:12)
==4874==
==4874== Invalid read of size 4
==4874==    at 0x412A134: S_find_uninit_var (sv.c:12139)
==4874==    by 0x412A2DF: Perl_report_uninit (sv.c:12182)
==4874==    by 0x410ECC9: S_sv_2iuv_common (sv.c:2121)
==4874==    by 0x410F089: Perl_sv_2iv_flags (sv.c:2208)
==4874==    by 0x80487E4: main (test.c:15)
==4874==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
==4874==
==4874== Process terminating with default action of signal 11 (SIGSEGV)
==4874==  Access not within mapped region at address 0x8
==4874==    at 0x412A134: S_find_uninit_var (sv.c:12139)
==4874==    by 0x412A2DF: Perl_report_uninit (sv.c:12182)
==4874==    by 0x410ECC9: S_sv_2iuv_common (sv.c:2121)
==4874==    by 0x410F089: Perl_sv_2iv_flags (sv.c:2208)
==4874==    by 0x80487E4: main (test.c:15)
==4874==  If you believe this happened as a result of a stack overflow
in your
==4874==  program's main thread (unlikely but possible), you can try to
increase
==4874==  the size of the main thread stack using the --main-stacksize=
flag.
==4874==  The main thread stack size used in this run was 8388608.
==4874==
==4874== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 23 from 1)
==4874== malloc/free: in use at exit: 121,722 bytes in 613 blocks.
==4874== malloc/free: 707 allocs, 94 frees, 134,910 bytes allocated.
==4874== For counts of detected errors, rerun with: -v
==4874== searching for pointers to 613 not-freed blocks.
==4874== checked 322,508 bytes.
==4874==
==4874== LEAK SUMMARY:
==4874==    definitely lost: 0 bytes in 0 blocks.
==4874==      possibly lost: 0 bytes in 0 blocks.
==4874==    still reachable: 121,722 bytes in 613 blocks.
==4874==         suppressed: 0 bytes in 0 blocks.
==4874== Rerun with --leak-check=full to see details of leaked memory.




More information about the Perl-maintainers mailing list