From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 90597 invoked by alias); 16 Aug 2018 15:34:07 -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 90588 invoked by uid 89); 16 Aug 2018 15:34:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=multi, Hx-languages-length:901, repetition X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 16 Aug 2018 15:34:05 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2D965401C090; Thu, 16 Aug 2018 15:34:04 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4BE431049465; Thu, 16 Aug 2018 15:34:03 +0000 (UTC) Subject: Re: [RFA 1/2] Fix regressions for multi breakpoints command line setting/clearing To: Tom Tromey References: <20180802212613.29813-1-philippe.waroquiers@skynet.be> <20180802212613.29813-2-philippe.waroquiers@skynet.be> <87sh3v1ezc.fsf@tromey.com> <87lg9gi1c4.fsf@tromey.com> <1533845999.1860.1.camel@skynet.be> <878t5fhxdl.fsf@tromey.com> <87ftzmvs42.fsf@tromey.com> <87bmaavrr6.fsf@tromey.com> <840f67ef-2754-5d6b-9c44-83a5f815bd27@redhat.com> <877eksajdp.fsf@tromey.com> <8736vfa3pp.fsf@tromey.com> Cc: Philippe Waroquiers , gdb-patches@sourceware.org From: Pedro Alves Message-ID: <21ed4c14-3131-0b35-2fba-da6afcc330e5@redhat.com> Date: Thu, 16 Aug 2018 15:34:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <8736vfa3pp.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-08/txt/msg00397.txt.bz2 On 08/15/2018 07:23 PM, Tom Tromey wrote: > Tom> I will test a new (much smaller) patch a bit later. > > This is hilariously simpler and seems to fix the problem. > Let me know what you think. I think this is the right fix. Please push. > Pedro pointed out that the commands being read by "commands" should > not be repeatable. This patch fixes that problem, and the > use-after-free bug, by simply modifying read_next_line to disallow > repetition. I think it'd be good to expand a bit more about the use-after-free bug here (someone reading git logs later on won't have the context). You already had something in the previous version of the patch, could just copy it in. AFAICT, the "repeat" parameter of command_line_input is always 0 now, and so could be eliminated (in a separate patch). Thanks, Pedro Alves