/* 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; }
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
assigned to kingdon
changed component to binutils - looks like it
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?)
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.