linuxthread race condition

Andreas Schwab schwab@suse.de
Fri Nov 30 01:42:00 GMT 2001


Jakub Jelinek <jakub@redhat.com> writes:

|> On Fri, Nov 30, 2001 at 10:42:51AM +0100, Andreas Schwab wrote:
|> > +  if (sp >= __pthread_initial_thread_bos)
|> > +    return &__pthread_initial_thread;
|> 
|> How could it be initial thread? Even if it could (it cannot), for
|> FLOATING_STACKS, this is totally bogus test (sp >= -1) and for non-floating
|> stacks there is no guarantee that there are no thread stacks above initial
|> thread stack (think about sparc64, where sp initial thread stack is below VM
|> hole, while thread stacks can be in the mmap area (after VM hole)).

Yes, you're right, these two lines should be taken out.  We can never have
the initial thread here.

Andreas.

-- 
Andreas Schwab                                  "And now for something
Andreas.Schwab@suse.de				completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5



More information about the Libc-hacker mailing list