From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by sourceware.org (Postfix) with ESMTPS id 5AE00395B036 for ; Tue, 12 May 2020 16:10:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5AE00395B036 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 5CF7E2400FE for ; Tue, 12 May 2020 18:10:54 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 49M2pj6FFnz9rxj; Tue, 12 May 2020 18:10:53 +0200 (CEST) Subject: Re: [PATCH 3/4] [PR gdbserver/25893]: Use construct_inferior_arguments which handles special chars To: Simon Marchi , gdb-patches@sourceware.org References: <20200429111638.1327262-1-m.weghorn@posteo.de> <20200429111638.1327262-5-m.weghorn@posteo.de> <17f345c8-eb7f-a3bb-c133-98533c7fa1c5@simark.ca> From: Michael Weghorn Message-ID: <90ccee6c-8055-1c44-f8e2-c25b2415847f@posteo.de> Date: Tue, 12 May 2020 18:10:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2020 16:10:57 -0000 On 08/05/2020 00.09, Simon Marchi wrote: > While trying out stuff to review patch 4, I noticed a crash introduced by this patch. > > In one terminal, run gdbserver with: > > $ ./gdbserver --once --multi :1234 > > In another, run GDB with: > > $ ./gdb /bin/ls -ex 'set pagination off' -ex 'set remote exec-file /bin/ls' -ex 'target extended-remote :1234' -ex 'run hello' > > Doing so segfaults gdbserver for me. Could you look into it? This is fixed in the next version of the parent commit, https://sourceware.org/pipermail/gdb-patches/2020-May/168348.html I had previously missed another instance where a NULL element was passed into the argument vector. > The commands above try to run a new process through gdbserver. The args are passed > to GDB using the remote protocol. You can add -ex 'set debug remote 1' before the run > part to see the exchanged packets, the args are hex-encoded in the vRun packet. Thanks, those commands also helped a lot in analyzing the test failures I experienced with my patch series for the new test you have created. Michael