This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH] Fix re-runs of a second inferior (PR gdb/25410)
- From: "Aktemur, Tankut Baris" <tankut dot baris dot aktemur at intel dot com>
- To: Simon Marchi <simark at simark dot ca>, Pedro Alves <palves at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 28 Jan 2020 12:30:29 +0000
- Subject: RE: [PATCH] Fix re-runs of a second inferior (PR gdb/25410)
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=70/FVtO2LFufpSYOfzlU+kRtUIVgn/wMzPcWeLK1JE0=; b=X9H+dew8PBg/ewST8MM6/pBvCvaFjRJuGbPJioouNXUp0/0TyLE0ugH15qHX1nWp6vUAq8FT5Tb4uW1CFJmbwoUFzoVQSQCpSRPrQVBUdzpMRcC7nu4EBz5WhygqktgYNurKFhkNEqtEmX+BVilpX8zFWLcqJKMwG12uq/EfjbTRrtshnaCZcVQDFpB6OVi8yuR5aOQr+JbKoLiDJT9kuHkWRaA4Gjt7QV1WArrDC/Hg0NXFG1b4sZpGs4yelv/ozor2eIf3KSRnV+WE27bgqLiFuDdHdYafTrzcBATjCpbKWCxA2Qlof4KpjjBQswzXWNZmTUW13/mB0pk0OQFxRQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C7FaBK9jLxRvEosuqw/p//4k3P9cFSF488H/3lTOLdEV5DtMMFFzOy2iGEDCtmetZ3qv9MWFi+IoP/JqmulFs0PjD6T9CENuZhy7Jvo2vwDBn+O6rHUD4tp0KL7FS1HJlqSdAsGbUJ3b9D1EJTtQVbMfnO3Dbvv7FGCIH4qZ7IzmMRqefQIO6PWBNwQQDTT2HSJk93aYvCO9Keomp8qlUzVXoRr5ZAzjv1XBzM9yHWI6DFjLxWK8vgIm548UQ/kQj6soHYbh0JJQnbJkoLTavE/NGF9oU49i4/qaWwUOptbXU2eF+2X/2wkn2Y+HPHE2Ms5EKkfBxWkoD0c/FiAtFQ==
- References: <20200124030222.13854-1-palves@redhat.com> <DM6PR11MB303390E9124B6ECD67E1740AC40E0@DM6PR11MB3033.namprd11.prod.outlook.com> <28a65882-8c59-db61-418c-1dc2139481af@simark.ca> <bd7d83f4-49e9-787c-cc36-6fa97e73f6e7@redhat.com> <5db80e9a-2c58-6edc-8a9e-db44ea44a8dc@simark.ca>
On Friday, January 24, 2020 6:05 PM, Simon Marchi wrote:
> On 2020-01-24 10:11 a.m., Pedro Alves wrote:
> > On 1/24/20 2:59 PM, Simon Marchi wrote:
> >> On 2020-01-24 6:22 a.m., Aktemur, Tankut Baris wrote:
> >>> On Friday, January 24, 2020 4:02 AM, Pedro Alves wrote:
> >>>> This fixes a latent bug exposed by the multi-target patch (5b6d1e4fa
> >>>> "Multi-target support).
> >>>
> >>> The patch led to the assertion violation below when running
> >>> gdb.threads/vfork-follow-child-exit.exp.
> >>>
> >>> gdb/progspace.c:243: internal-error: void set_current_program_space(program_space*): Assertion `pspace != NULL'
> failed.
> >>
> >>
> >> Oh, I see that too.
> >
> > Me too. No idea how I missed this. Sorry about that...
> > There's actually yet another internal error in addition
> > to that one.
> >
> > Here's the updated patch, which fixes all.
> >
<snipped>
> > The fix is to use scoped_restore_current_pspace_and_thread instead of
> > scoped_restore_current_thread.
>
> I did not look at the code in depth, but your explanations make sense to me,
> so if the testsuite shows no regression, this LGTM.
>
> Simon
I ran the patch locally and did not see any regression.
Thank you.
-Baris
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928