From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123365 invoked by alias); 19 Oct 2016 20:19:38 -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 123355 invoked by uid 89); 19 Oct 2016 20:19:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=UD:py-finish-breakpoint.exp, sk:catch-s, exercises, UD:catch-syscall.exp X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Oct 2016 20:19:35 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1bwxKo-0006cS-1Q from Luis_Gustavo@mentor.com ; Wed, 19 Oct 2016 13:19:34 -0700 Received: from [134.86.105.168] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 19 Oct 2016 13:19:31 -0700 Subject: Re: [rfc] PR 20569, segv in follow_exec References: <57F6D57D.8070603@codesourcery.com> <50f4c7d8-44e3-4351-0b54-9cbaef64717a@codesourcery.com> <14a10c11-cda1-945c-560a-ee619fe59101@redhat.com> <91ae2166-15c4-d356-5b50-ecdd3402740d@codesourcery.com> To: Pedro Alves , Sandra Loosemore , From: Luis Machado Reply-To: Luis Machado Message-ID: <26518bd3-f378-74d2-bc26-fbdfd2a95f09@codesourcery.com> Date: Wed, 19 Oct 2016 20:19:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <91ae2166-15c4-d356-5b50-ecdd3402740d@codesourcery.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-02.mgc.mentorg.com (147.34.90.202) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-IsSubscribed: yes X-SW-Source: 2016-10/txt/msg00582.txt.bz2 On 10/19/2016 11:14 AM, Luis Machado wrote: > On 10/19/2016 08:37 AM, Pedro Alves wrote: >> On 10/18/2016 07:11 PM, Luis Machado wrote: >> >>> I went through the patch and, although this code as a whole is a bit on >>> the convoluted side, it looks reasonable to me. >>> >>> Segfaults are not supposed to happen, so allowing the session to >>> continue is a good thing IMO. >>> >>> Sounds like a good candidate for master and even stable branches. >> >> I didn't look at the patch in detail yet, but I think it'd be >> very good to have tests? >> >> Thanks, >> Pedro Alves >> > > I fixed a gotcha with the patch and i have a reproducer that makes GDB > crash on x86-64. I'll craft a test. > I was thinking of a way to test this and decided to exercise everything against an invalid sysroot (by always passing 'set sysroot ' and i noticed quite a few segmentation faults ocurring in 10+ tests. Now we know things are broken and we know how to show that, but i'm wondering if we want to re-run tests with an invalid sysroot or if the manual testing with a sysroot override is enough. I could add a loop to each test that is failing, but, though that exercises and shows the failure, it sounds like a waste of time to repeat those tests. I could also pick one candidate and isolate that in a test, but i'm not yet sure if all those 10+ failures fail for the same exact reason. Suggestions? These are the failing tests: gdb.base/catch-syscall.exp gdb.base/execl-update-breakpoints.exp gdb.base/foll-exec-mode.exp gdb.base/foll-exec.exp gdb.base/foll-vfork.exp gdb.base/pie-execl.exp gdb.linespec/explicit.exp gdb.multi/bkpt-multi-exec.exp gdb.python/py-finish-breakpoint.exp gdb.threads/execl.exp gdb.threads/non-ldr-exc-1.exp gdb.threads/non-ldr-exc-2.exp gdb.threads/non-ldr-exc-3.exp gdb.threads/non-ldr-exc-4.exp gdb.threads/thread-execl.exp