From owner-freebsd-questions@FreeBSD.ORG Sun Oct 5 20:06:59 2003 Return-Path: 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 1C82D16A4B3; Sun, 5 Oct 2003 20:06:59 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 382DE43FAF; Sun, 5 Oct 2003 20:06:58 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h9636vUH097251; Sun, 5 Oct 2003 22:06:57 -0500 (CDT) (envelope-from dan) Date: Sun, 5 Oct 2003 22:06:57 -0500 From: Dan Nelson To: Marcus =?utf-8?Q?M=C3=BCller?= Message-ID: <20031006030656.GK5283@dan.emsphone.com> References: <27DDB356-F790-11D7-9174-003065838A88@mulle-kybernetik.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <27DDB356-F790-11D7-9174-003065838A88@mulle-kybernetik.com> X-OS: FreeBSD 5.1-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i cc: freebsd-questions@freebsd.org cc: znek@freebsd.org Subject: Re: Pointer please X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2003 03:06:59 -0000 In the last episode (Oct 06), Marcus Mller said: > I'm currently facing a non-trivial problem with the current > Objective-C runtime on FreeBSD 5.1-CURRENT. The problem popped up > when trying to create a native port of OGo > (http://www.opengroupware.org) to FreeBSD. Specifically, certain > returned memory should be nil (0), but in fact is 0xd0d0d0d0. Could be one of two problems. The program either malloced memory and tried to use it without zeroing it, or it freed some memory and tried to keep using it. In -current, the malloc has the J debugging flag set, which fills malloced and freed memory with 0xd0 (see the malloc manpage). See http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/52907 for a patch that will let you distinguish freed vs malloced memory, and pinpoint the exact allocation that's causing you trouble. -- Dan Nelson dnelson@allantgroup.com