From owner-freebsd-amd64@FreeBSD.ORG Fri Jan 16 08:55:21 2009 Return-Path: Delivered-To: amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAB3A106567A; Fri, 16 Jan 2009 08:55:21 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from mp2.macomnet.net (cl-2958.ham-01.de.sixxs.net [IPv6:2001:6f8:900:b8d::2]) by mx1.freebsd.org (Postfix) with ESMTP id 715508FC12; Fri, 16 Jan 2009 08:55:21 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.14.2/8.14.2) with ESMTP id n0G8tJfh034193; Fri, 16 Jan 2009 11:55:20 +0300 (MSK) (envelope-from maxim@macomnet.ru) Date: Fri, 16 Jan 2009 11:55:19 +0300 (MSK) From: Maxim Konovalov To: Garrett Cooper In-Reply-To: <7d6fde3d0901160044x4d7735cep16f032cd99dbc835@mail.gmail.com> Message-ID: <20090116115448.A32187@mp2.macomnet.net> References: <7d6fde3d0901160041n55466290l55f737d274a40895@mail.gmail.com> <7d6fde3d0901160044x4d7735cep16f032cd99dbc835@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Fri, 16 Jan 2009 12:23:29 +0000 Cc: "amd64@freebsd.org" , Hackers freeBSD Subject: Re: Confused by segfault with legitimate call to strerror(3) on amd64 / sysctl(3) setting `odd' errno's X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2009 08:55:22 -0000 On Fri, 16 Jan 2009, 00:44-0800, Garrett Cooper wrote: > On Fri, Jan 16, 2009 at 12:41 AM, Garrett Cooper wrote: > > Hi amd64 and Hackers, > > Uh, I'm really confused why 1) this error (errno => ENOMEM) would > > occur when I have more than enough free memory (both on x86 and amd64) > > and 2) why strerror would segfault in the call to errx in the attached > > sourcefile on amd64 only. Not initializing len causes the second > > output sample (errno => 14, which is EFAULT). > > Any ideas? - size_t len; + size_t len = 4; -- Maxim Konovalov