>On Mon, Oct 01, 2001 at 07:52:15PM -0400, TWEDE,ROGER (HP-Boise,ex1) wrote:
>> The following code reveals a bug in the MIPS Gnu C Libraries available via
>> ftp on oss.sgi.com (ftp.linux.sgi.com).
>On RedHat 7.1/mips:
># gcc pthread.c -o mips -lpthread -Wall
>pthread.c: In function `StartFunction':
>pthread.c:64: warning: unsigned int format, pointer arg (arg 3)
>pthread.c:69: warning: unsigned int format, pointer arg (arg 3)
>pid=21905 Init mutex
>pid=21905 About to create thread: mythread
>pid=21905 about to cond_wait for mythread init 1.
>pid=21907 thread mutex locked at x7fff79c8
>pid=21907 thread cond signal sent, unlocking at 0x7fff79c8
>pid=21907 thread unlocked
>pid=21905 back from cond_wait for mythread init 1. result=0
>pid=21907 yielded and back again
># rpm -q glibc
On my R4600SC Indy running 7.1 (mips) I get:
% gcc blah.c -o blah -lpthread -Wall
blah.c: In function `StartFunction':
blah.c:37: warning: unsigned int format, pointer arg (arg 3)
blah.c:42: warning: unsigned int format, pointer arg (arg 3)
[blah:5286] Illegal instruction 0100017c at 2ad1a910 ra=2ab78ed0
Illegal instruction (core dumped)
% uname -a
Linux elan 2.4.3 #1 Sun Apr 22 23:46:19 PDT 2001 mips unknown
% rpm -q glibc gcc
This happens whether it's a native build of glibc or the one from
oss.sgi.com. The kernel is from the simple dir on oss.
With a 3rd Sept CVS 2.4.8 kernel under no load the pthreads program
runs ok, but under load (a big rm -rf over NFS for instance), it
fails like above, or fails like:
pid=681 Init mutex
pid=681 About to create thread: mythread
pid=681 about to cond_wait for mythread init 1.
Segmentation fault (core dumped)
Also I found I could only build X natively on the Indy by disabling the
pthreads parts; and maybe it's a similar 'Illegal Instruction' error in
the 'conftest' program that seems to be stopping mozilla from building??
(at least under kernel 2.4.3 which otherwise seems more stable than 2.4.8)