From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74580 invoked by alias); 13 Jun 2017 10:06:30 -0000 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 Received: (qmail 72047 invoked by uid 89); 13 Jun 2017 10:06:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Stafford X-HELO: mail-pf0-f193.google.com Received: from mail-pf0-f193.google.com (HELO mail-pf0-f193.google.com) (209.85.192.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Jun 2017 10:06:24 +0000 Received: by mail-pf0-f193.google.com with SMTP id s66so5650806pfs.2 for ; Tue, 13 Jun 2017 03:06:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=d4iYUFOnz4vOTtO35oLLQJN9MqxfsOml9bpykXm9Q7w=; b=ZB585q485Vojcel8I6a5aP4BzF0I8z4WtOft7aBaLRZJM56H3Nda56MKYcnGmn5EuG vgkqPSWsT5IBVLAz9oPQwf3folXLGWpS0ImcMghJ36ke4+STGn6y4J7PzufhHRAZ3AOt P9QIE+kcMX+i5Ku8vtn4BzzY0RVbllq9frxAYeXPKGGmYAaKijnZwjJmhSP1jQ2CF+x+ yChAQ6XoGQ+L+MT3f6X5qvIXe/i0INiTDuCO2RApxtuULBIIF06WS+p2H1bopbgUJs76 dpPyKUIV0mF9MR8UwvYN+Iuaoc+TFmx2tsRB+IJAVK1YUtBtD80p6zG7gSjZulSnPyy5 aT+w== X-Gm-Message-State: AODbwcAnVDjgh7BwYeQ7/6ULj0pBOxF71lT+V76vF2hXaohNP3JlB86A LRTQ7n92j5S1hA== X-Received: by 10.84.231.136 with SMTP id g8mr63701234plk.257.1497348387384; Tue, 13 Jun 2017 03:06:27 -0700 (PDT) Received: from localhost (g212.61-193-241.ppp.wakwak.ne.jp. [61.193.241.212]) by smtp.gmail.com with ESMTPSA id i62sm25706370pfj.30.2017.06.13.03.06.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Jun 2017 03:06:26 -0700 (PDT) Date: Tue, 13 Jun 2017 10:06:00 -0000 From: Stafford Horne To: Simon Marchi Cc: Yao Qi , GDB patches Subject: Re: [PATCH] xtensa: Properly strdup string when building reggroup Message-ID: <20170613100624.GE6190@lianli.shorne-pla.net> References: <20170610133422.19913-1-shorne@gmail.com> <86poe9aa4y.fsf@gmail.com> <590b6ff49c8bc167ca2e179ec14818b0@polymtl.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <590b6ff49c8bc167ca2e179ec14818b0@polymtl.ca> User-Agent: Mutt/1.8.0 (2017-02-23) X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00361.txt.bz2 On Mon, Jun 12, 2017 at 10:38:09AM +0200, Simon Marchi wrote: > On 2017-06-12 10:22, Yao Qi wrote: > > This exposes another bug, IMO, here, > > > > for (i = 0; i < XTENSA_MAX_COPROCESSOR; i++) > > { > > cpname[2] = '0' + i; > > xtensa_cp[i] = reggroup_new (cpname, USER_REGGROUP); > > } > > > > and XTENSA_MAX_COPROCESSOR is 0x10, so we can see "cp:", "cp;", which > > looks odd. > > Heh, looks like the patch here > > https://sourceware.org/ml/gdb-patches/2011-03/msg00571.html > > did not take that into account :) Right, I might was well resend the patch with an sprintf(). -Stafford