From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78836 invoked by alias); 14 Aug 2018 15:02:22 -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 78820 invoked by uid 89); 14 Aug 2018 15:02:21 -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=Hx-languages-length:691 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; Tue, 14 Aug 2018 15:02:20 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0277840241C5; Tue, 14 Aug 2018 15:02:19 +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 0ED012026D7E; Tue, 14 Aug 2018 15:02:17 +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> Cc: Philippe Waroquiers , gdb-patches@sourceware.org From: Pedro Alves Message-ID: <840f67ef-2754-5d6b-9c44-83a5f815bd27@redhat.com> Date: Tue, 14 Aug 2018 15:02: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: <87bmaavrr6.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-08/txt/msg00353.txt.bz2 On 08/10/2018 04:13 AM, Tom Tromey wrote: > commit aea20ede47dfca4156f19c0b41e3a1b11e724c20 > Author: Tom Tromey > Date: Sat Jul 28 11:03:09 2018 -0600 > > Fix use-after-free in number_or_range_parser > > -fsanitize=address showed a use-after-free in number_or_range_parser. > > The cause was that handle_line_of_input could stash the input into > "saved_command_line", and then this could be freed by reentrant calls. But why is handle_line_of_input freeing saved_command_line on reentrant calls? "repeat" is only supposed to be set for top-level commands, I'd think? Thanks, Pedro Alves