From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22925 invoked by alias); 28 Jan 2010 16:22:08 -0000 Received: (qmail 22905 invoked by uid 22791); 28 Jan 2010 16:22:06 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f226.google.com (HELO mail-ew0-f226.google.com) (209.85.219.226) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Jan 2010 16:22:01 +0000 Received: by ewy26 with SMTP id 26so968467ewy.8 for ; Thu, 28 Jan 2010 08:21:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.87.132 with SMTP id y4mr142122wee.99.1264695718527; Thu, 28 Jan 2010 08:21:58 -0800 (PST) In-Reply-To: <20100127221236.GA4746@host0.dyn.jankratochvil.net> References: <6dc9ffc81001261551j6221db6v88e96713d6dd9497@mail.gmail.com> <20100127000821.GA29862@caradoc.them.org> <20100127221236.GA4746@host0.dyn.jankratochvil.net> Date: Thu, 28 Jan 2010 16:22:00 -0000 Message-ID: <6dc9ffc81001280821l2e92bb43t87da7b4fc1ac4aa5@mail.gmail.com> Subject: Re: [patch] Fix CLONE_VM vs. TLS [Re: Is CLONE_VM really needed in gdbserver?] From: "H.J. Lu" To: Jan Kratochvil Cc: gdb-patches@sourceware.org, GDB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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 X-SW-Source: 2010-01/txt/msg00605.txt.bz2 On Wed, Jan 27, 2010 at 2:12 PM, Jan Kratochvil wrote: > On Wed, 27 Jan 2010 01:08:26 +0100, Daniel Jacobowitz wrote: >> On Tue, Jan 26, 2010 at 03:51:38PM -0800, H.J. Lu wrote: >> > Hi, >> > >> > There is a race condition between gdbserver and ld.so on Linux/x86-64: >> > >> > http://www.sourceware.org/bugzilla/show_bug.cgi?id=3D11214 >> > >> > Is CLONE_VM really needed? In general, CLONE_VM is a very bad >> > idea if there is any symbol lookup in both parent and child processes. >> >> It is necessary because gdbserver supports uClinux. =A0However, on Linux >> we might be able to get away with fork (see linux_tracefork_child in >> gdb/linux-nat.c). > > Coded it as suggested. > > No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu and on > x86_64-fedora12-linux-gnu via gdbserver. > > Verified linux_supports_tracefork_flag gets still set with the patch. > > Verified unsetting HAVE_FORK for gdb/gdbserver/ still works the same. > > gdb/ already tests HAVE_FORK in config.in but it is brought in by other > macros, therefore rather added an explicit configure.ac test for it. > > Have not found an easy enough uClinux disk image of some arch for qemu-*. > > > I think it is a glibc regression. I will try to fix it in glibc. --=20 H.J.