From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 16 11:57:02 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 165301065670 for ; Fri, 16 Jan 2009 11:57:02 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from viefep19-int.chello.at (viefep19-int.chello.at [62.179.121.39]) by mx1.freebsd.org (Postfix) with ESMTP id 61FCA8FC17 for ; Fri, 16 Jan 2009 11:57:00 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from edge01.upc.biz ([192.168.13.236]) by viefep11-int.chello.at (InterMail vM.7.09.01.00 201-2219-108-20080618) with ESMTP id <20090116113931.XLNF9925.viefep11-int.chello.at@edge01.upc.biz>; Fri, 16 Jan 2009 12:39:31 +0100 Received: from lizard.fafoe.narf.at ([213.47.85.26]) by edge01.upc.biz with edge id 4BfV1b0060a5KZh01BfWp1; Fri, 16 Jan 2009 12:39:30 +0100 X-SourceIP: 213.47.85.26 Received: by lizard.fafoe.narf.at (Postfix, from userid 1001) id BBE45BCF7; Fri, 16 Jan 2009 12:39:28 +0100 (CET) Date: Fri, 16 Jan 2009 12:39:28 +0100 From: Stefan Farfeleder To: Danny Braniss Message-ID: <20090116113928.GA1361@lizard.fafoe.narf.at> Mail-Followup-To: Danny Braniss , Christoph Mallon , Christian Kandeler , Garrett Cooper , freebsd-hackers@freebsd.org References: <7d6fde3d0901160041n55466290l55f737d274a40895@mail.gmail.com> <49704AEC.3080709@gmx.de> <200901161039.00232.christian.kandeler@hob.de> <49705FA2.2020605@gmx.de> <7d6fde3d0901160235o6aa1f096q11c5096b70f3577@mail.gmail.com> <497065ED.7050705@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Christian Kandeler , Garrett Cooper , Christoph Mallon , freebsd-hackers@freebsd.org Subject: Re: Confused by segfault with legitimate call to strerror(3) on amd64 / sysctl (3) setting `odd' errno's X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2009 11:57:02 -0000 On Fri, Jan 16, 2009 at 01:33:38PM +0200, Danny Braniss wrote: > some facts: > #include > int > main() > { > printf("%s\n", strerror(2)); > return 0; > } > > 1- it works fine on i386 > 2- it bombs on amd64 > 3- with a local strerror.c (instead of the one in libc) > works fine > so, there is something realy wrong going on here! > (and it gows back to at least 7.0-stable) The compiler thinks strerror returns an int. Include .