[comp.sys.next] rrn on NeXT

cliff@delta.eecs.nwu.edu (Cliff Chaput) (03/02/90)

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

gil@daffy.gatech.edu (Gil Neiger) (03/02/90)

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.

I think the trick here is to make "rrn" with the compiler option
"-fwritable-strings".  I think this got rid of our "interp buffer overflow"
problems.  If that doesn't work, try "-traditional" instead.

				- Gil Neiger
				gil@gatech.edu

steve@tweedledee.uucp (Steve Trainoff) (03/02/90)

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)

squires@delta.eecs.nwu.edu (Matt Squires) (03/02/90)

In article <4133@hub.UUCP> steve@tweedledee.ucsb.edu (Steve Trainoff) writes:
>[add the following to the Makefile]
>intrp.o: intrp.c
>	$(CC) -c -g intrp.c 
>
>..STeve
>steve@tweedledee.ucsb.edu (NeXT mail)

The fix worked, and now we have a working rrn on mneme.

Now we will never get any work done!

Matt Squires
squires@eecs.nwu.edu