Date: Sat, 30 Mar 2002 22:58:58 +0100 From: Miguel Mendez <flynn@energyhq.homeip.net> To: Kris Kennaway <kris@obsecurity.org> Cc: current@freebsd.org, tlambert2@mindspring.com Subject: Re: Bus error compiling thefish 0.2 on -current Message-ID: <20020330225858.A57430@energyhq.homeip.net> In-Reply-To: <20020330133109.A83442@xor.obsecurity.org>; from kris@obsecurity.org on Sat, Mar 30, 2002 at 01:31:09PM -0800 References: <20020330141745.A54712@energyhq.homeip.net> <20020330184051.A54936@energyhq.homeip.net> <20020330133109.A83442@xor.obsecurity.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 30, 2002 at 01:31:09PM -0800, Kris Kennaway wrote: Hi Terry and Kris, > Sounds like it could be the malloc.conf defaults on -current exposing > a bug in the program code. Yes, there was a bug in my code, it just didn't show up on -STABLE. Apparently, when one uses efence, allocated memory is zeroed, which would explain why the program worked when linked with efence. I've built a debug version of libdialog and found something interesting... #0 0x28324253 in dialog_checklist (title=3D0x80bcf54 "Knobs Menu",=20 prompt=3D0x80bcf60 "A checked entry means that knob is set to YES", height=3D-1,width=3D-1, list_height=3D15, cnt=3D-1697, it=3D0x81e6014, result=3D0x0) at checklist.c:82 82 status[i] =3D ditems[i].checked ? ditems[i].checked(&ditems[i]) : FALSE; There is something odd in that cnt value, as there aren't 1697 entries in the menu. The problem is the way the dialog structure is built, I malloc memory but don't zero it, so when I call the function that in the end calls dialog, it erroneously assumes that there are more entries than there really are, since it simply checks for !=3D0 data. The garbage present in the malloc'ed mem is the cause. Why this problem doesn't show on -STABLE is still beyond my comprehension, default malloc behaviour maybe? Anyway, problem solved, thanks for all. Cheers, --=20 Miguel Mendez - flynn@energyhq.homeip.net GPG Public Key :: http://energyhq.homeip.net/files/pubkey.txt EnergyHQ :: http://www.energyhq.tk FreeBSD - The power to serve! --bg08WKrSYDhXBjb5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE8pjUinLctrNyFFPERAsI9AJ9zAqdrLiErgzppyIi/zkCfELlVbgCfT2R1 6SD/INcUW1a3GrE17YmgXTQ= =UhAn -----END PGP SIGNATURE----- --bg08WKrSYDhXBjb5-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020330225858.A57430>