[15242] in Athena Bugs

home help back first fref pref prev next nref lref last post

Re: sgi 8.1.3: telnet

daemon@ATHENA.MIT.EDU (Greg Hudson)
Thu Jul 10 03:40:33 1997

Date: Thu, 10 Jul 1997 03:40:30 -0400
From: Greg Hudson <ghudson@MIT.EDU>
To: Yonah Schmeidler <yonah@MIT.EDU>
Cc: bugs@MIT.EDU, mycroft@MIT.EDU
In-Reply-To: "[15180] in Athena Bugs"

> 	After each prompt after running a real command, a 'p' is
> 	inserted (as if I had typed it).  This doesn't happen if
> 	linemode is turned off.

This turns out to be the result of an SGI compiler bug.  The relevant
line of code is in slc_add_reply() in telnet.c:

	if ((*slc_replyp++ = (unsigned char)value) == IAC)
		*slc_replyp++ = IAC;

When optimization is turned on, the SGI cc performs this comparison
incorrectly and doesn't fill in the second IAC.  Presumably that gets
the data stream out of sync and results in the extraneous characters
you see.

Working around the compiler bug is trivial (simply move the cast
outside of the comparison), and I'll submit a patch to do that and get
it into some future 8.1 patch release.  I'll also work to isolate the
compiler bug and see if it has been corrected in IRIX 6.2.

home help back first fref pref prev next nref lref last post