Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 4602 - minimal program compiled -static -lpthreads dies before main
Summary: minimal program compiled -static -lpthreads dies before main
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: binutils
Version: 6.0
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-08-18 22:10 UTC by ctm
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-10-05 16:08:31 UTC


Attachments (Terms of Use)

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);
}

int
main (void)
{
  return 0;
}

Comment 1 Jeff Johnson 1999-08-23 17:44:59 UTC
I've reproduced this with
	egcs-1.1.2-17
	glibc-2.1.2-3
on i386. Ditto on sparc with
	egcs-1.1.2-18
	glibc-2.1.2-5

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.


Note You need to log in before you can comment on or make changes to this bug.