Date: Tue, 21 Feb 2006 19:04:40 +0100 From: Ulrich Spoerlein <q@galgenberg.net> To: Doug Barton <dougb@freebsd.org> Cc: Divacky Roman <xdivac02@stud.fit.vutbr.cz>, freebsd-current@freebsd.org Subject: Re: Bad code in rcorder(8) (Was: Re: New RCorder: abi loaded too late) Message-ID: <20060221180440.GB2996@galgenberg.net> In-Reply-To: <43F8ABC8.30005@FreeBSD.org> References: <1140187193.731.47.camel@spirit> <20060217181842.GA21033@odin.ac.hmc.edu> <43F65A70.7080608@FreeBSD.org> <20060217234118.GA22643@odin.ac.hmc.edu> <43F67121.5080809@FreeBSD.org> <43F682F2.1020804@FreeBSD.org> <43F68611.7080602@FreeBSD.org> <20060219110732.GA12550@stud.fit.vutbr.cz> <43F8ABC8.30005@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--KN5l+BnMqAQyZLvT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Doug Barton wrote: > Divacky Roman wrote: > > I tried running rcorder under valgrind and it showed me massive > > leaks/double-frees etc. unfortunately I am not able to run valgrind on = recent > > 7-current (when I start it it just creates 2.8G coredump) > >=20 > > it would be great to run coverity on rcorder or something to reveal the= bugs. I > > am willing to hack on it but I'd appreciate some help (either the valgr= ind > > running or list of coverity revealed bugs) >=20 > I actually requested a coverity check of the code, and it didn't turn up > anything. The code for rcorder is the same in both HEAD and RELENG_6, > although obviously you won't get the new malloc if you are running in the > latter. However, I'm guessing that if you fix things that are obviously b= ugs > that are exposed by valgrind on RELENG_6, it would still be valuable to > bring those fixes into HEAD first. Looks fine to me ... % valgrind --leak-check=3Dyes rcorder -s nostart /etc/rc.d/* /usr/local/etc= /rc.d/* =3D=3D7236=3D=3D Memcheck, a memory error detector for x86-linux. =3D=3D7236=3D=3D Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward. =3D=3D7236=3D=3D Using valgrind-2.1.0, a program supervision framework for = x86-linux. =3D=3D7236=3D=3D Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward. =3D=3D7236=3D=3D Estimated CPU clock rate is 998 MHz =3D=3D7236=3D=3D For more details, rerun with: -v =3D=3D7236=3D=3D=20 /etc/rc.d/rcconf.sh /etc/rc.d/dumpon /etc/rc.d/initrandom =2E.. /etc/rc.d/bsnmpd /etc/rc.d/bgfsck =3D=3D7236=3D=3D=20 =3D=3D7236=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 fro= m 0) =3D=3D7236=3D=3D malloc/free: in use at exit: 18734 bytes in 612 blocks. =3D=3D7236=3D=3D malloc/free: 4090 allocs, 3478 frees, 744580 bytes allocat= ed. =3D=3D7236=3D=3D For counts of detected errors, rerun with: -v =3D=3D7236=3D=3D searching for pointers to 612 not-freed blocks. =3D=3D7236=3D=3D checked 1323540 bytes. =3D=3D7236=3D=3D=20 =3D=3D7236=3D=3D 2032 bytes in 110 blocks are definitely lost in loss recor= d 1 of 3 =3D=3D7236=3D=3D at 0x3C032183: malloc (in /usr/local/lib/valgrind/vgpre= load_memcheck.so) =3D=3D7236=3D=3D by 0x80489DA: emalloc (ealloc.c:75) =3D=3D7236=3D=3D by 0x8048E56: strnode_add (rcorder.c:216) =3D=3D7236=3D=3D by 0x8049055: add_keyword (rcorder.c:388) =3D=3D7236=3D=3D=20 =3D=3D7236=3D=3D LEAK SUMMARY: =3D=3D7236=3D=3D definitely lost: 2032 bytes in 110 blocks. =3D=3D7236=3D=3D possibly lost: 0 bytes in 0 blocks. =3D=3D7236=3D=3D still reachable: 16702 bytes in 502 blocks. =3D=3D7236=3D=3D suppressed: 0 bytes in 0 blocks. =3D=3D7236=3D=3D Reachable blocks (those to which a pointer was found) are = not shown. =3D=3D7236=3D=3D To see them, rerun with: --show-reachable=3Dyes If the problem lies with a specific rc script, you should probably try to find out which one, or post them somewhere, so people can take a look. Ulrich Spoerlein --=20 PGP Key ID: 20FEE9DD Encrypted mail welcome! Fingerprint: AEC9 AF5E 01AC 4EE1 8F70 6CBD E76E 2227 20FE E9DD Which is worse: ignorance or apathy? Don't know. Don't care. --KN5l+BnMqAQyZLvT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFD+1Y4524iJyD+6d0RAiRLAKCpDaaZC2RHkjpxP5YaxK0wbEUKzwCgq1GN cL4YgFoQ6jhiH0lQNtjqmrM= =ThA6 -----END PGP SIGNATURE----- --KN5l+BnMqAQyZLvT--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060221180440.GB2996>