This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
bug in spinlock.c?
- From: Andreas Jaeger <aj at suse dot de>
- To: libc-alpha at sources dot redhat dot com
- Cc: Karsten Keil <kkeil at suse dot de>
- Date: Fri, 21 Feb 2003 13:54:13 +0100
- Subject: bug in spinlock.c?
Looking at the ex18 hang (sometimes ex18 even segfaulted) on x86-64,
Karsten noticed that we allocate a struct wait_node in
__pthread_alt_lock on the stack - and put it somehow also on the list
of waiting nodes.
In __pthread_alt_unlock we go through the waiting nodes and deque it.
This looks broken, since we allocate something on the stack of a
function and leave the function with this data hanging around.
Can somebody confirm this? Or do you have other ideas that would
explain the segfaults we noticed? gdb pointed to this code,
Andreas
--
Andreas Jaeger
SuSE Labs aj at suse dot de
private aj at arthur dot inka dot de
http://www.suse.de/~aj