|
From: Bob V. Z. <bva...@ir...> - 2005-10-25 23:27:15
|
I'm using valgrind v352 on FreeBSD 4.10. I have an XS module for Perl that I've written and I'm quite certain it's leaking memory. Obviously I'd like to use valgrind. valgrind is working fine for most all of my other needs (straight C executables) but it dies hard on perl. The command and output are listed below. I'm sure someone else has tried this but I've had trouble locating a cookbook of sorts for running against the perl binary. Thanks for any tips. -Bob $ uname -a FreeBSD test05.eng 4.10-RELEASE-p16 FreeBSD 4.10-RELEASE-p16 #1: Wed Aug 3 17:41:44 PDT 2005 root@test05.eng:/usr/obj/usr/src/sys/MARK-GODSPEED-4.9 i386 $ valgrind perl test.pl ==30418== Memcheck, a memory error detector for x86-linux. ==30418== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward. ==30418== Using valgrind-2.1.0, a program supervision framework for x86-linux. ==30418== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward. ==30418== Estimated CPU clock rate is 1014 MHz ==30418== For more details, rerun with: -v ==30418== ==30418== Warning: ignoring --pointercheck=yes, because i386_set_ldt failed (errno=45) ==30418== ==30418== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==30418== at 0x3C04EEF7: morecore (in /usr/local/lib/perl5/5.8.5/mach/CORE/libperl.so) ==30418== by 0x3C04E435: Perl_malloc (in /usr/local/lib/perl5/5.8.5/mach/CORE/libperl.so) ==30418== by 0x3C0A45C1: Perl_sv_upgrade (in /usr/local/lib/perl5/5.8.5/mach/CORE/libperl.so) ==30418== by 0x3C0502D9: Perl_gv_init (in /usr/local/lib/perl5/5.8.5/mach/CORE/libperl.so) ==30418== ==30418== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ==30418== malloc/free: in use at exit: 6939 bytes in 57 blocks. ==30418== malloc/free: 57 allocs, 0 frees, 6939 bytes allocated. ==30418== For a detailed leak analysis, rerun with: --leak-check=yes ==30418== For counts of detected errors, rerun with: -v Segmentation fault (core dumped) |
|
From: David E. <tw...@us...> - 2005-10-26 05:48:24
|
On Tue, 2005-10-25 at 16:27 -0700, Bob Van Zant wrote:
> I'm using valgrind v352 on FreeBSD 4.10. I have an XS module for Perl that
> I've written and I'm quite certain it's leaking memory. Obviously I'd like
> to use valgrind.
>
> valgrind is working fine for most all of my other needs (straight C
> executables) but it dies hard on perl. The command and output are listed
> below. I'm sure someone else has tried this but I've had trouble locating a
> cookbook of sorts for running against the perl binary. Thanks for any tips.
>
> -Bob
>
> $ uname -a
> FreeBSD test05.eng 4.10-RELEASE-p16 FreeBSD 4.10-RELEASE-p16 #1: Wed Aug 3
> 17:41:44 PDT 2005 root@test05.eng:/usr/obj/usr/src/sys/MARK-GODSPEED-4.9
> i386
>
> $ valgrind perl test.pl
> ==30418== Memcheck, a memory error detector for x86-linux.
> ==30418== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward.
> ==30418== Using valgrind-2.1.0, a program supervision framework for
> x86-linux.
> ==30418== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward.
> ==30418== Estimated CPU clock rate is 1014 MHz
> ==30418== For more details, rerun with: -v
> ==30418==
> ==30418== Warning: ignoring --pointercheck=yes, because i386_set_ldt failed
> (errno=45)
It will probably not solve your problem, but enabling "user LDT" (I
don't remember the exact option name) in your kernel will get rid of the
above warning; and AFAIK improve the usefullness of valgrind on FreeBSD.
--
Regards,
-\- David Eriksson -/-
SynCE - http://synce.sourceforge.net
ScummVM - http://scummvm.sourceforge.net
Desquirr - http://desquirr.sourceforge.net
|
|
From: Julian S. <js...@ac...> - 2005-10-26 12:11:21
|
> I'm using valgrind v352 on FreeBSD 4.10. Whoever ported 2.1 to FreeBSD (Doug Rabson?) might want to have a go porting 3.1 when it appears. 3.1 will be the most portable Valgrind so far. J |
|
From: Doug R. <df...@nl...> - 2005-10-27 08:01:44
|
On Wednesday 26 October 2005 13:12, Julian Seward wrote: > > I'm using valgrind v352 on FreeBSD 4.10. > > Whoever ported 2.1 to FreeBSD (Doug Rabson?) might want to have > a go porting 3.1 when it appears. 3.1 will be the most portable > Valgrind so far. I may well have a go at it, depending on other commitments. The current FreeBSD port, while useful, is getting pretty stale now. |