From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BTuJw-00034r-HJ for qemu-devel@nongnu.org; Fri, 28 May 2004 23:15:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BTuJt-000333-La for qemu-devel@nongnu.org; Fri, 28 May 2004 23:15:39 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BTuJt-00032o-Gs for qemu-devel@nongnu.org; Fri, 28 May 2004 23:15:37 -0400 Received: from [212.16.62.51] (helo=mail.13thfloor.at) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BTeN6-0001YF-VM for qemu-devel@nongnu.org; Fri, 28 May 2004 06:13:53 -0400 Date: Fri, 28 May 2004 12:13:51 +0200 From: Herbert Poetzl Subject: Re: [Qemu-devel] Overoptimization Message-ID: <20040528101351.GA18592@MAIL.13thfloor.at> References: <40B693A7.9050006@ums.usu.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40B693A7.9050006@ums.usu.ru> Reply-To: qemu-devel@gnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Alexander E. Patrakov" Cc: qemu-devel@nongnu.org List-ID: On Fri, May 28, 2004 at 07:19:35AM +0600, Alexander E. Patrakov wrote: > The CFLAGS in Makefile.target are bad for gcc 3.3.2. This is not a my > problem with my gcc, because it passes the "make check" testsuite except > some known errors in libstdc++, which cannot affect qemu. > > The victim is the tcp_input function in slirp. When compiling with the > decault CFLAGS, for some reason all packets are dropped as having a > wrong TCP checksum. I tried debugging this by placing some debug printfs > in tcp_input.c file, but the problem disappeared after I inserted them. > I concluded that it is very strange and compiled this tcp_input.c file > without my debug statements, but with -O1 instead of -O2. The problem > went away. gcc isn't supposed to change the semantics of a program based on the optimization level. nevertheless several cases are known where this happened, and not seldom the bug was in gcc testing the same opts with 3.3.3 or 3.4 will show if gcc is to blame or not. best, Herbert > Will this workaround (use of -O1 instead of -O2 for tcp_input.c) enter > the qemu CVS? > > -- > Alexander E. Patrakov > > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://mail.nongnu.org/mailman/listinfo/qemu-devel