From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127016 invoked by alias); 9 Nov 2016 12:07:34 -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 127000 invoked by uid 89); 9 Nov 2016 12:07:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,RCVD_IN_SEMBACKSCATTER autolearn=no version=3.3.2 spammy=impressive, wow X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Nov 2016 12:07:23 +0000 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uA9C3w57101572 for ; Wed, 9 Nov 2016 07:07:21 -0500 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 26m2u9bgc7-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 09 Nov 2016 07:07:21 -0500 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 9 Nov 2016 12:07:18 -0000 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 9 Nov 2016 12:07:16 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 1F51B1B08023 for ; Wed, 9 Nov 2016 12:09:29 +0000 (GMT) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id uA9C7GI941943244 for ; Wed, 9 Nov 2016 12:07:16 GMT Received: from d06av04.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id uA9C7F14013731 for ; Wed, 9 Nov 2016 05:07:16 -0700 Received: from oc1027705133.ibm.com (dyn-9-152-212-182.boeblingen.de.ibm.com [9.152.212.182]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id uA9C77AF013641 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Nov 2016 05:07:15 -0700 From: Andreas Arnez To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/4] tui-disasm: Fix window content buffer overrun References: <1478631454-9447-1-git-send-email-arnez@linux.vnet.ibm.com> <1478631454-9447-2-git-send-email-arnez@linux.vnet.ibm.com> <763f0466-3261-faca-fcc1-da6772c952c8@redhat.com> Date: Wed, 09 Nov 2016 12:07:00 -0000 In-Reply-To: <763f0466-3261-faca-fcc1-da6772c952c8@redhat.com> (Pedro Alves's message of "Tue, 8 Nov 2016 19:28:50 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16110912-0040-0000-0000-0000025AABA5 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16110912-0041-0000-0000-00002282364B Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-09_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611090225 X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00209.txt.bz2 On Tue, Nov 08 2016, Pedro Alves wrote: [...] > Missing copyright header. Added. > Funny, I was just playing with throwing a large > function name at the compiler last week, after seeing: > > https://sourceware.org/ml/binutils/2016-11/msg00027.html Wow, "mangled name of some 590K characters"... that's impressive. The TUI crash already occurs with much shorter names. On the other hand, IIRC, I had a version of my test with more than that (I think it was over 1MB), and it worked. So I'm not sure why I didn't hit the problem above. [...] >> + fail "compile" > > Shouldn't this be "untested" ? Yeah, probably more appropriate. Changed. [...] > This is OK. Thanks. I pushed the whole patch series with the changes above. > This could probably all be greatly simplified with std::string > and getting rid of the alloca... Also note that the current implementation has a usability issue. With long mangled names, the instructions are no longer visible on the screen, and a lot of scrolling may be required. See also https://sourceware.org/bugzilla/show_bug.cgi?id=15580 Of course, fixing that would be a different topic. -- Andreas