This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] For BZ #17328, mark __errno_location with __attribute__((returns_nonnull)) for gcc >=4.9.0

On 02 Mar 2015 17:39, Rich Felker wrote:
> On Mon, Mar 02, 2015 at 05:23:58PM -0500, Zack Weinberg wrote:
> > .... so I gotta wonder if it mightn't be a better use of people's time
> > to make errno a proper thread-local variable instead.  What's blocking
> > that?
> I seem to recall there was some issue with buggy programs having
> conflicting symbol definitions of errno as a non-TLS symbol. But I
> don't see why something like the following wouldn't work:
> extern __thread int __errno_tls;
> #define errno __errno_tls

this problem already came & went.  when glibc was rolling out tls support and 
started marking errno as such, there were packages that failed like so:

errno: TLS definition in /lib/ section .tbss mismatches non-TLS reference in libqemu.a(helper2.o)

and they've all been fixed since -- we migrated packages to errno.h instead of 
open coding their own extern.

Attachment: signature.asc
Description: Digital signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]