Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!ucla-cs!oahu.cs.ucla.edu!william From: william@oahu.cs.ucla.edu (William Cheng) Newsgroups: comp.windows.x Subject: Re: tgif on DECstations (Ultrix 4.1)? Message-ID: <1991Apr20.221514.25299@cs.ucla.edu> Date: 20 Apr 91 22:15:14 GMT References: <1991Apr17.072848@IASTATE.EDU> Sender: usenet@cs.ucla.edu (Mr. News Himself) Distribution: comp Organization: UCLA Computer Science Department Lines: 44 Nntp-Posting-Host: oahu.cs.ucla.edu In article <1991Apr17.072848@IASTATE.EDU> dengholm@IASTATE.EDU (Engholm Daniel M) writes: >In article , >ajt@bilbo.bhpmrl.oz.au (Andrew Telford) writes: >> >> >> I have just tried compiling tgif.2.4 on a DECstation with Ultrix 4.1 >> I am not using X11.R4 or imake. The loader bombs out with the >> following error message: >> >> ld: >> /lib/libc.a(calloc.o): calloc: multiply defined >> > >I was able to make the program with no trouble, however while running, >for no apparent reason, I get the message: > >pid 14755 (tgif) was killed on unaligned access, at pc 0x46b16c > > >After recompiling tgif.c with the -g option and running in dbx, I can >see: > >Bus error [malloc.malloc:623 ,0x46b16c] > > >I haven't yet gotten to the point of recompiling everything, but thought >someone may known the answer without having to dig around too much. > >So how 'bout it? Anyone know what the deal is with this? It's a bug within tgif. What happens is that calloc() is called to allocate N bytes of memory where N is the length of another string. Then strcpy() is called to copy the string to the newly allocated memory. The trailing null character causes the bus error. Apparently on SUNs this doesn't cause any problem. It will be fixed in tgif-2.5 which will be released soon. -- Bill Cheng // UCLA Computer Science Department // (213) 206-7135 3277 Boelter Hall // Los Angeles, California 90024 // USA william@CS.UCLA.EDU ...!{uunet|ucbvax}!cs.ucla.edu!william -- Bill Cheng // UCLA Computer Science Department // (213) 206-7135 3277 Boelter Hall // Los Angeles, California 90024 // USA william@CS.UCLA.EDU ...!{uunet|ucbvax}!cs.ucla.edu!william