From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11043 invoked by alias); 20 Jan 2009 19:26:42 -0000 Received: (qmail 11035 invoked by uid 22791); 20 Jan 2009 19:26:42 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Jan 2009 19:26:38 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id B24CA3B4003F for ; Tue, 20 Jan 2009 19:26:34 +0000 (GMT) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5zq8oou4SBEb; Tue, 20 Jan 2009 19:26:33 +0000 (GMT) From: bugzilla-daemon@ecoscentric.com To: ecos-bugs@ecos.sourceware.org Subject: [Bug 1000672] New: redboot fconfig crash with gcc 4.3.2 X-Bugzilla-Reason: QAcontact X-Bugzilla-Type: newchanged X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: RedBoot X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: jvasco@verizon.net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: high X-Bugzilla-Assigned-To: gary@mlbassoc.com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 20 Jan 2009 19:26:00 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org X-SW-Source: 2009/txt/msg00016.txt.bz2 http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000672 Summary: redboot fconfig crash with gcc 4.3.2 Product: eCos Version: CVS Platform: ixdp425 (Intel XScale IXDP425 board) OS/Version: ARM Status: UNCONFIRMED Severity: critical Priority: high Component: RedBoot AssignedTo: gary@mlbassoc.com ReportedBy: jvasco@verizon.net QAContact: ecos-bugs@ecos.sourceware.org Class: --- Redboot gets an exception when trying to set any IP address with fconfig when using gcc-4.3.2 on an ixp425 target (armeb). The issue seems to be an alignment problem as val_ptr contains an odd address; it looks like gcc is optimizing and trying to do a copy on a word boundary. The removal of the cast fixes the problem. This doesn't look like a compiler bug to me. I suspect that this problem affects other arm variants but I only have access to an ixp425. The code is incorrect as val_ptr is pointing to a place in a configuration buffer for the raw data. Imposing (via a cast) a structure is not the right solution. Note that a few lines down in the source, the memcpy in the other direction does not have such a cast. --- fconfig.c 2009-01-18 14:34:11.000000000 -0500 +++ fconfig.c.new 2009-01-18 14:35:22.000000000 -0500 @@ -388,7 +388,7 @@ break; #ifdef CYGPKG_REDBOOT_NETWORKING case CONFIG_IP: - memcpy(&hold_ip_val.s_addr, &((in_addr_t *)val_ptr)->s_addr, sizeof(in_addr_t)); + memcpy(&hold_ip_val.s_addr, val_ptr, sizeof(in_addr_t)); if (!_gethostbyname(line, &new_ip_val)) { return CONFIG_BAD; } -- Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.