From owner-freebsd-ports@FreeBSD.ORG Tue Mar 30 00:45:24 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52BC6106564A for ; Tue, 30 Mar 2010 00:45:24 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 268EE8FC14 for ; Tue, 30 Mar 2010 00:45:23 +0000 (UTC) Received: by pwj4 with SMTP id 4so9109043pwj.13 for ; Mon, 29 Mar 2010 17:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=j6aZDoxT6CPIk20p/1jUYjsxM/w0FaXkeOlQjwOFwY0=; b=k7pDXDr4ImrWZB1OpqoJDaaEolPMITqBhVU8uPKgUwTFw9VpDSOv8Otribo5geGWAn ZBhNX5HzW7NOsHoiAheF/ntW14bAYIPxVaZHbywR8DIw3O9/FZ3Spbp36rYo65hgk0PT 27feGHqDUVhbNNFOIpp9bljwUxHz+avEgXkes= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=poYgBgtw+lrFGK27q+EyPyXq67tbHl46A0to/AUo+Onvyak7QoqLm0uOhLEx3AiUlA cKRv2PDYKI+vpNGIimQyY2OPGMEs7jvNyUX6MiFj/gSljz74GKZQQsOfgR6OiRluQwW3 7brNrzS2AnJ/9JF6Yo9BN44iXEjaxnVxmgLTg= MIME-Version: 1.0 Received: by 10.143.8.14 with HTTP; Mon, 29 Mar 2010 17:45:23 -0700 (PDT) In-Reply-To: References: Date: Mon, 29 Mar 2010 17:45:23 -0700 Received: by 10.142.208.12 with SMTP id f12mr187416wfg.128.1269909923232; Mon, 29 Mar 2010 17:45:23 -0700 (PDT) Message-ID: <7d6fde3d1003291745v53ec10bake00bdae6d825be95@mail.gmail.com> From: Garrett Cooper To: Christian Weisgerber Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-ports@freebsd.org Subject: Re: Be careful with fdopendir() on RELENG_7 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 00:45:24 -0000 On Mon, Mar 29, 2010 at 12:53 PM, Christian Weisgerber wrote: > There is a silly bug in RELENG_7 up to and including RELENG_7_3: > fdopendir(3) is available in libc, but the prototype is missing > from . > > This can have unexpected consequences. =A0A configure script can > notice that fdopendir() is available, but due to the missing > prototype, the function will be typed as the default > > =A0int fdopendir(); > > This is bad. =A0fdopendir() returns a pointer and unless correctly > prototyped, the return value will be truncated from 64 to 32 bits > on LP64 platforms. > > So if you notice that something picks up the fdopendir() function > you need to either disable it for 702102 to 703100 (inclusive) or > make sure that the correct prototype > > =A0DIR *fdopendir(int); > > is wedged in somehow. > > This isn't a hypothetical concern. =A0When I initially tried gtar > 1.23 on 7.3/amd64, it left a trail of coredumps because of this. Is there a bug outstanding for this? Thanks, -Garrett