Bug 4602

Summary: minimal program compiled -static -lpthreads dies before main
Product: [Retired] Red Hat Linux Reporter: ctm
Component: binutilsAssignee: Nalin Dahyabhai <nalin>
Severity: high Docs Contact:
Priority: medium    
Version: 6.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-10-05 16:08:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description ctm 1999-08-18 22:10:55 UTC
/* gcc -static -o test test.c -lpthread */
/* this program will die before it ever gets to main
   using gcc from Red Hat 6.1 */

#include <pthread.h>

static void
not_called (void)
  pthread_mutex_unlock (0);

main (void)
  return 0;

Comment 1 Jeff Johnson 1999-08-23 17:44:59 UTC
I've reproduced this with
on i386. Ditto on sparc with

Comment 2 Cristian Gafton 1999-08-27 23:35:59 UTC
assigned to kingdon

Comment 3 Cristian Gafton 1999-08-30 02:03:59 UTC
changed component to binutils - looks like it

Comment 4 Jim Kingdon 1999-09-01 02:59:59 UTC
I have been unable to reproduce this problem with glibc-2.1.2-7
(and the rest of the system being pretty vanilla 6.0).  JBJ, can
you reproduce the problem with -7?  If not, I guess we are done.
If so, can you say a little more about what you mean by "reproduce"
(like maybe there is a system or chroot jail I can just log into
and see for myself?  Or a more detailed recipe?)

Comment 5 Jim Kingdon 1999-10-05 16:08:59 UTC
jbj writes:

  All I did was compile the program and verify that, yes, the
program    did die
  before reaching main. If the problem doesn't occur now, I'd say it's
  fixed. I'd feel better if the mechanism were better understood
  however ...

I just tried it on porky, chroot'd to /mnt/build/6.1, and didn't
have a problem.  This is glibc-2.1.2-12.

I'm going to assume it was a bug in glibc-2.1.2-5 and fixed in -7.