From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23608 invoked by alias); 17 Sep 2009 15:43:53 -0000 Received: (qmail 23599 invoked by uid 22791); 17 Sep 2009 15:43:52 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Sep 2009 15:43:46 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id DE0212BAB2F; Thu, 17 Sep 2009 11:43:44 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id r4Hsg95zLN9J; Thu, 17 Sep 2009 11:43:44 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 5E3622BAB1F; Thu, 17 Sep 2009 11:43:44 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 3B2EAF592B; Thu, 17 Sep 2009 08:43:35 -0700 (PDT) Date: Thu, 17 Sep 2009 15:43:00 -0000 From: Joel Brobecker To: Mark Kettenis Cc: ralf.corsepius@rtems.org, gdb-patches@sourceware.org, Joel.Sherrill@oarcorp.com Subject: Re: sparc-tdep.c: __builtin___memcpy_chk overflows destination buffer Message-ID: <20090917154335.GK8910@adacore.com> References: <4AB1A090.8030701@rtems.org> <200909170624.n8H6OkDh021445@brahms.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200909170624.n8H6OkDh021445@brahms.sibelius.xs4all.nl> User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00563.txt.bz2 > You sent the diff as bas64 encoded MIME attachment which makes it > difficult for me to review your diff. Can you send it inline or as a > normal 7-bit ASCII encoded attachments? Here is the patch. I don't really understand what the problem is, however, and I'm quite hesitant about this patch. I wasn't able to reproduce the build failure, so couldn't investigate any further. 2009-09-17 Ralf Corsépius * sparc-tdep.c (sparc32_store_return_value): Use size_t as return type of TYPE_LENGTH(type). diff -Naur gdb-6.8.91.orig/gdb/sparc-tdep.c gdb-6.8.91/gdb/sparc-tdep.c --- gdb-6.8.91.orig/gdb/sparc-tdep.c 2009-09-07 19:52:41.000000000 +0200 +++ gdb-6.8.91/gdb/sparc-tdep.c 2009-09-17 03:43:48.000000000 +0200 @@ -1100,7 +1100,7 @@ sparc32_store_return_value (struct type *type, struct regcache *regcache, const gdb_byte *valbuf) { - int len = TYPE_LENGTH (type); + size_t len = TYPE_LENGTH (type); gdb_byte buf[8]; gdb_assert (!sparc_structure_or_union_p (type)); -- Joel