Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucsd!hub!tweedledee!steve From: steve@tweedledee.uucp (Steve Trainoff) Newsgroups: comp.sys.next Subject: Re: rrn on NeXT Summary: Problem with gcc Optimiser Keywords: gcc Optimiser bug? Message-ID: <4133@hub.UUCP> Date: 2 Mar 90 02:23:21 GMT References: <4568@accuvax.nwu.edu> Sender: news@hub.UUCP Reply-To: steve@tweedledee.ucsb.edu (Steve Trainoff) Organization: University of California at Santa Barbara, Physics program Lines: 44 In article <4568@accuvax.nwu.edu> cliff@delta.eecs.nwu.edu (Cliff Chaput) writes: >Has anybody gotten rrn (remote rn that accesses the NNTP server on another >machine, not real rn) to run on their next? I have a hacked version, and I >can read news just fine, but when I attempt to post I occasionally get an >error which forces rrn to exit: %interp buffer overflow. If you've gotten >rrn to work on your NeXT, please let me know. > >Thanks a lot, > >Cliff Chaput >Mneme Project - NU Psychology Dept. >cliff@mneme.psych.nwu.edu, cliff@eecs.nwu.edu I too have had this problem, and the resolution was rather interesting. I recomplied the code with the debugger and ran the program under gdb. I found the offending code. It was in intrp.c: register char *dest; ... switch (*++pattern) { ... default: if (--destsize <= 0) abort_interp(); <- Generates the error msg *dest++ = *pattern | metabit; <-- The problem! s = nullstr; break; I found that despite the code written, dest was NOT being incremented. When I turned off the -O switch on the compilation, the problem went away. I wasn't able to reproduce the problem in a simple test case. The temporary soln is to compile this code separately by putting the following lines into the makefile. # There seems to be a problem with the gcc optimizer that manifests itself in intrp.c intrp.o: intrp.c $(CC) -c -g intrp.c ..STeve steve@tweedledee.ucsb.edu (NeXT mail)