From owner-freebsd-bugs@FreeBSD.ORG Thu Feb 15 22:00:14 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 863AA16A400 for ; Thu, 15 Feb 2007 22:00:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 6955313C494 for ; Thu, 15 Feb 2007 22:00:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l1FM0EQn068207 for ; Thu, 15 Feb 2007 22:00:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l1FM0EsT068206; Thu, 15 Feb 2007 22:00:14 GMT (envelope-from gnats) Resent-Date: Thu, 15 Feb 2007 22:00:14 GMT Resent-Message-Id: <200702152200.l1FM0EsT068206@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Erwin Hoffmann Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F289D16A402 for ; Thu, 15 Feb 2007 21:52:05 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id E4F1113C442 for ; Thu, 15 Feb 2007 21:52:05 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l1FLq5RU090896 for ; Thu, 15 Feb 2007 21:52:05 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l1FLq5UP090893; Thu, 15 Feb 2007 21:52:05 GMT (envelope-from nobody) Message-Id: <200702152152.l1FLq5UP090893@www.freebsd.org> Date: Thu, 15 Feb 2007 21:52:05 GMT From: Erwin Hoffmann To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: misc/109210: gcc 3.4.6 is broken wrt -O2 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Feb 2007 22:00:14 -0000 >Number: 109210 >Category: misc >Synopsis: gcc 3.4.6 is broken wrt -O2 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Feb 15 22:00:13 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Erwin Hoffmann >Release: 6.2 >Organization: FEHCom >Environment: >Description: Hi, it has been reported, that "gcc -O2" is broken for gcc 3.4.6. The report has been forwarded to me, using my base64.c implemention on CentOS 4.4: John Simpson (John Simpson ): >How-To-Repeat: Compile and use qmail-1.03 + http://www.fehcom.de/qmail/auth/qmail-authentication-066_tgz.bin and http://www.fehcom.de/qmail/auth/qmail-authentication-065_tgz.bin and compare results. Version 0.66 includes fixes for gcc 3.4.6 incapabilities. >Fix: >Release-Note: >Audit-Trail: >Unformatted: >in your base64.c, in the b64decode() function, we find these lines: > >36 out->len = (n * 3) - p; >37 if (!stralloc_ready(out,out->len)) return -1; >38 s - out->s; > >the gcc compiler's "-O2" option does some strange things to this >code, and line 37 ends up setting out->len back to zero for some >reason, which ends up causing auth_plain() to return "malformed auth >input" in response to an AUTH PLAIN command. (it doesn't help that >stralloc_ready() is written as a macro and is therefore impossible to >debug directly.) >it's "gcc 3.4.6 20060404 (Red Hat 3.4.6-3)", which is the current >version for CentOS 4.4. This bug inhibits some former FreeBSD ports to be used on FreeBSD 6.2 (eg. mlwm). In addition it is claimed falsly (for this port), that the SW is broken for all FreeBSD 6.x releases, whereas mlwm works fine with FreeBSD 6.2. In fact, it is the gcc which generate the problem with those ports. Form my point of view, due the the gcc bug, FreeBSD is unusable. regards. --eh.