From: "H.J. Lu" <hjl.tools@gmail.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org, GDB <gdb@sourceware.org>
Subject: Re: [patch] Fix CLONE_VM vs. TLS [Re: Is CLONE_VM really needed in gdbserver?]
Date: Thu, 28 Jan 2010 16:22:00 -0000 [thread overview]
Message-ID: <6dc9ffc81001280821l2e92bb43t87da7b4fc1ac4aa5@mail.gmail.com> (raw)
In-Reply-To: <20100127221236.GA4746@host0.dyn.jankratochvil.net>
On Wed, Jan 27, 2010 at 2:12 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> 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=11214
>> >
>> > 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. However, 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.
--
H.J.
next prev parent reply other threads:[~2010-01-28 16:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6dc9ffc81001261551j6221db6v88e96713d6dd9497@mail.gmail.com>
[not found] ` <20100127000821.GA29862@caradoc.them.org>
2010-01-27 22:12 ` Jan Kratochvil
2010-01-28 16:22 ` H.J. Lu [this message]
2010-01-28 17:01 ` Daniel Jacobowitz
2010-01-29 1:26 ` Jan Kratochvil
2010-01-29 2:30 ` Daniel Jacobowitz
2010-01-29 12:41 ` Jan Kratochvil
2010-02-01 20:20 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6dc9ffc81001280821l2e92bb43t87da7b4fc1ac4aa5@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=gdb@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox