From owner-freebsd-bugs@FreeBSD.ORG Fri May 30 19:30:03 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A2AC106566C for ; Fri, 30 May 2008 19:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 82FE18FC23 for ; Fri, 30 May 2008 19:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m4UJU3Mh085016 for ; Fri, 30 May 2008 19:30:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m4UJU3OQ085011; Fri, 30 May 2008 19:30:03 GMT (envelope-from gnats) Date: Fri, 30 May 2008 19:30:03 GMT Message-Id: <200805301930.m4UJU3OQ085011@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Kris Kennaway Cc: Subject: Re: misc/124114: 7.0 shared libs cannot read errno when loaded into a 6.0 pthreaded program X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Kris Kennaway List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2008 19:30:03 -0000 The following reply was made to PR misc/124114; it has been noted by GNATS. From: Kris Kennaway To: Martin Simmons Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: misc/124114: 7.0 shared libs cannot read errno when loaded into a 6.0 pthreaded program Date: Fri, 30 May 2008 21:21:32 +0200 Martin Simmons wrote: >> Description: > There is something wrong with the way that errno is resolved when running 6.0 programs on 7.0-RELEASE with the compat6x-i386-6.3.602114.200711 pkg. > > If a 7.0 shared library that uses errno is loaded into a 6.0 program that uses pthreads, then the value of errno in the library code will be incorrect. In particular, it will access the global errno value instead of the thread-specific one. This is the expected behaviour. You *cannot*, in general, expect binaries linked to a mixture of libraries from different releases to work. It is possible in restricted circumstances to carefully design your a library so that this will not happen, but random libraries do not have this property. Kris