Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 16 Oct 2012 19:29:28 -0400
From: Rich Felker <>
Subject: Re: TLS (thread-local storage) support

On Wed, Oct 17, 2012 at 12:09:22AM +0200, Szabolcs Nagy wrote:
> most functions in musl may be run before pthread_self_init
> (it runs on demand when a pthread function is used)

This is tangential, but I've been considering changing that for a long
time. My thought is to have startup code always attempt to setup the
thread pointer (except in static binaries where it's statically
determined that nothing will use it). If it failed with ENOSYS
(missing syscall due to old kernel), musl would save a flag indicating
such and have minimal support code to prevent crashing when using
"plain libc" functions that have nothing to do with threads, so that
old/simple software can run even on Linux 2.4. If it failed with any
other reason (shouldn't be able to happen, but Linux is always
introducing stupid resource-exhaustion reasons things can fail...)
a_crash would be called before execution passes to the application


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.