From owner-freebsd-questions Thu Oct 17 20:40:42 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30F9B37B401 for ; Thu, 17 Oct 2002 20:40:41 -0700 (PDT) Received: from obsecurity.dyndns.org (adsl-64-165-226-88.dsl.lsan03.pacbell.net [64.165.226.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7D1743E42 for ; Thu, 17 Oct 2002 20:40:40 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 268DD66C7B; Thu, 17 Oct 2002 20:40:40 -0700 (PDT) Date: Thu, 17 Oct 2002 20:40:40 -0700 From: Kris Kennaway To: Scott Pilz Cc: freebsd-questions@FreeBSD.ORG Subject: Re: malloc Message-ID: <20021018034039.GB57990@xor.obsecurity.org> References: <20021017203931.E96249-100000@mail.tznet.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6sX45UoQRIJXqkqR" Content-Disposition: inline In-Reply-To: <20021017203931.E96249-100000@mail.tznet.com> User-Agent: Mutt/1.4i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --6sX45UoQRIJXqkqR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 17, 2002 at 08:43:01PM -0500, Scott Pilz wrote: >=20 > This is almost depressing... >=20 >=20 > What would cause: >=20 > in free(): warning: junk pointer, too high to make sense >=20 > (more so, is there a way to "fix" this, not what would cause this) Yes, fix the bug in the application that is making incorrect use of free(). In this instance the application is trying to free a pointer that was never malloced in the beginning, so cannot sensibly be freed. See the malloc(3) manpage for more details. > from happening on a rare program that works well on other operating > systems, just not BSD (yes it is using malloc)? It _appears_ to work on other operating systems, but BSD's malloc is more intelligent about checking how applications use malloc/free, and issues a warning when they do something wrong/stupid. It's only a warning, so if you're content to live with the buggy application you can just ignore it. Kris --6sX45UoQRIJXqkqR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9r4K3Wry0BWjoQKURApcRAJ9hJf0Pdv5c0nBWLgNFE9tDPr9+6gCfQ/In k7n7aLvk3imUvaQ9Skp/Mos= =7NfQ -----END PGP SIGNATURE----- --6sX45UoQRIJXqkqR-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message