This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
non rentrant functions causing thread safe function crashes.
- From: Jeremy Linton <jli at greshamstorage dot com>
- To: libc-alpha at sourceware dot org
- Date: Wed, 06 Jun 2007 14:40:21 -0500
- Subject: non rentrant functions causing thread safe function crashes.
Hi,
I've been lurking for a while but I have a specific problem with glibc
that doesn't occur on other unix's.
In general, is it acceptable behavior for a function marked as non
reentrant to cause cause side affects in routines that are required to
be thread safe? In particular, should I be concerned about crashes in
thread safe library functions if I call a function that isn't required
to be thread safe in another thread (even once?).
I can't find anything in the standard which implies this, rather I find
the opposite. The standard makes it clear that every effort should be
made to get correct behavior in a threaded environment even for routines
that aren't _required_ to be thread safe. There isn't a single function
marked as never being thread safe.
Basically, because of this problem I'm concerned that I should _NEVER_
use any function marked as non reentrant in a threaded program.