[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#339827: linuxthreads crashes when using user stacks



On Sun, Nov 20, 2005 at 01:03:34AM +0000, David Given wrote:
> On Saturday 19 November 2005 05:10, Daniel Jacobowitz wrote:
> [...]
> > We could ship a fourth variant of fifth variant of glibc for i686 using
> > LinuxThreads.  I am not particularly motivated to do this considering
> > how rarely anyone encounters this problem, and the corresponding cost
> > in archive space, build time, and maintenance.

> (There are lots of references to TLS in the linuxthreads code, all in files in 
> the sysdeps/i386 directory. I assume that this is only used on i686 and 
> above, and that i386 systems genuinely *don't* support TLS, and this isn't 
> just an oversight?)

It's support code for the i686 case - mostly.  See below.

> Since this *is* a bug in linuxthreads, no matter how obscure, I'm hoping that 
> it's less effort all around to simply fix it... but the alternatives all seem 
> to involve keeping a shared data structure between threads containing all the 
> necessary information. I suspect that maintaining this structure is going to 
> be considerably more work than it first appears.

It's only less effort "all around" because you wouldn't have to do any
of it.  Don't you think that someone would have fixed this
well-documented limitation in the last eight or so years if there was a
practical fix?  There isn't.

These options work:
  - Drop kernel 2.2 support.  I wouldn't mind doing this, but there
    may be some opposition; we still get 2.2.x kernel users
    periodically.  When glibc is built to assume 2.4 kernels it can
    handle alternate stacks.
  - Built Yet Another variant of glibc, requiring either 2.4 or i686.
    This is a maintenance burden for us.

I'll ask around about 2.2 kernels.

-- 
Daniel Jacobowitz
CodeSourcery, LLC



Reply to: