strange segfault with pthreads in 0.9.28

Peter S. Mazinger ps.m at
Mon May 15 19:36:30 UTC 2006

On Mon, 15 May 2006, Rupert Mazzucco wrote:

> > Can you post a gdb output of the crash, like the call stack, this could 
> > perhaps help to better understand the matter.
> Actually I tried running the empty, crashing program under gdb. gdb first
> complained that /bin/bash wasn't installed, which is correct but seemed like
> a hilariously irrelevant observation to me, and then mentioned something
> about __errno_location() when it segfaulted.  Can't tell you more right now
> because I don't have the machine at hand. Anyway, this message is what gave
> me the idea I mentioned, that this could somehow be related to the problems 
> discussed
> here:


Some comments to that:
1. redefinition of errno is guarded by __UCLIBC_HAS_THREADS__ in uClibc 
(not _REENTRANT), so you get it "automagically" if you enabled threads.
2. getc()/putc() as macros are configure options, you can enable/disable 
both separately, but I can't recall now, if the functions or the macros 
are better for threads.


> (Turns out the doc was on, not like I said earlier.)
> And thanks everyboy for confirming that it is supposed work.  This means it
> will work for me, eventually. I was slightly worried that the response would
> be "duh, that's just impossible for bizarre reasons discussed at length in
> the list archive; just search for this
> keyword-I'd-never-have-guessed-but-seems-blindingly-obvious-in-hindsight"
> Regards,
> Rupert

Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2

More information about the uClibc mailing list