Path: utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!MITVMA.MIT.EDU!TEX7%ICNUCEVM.CNUCE.CNR.IT From: TEX7%ICNUCEVM.CNUCE.CNR.IT@MITVMA.MIT.EDU (Stefano Diomedi) Newsgroups: gnu.utils.bug Subject: bugs in make 3.54 Message-ID: <8907141458.AA05692@life.ai.mit.edu> Date: 14 Jul 89 14:59:08 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 55 X-Unparsable-Date: Fri, 14 Jul 89 16:47:53 SET 1. Machine: DEC VAX Operating system: ULTRIX 3.0 File: load.c Function: load_average The variable 'offset' is declared as 'signed' while the nlist structure is defined in as: struct nlist { char *n_name; /* for use when in-core */ unsigned char n_type; /* type flag, i.e. N_TEXT etc; see below */ char n_other; /* unused */ short n_desc; /* see */ unsigned long n_value; /* value of this symbol (or sdb offset) */ }; The address of "_avenrun" happens to be 2148358396 and offset takes instead the values -2146608900 so that the following lseek fails. Here it is: (gdb) p nl $1 = {{n_name = 0xc56 "_avenrun", n_type = 9 '\t', n_other = 0 '\000', n_desc = (gdb) n (gdb) p offset $2 = -2146608900 (gdb) As a patch I changed the declaration of 'offset' adding an 'unsigned', initialized it to 0 and tested it against 0; I also added 'unsigned' in the cast 2. Machine: HP 9000/835 Operating system: HP-UX 3.10 (USG, USGr3) File: glob.c calls rindex and not strrchr File: job.c calls getdtablesize that doesn't exist Regards Stefano Diomedi Pisa - Italy