Date: Wed, 21 Apr 1999 03:53:13 -0400 (EDT) From: Luoqi Chen <luoqi@watermarkgroup.com> To: current@freebsd.org Subject: egcs bug caused ftp hang problem Message-ID: <199904210753.DAA22828@lor.watermarkgroup.com>
next in thread | raw e-mail | index | archive | help
An egcs optimizer bug caused incorrect tcp checksum recalculation in libalias for the rewritten PORT command packet and the server subsequently discard the packet. The following piece of C code (from TcpChecksum() in alias_util.c) u_short *ptr; int sum, oddbyte; oddbyte = 0; *((u_char *) &oddbyte) = *(u_char *) ptr; sum += oddbyte; is compiled into (%esi = ptr, %ecx = sum) 0x28067038 <TcpChecksum+80>: movb (%esi),%al 0x2806703a <TcpChecksum+82>: addl %eax,%ecx egcs should have zeroed %eax before the movb. libalias compiled without -O works correctly. -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904210753.DAA22828>