misc/124114: 7.0 shared libs cannot read errno when loaded into a 6.0 pthreaded program

Kris Kennaway kris at FreeBSD.org
Fri May 30 19:30:03 UTC 2008


The following reply was made to PR misc/124114; it has been noted by GNATS.

From: Kris Kennaway <kris at FreeBSD.org>
To: Martin Simmons <martin at lispworks.com>
Cc: freebsd-gnats-submit at 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


More information about the freebsd-bugs mailing list