From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23830 invoked by alias); 5 Feb 2015 13:53:37 -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 23816 invoked by uid 89); 5 Feb 2015 13:53:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: usevmg20.ericsson.net Received: from usevmg20.ericsson.net (HELO usevmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 05 Feb 2015 13:53:35 +0000 Received: from EUSAAHC003.ericsson.se (Unknown_Domain [147.117.188.81]) by usevmg20.ericsson.net (Symantec Mail Security) with SMTP id 7D.9F.03307.D8223D45; Thu, 5 Feb 2015 08:58:06 +0100 (CET) Received: from [142.133.111.161] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.83) with Microsoft SMTP Server id 14.3.210.2; Thu, 5 Feb 2015 08:53:33 -0500 Message-ID: <54D375DD.5090704@ericsson.com> Date: Thu, 05 Feb 2015 13:53:00 -0000 From: Antoine Tremblay User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: , Subject: Re: [PATCH] gdbserver: Fix crash when QTinit is handled with no inferior process attached References: <1422387337-32334-1-git-send-email-antoine.tremblay@ericsson.com> <54D37065.4020303@ericsson.com> <54D37228.2000309@codesourcery.com> <54D373C3.5040201@codesourcery.com> In-Reply-To: <54D373C3.5040201@codesourcery.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00123.txt.bz2 Hi, I'm quite new to gdb, but in general I would argue that it's better to make a program resilient to wrong input then to sanitize the input, let's say someday something else then gdb would use gdbserver....? But I sure would like to take a look at your patch if you have it handy ? I'm not sure how to fix it on gdb's side yet... On 02/05/2015 08:44 AM, Luis Machado wrote: > On 02/05/2015 11:37 AM, Luis Machado wrote: >> On 02/05/2015 11:30 AM, Antoine Tremblay wrote: >>> ping >>> >>> On 01/27/2015 02:35 PM, Antoine Tremblay wrote: >>>> When gdbserver is called with --multi and attach has not been >>>> called yet >>>> and tstart is called on the gdb client, gdbserver would crash. >>>> This patch fixes gdbserver so that it returns E01 to the gdb client. >> >> Wouldn't it make more sense to prevent GDB from sending any tracepoint >> packets that require a running inferior if there is none? >> >> I remember fixing this in a local tree but on GDB's side. I think it is >> remote.c:remote_trace_init and other related functions. >> >> What do you think? > > I've looked around and found the patch in a local tree of mine. It > fixes more cases of tracepoint commands that require a running inferior. > > I could revive and submit it if it makes things easier. >