From owner-freebsd-ports Sun Aug 25 10:13:50 2002 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2839D37B400; Sun, 25 Aug 2002 10:13:48 -0700 (PDT) Received: from leviathan.inethouston.net (leviathan.inethouston.net [66.64.12.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id B917A43E72; Sun, 25 Aug 2002 10:13:47 -0700 (PDT) (envelope-from dwcjr@inethouston.net) Received: by leviathan.inethouston.net (Postfix, from userid 1001) id A5CB83198CD; Sun, 25 Aug 2002 12:13:50 -0500 (CDT) Date: Sun, 25 Aug 2002 12:13:50 -0500 From: "David W. Chapman Jr." To: Alexander Kabaev Cc: "David W. Chapman Jr." , current@FreeBSD.ORG, ports@FreeBSD.ORG Subject: Re: pkg_version and no origin found == SEGFAULT Message-ID: <20020825171350.GA89121@leviathan.inethouston.net> Reply-To: "David W. Chapman Jr." Mail-Followup-To: Alexander Kabaev , "David W. Chapman Jr." , current@FreeBSD.ORG, ports@FreeBSD.ORG References: <20020825164731.GA88696@leviathan.inethouston.net> <20020825130007.35cdd0b9.ak03@gte.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020825130007.35cdd0b9.ak03@gte.com> X-Operating-System: FreeBSD 4.6-STABLE i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > Have you checked your /var/db/pkg//+CONTENTS files? For some > reason some ports on my relatively stale -CURRENT box had these files > truncated to zero length, and this caused some package tools (namely > pkg_version) to crash. The procedure to read plist simply returns with > all plist struct members set to zero without indicating any errors when > CONTENTS file is empty, and the pkg_version crashes trying to > defererence null 'origin' pointer. This is exactly the problem I'm seeing and would explain why portupgrade -f fixes the problem for the port that causes the segfault. Shouldn't pkg_version handle this a little more gracefully? -- David W. Chapman Jr. dwcjr@inethouston.net Raintree Network Services, Inc. dwcjr@freebsd.org FreeBSD Committer To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message