All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Hughes <thh@cyberscience.com>
To: jdike@addtoit.com
Cc: dbahi@enterasys.com, njn25@cam.ac.uk,
	user-mode-linux-devel@lists.sourceforge.net,
	valgrind-users@lists.sourceforge.net, jdike@sonycom.com
Subject: Re: [Valgrind-users] Re: [uml-devel] Re: UML and valgrind
Date: Wed, 04 Aug 2004 18:57:15 +0100	[thread overview]
Message-ID: <2b464bd94c.work@loxley.compton.nu> (raw)
In-Reply-To: <200408041800.i74I0Nvv007667@ccure.user-mode-linux.org>

In message <200408041800.i74I0Nvv007667@ccure.user-mode-linux.org>
          Jeff Dike <jdike@addtoit.com> wrote:

> thh@cyberscience.com said:
> > Even doing that (if it's still possible) is quite dangerous as that
> > thread could accidentally damage valgrind's environment.
> 
> So?  It's also quite dangerous as that thread could damage another thread's
> environment.  That's the nature of multithreaded apps.

The problem is that the virtual environment seen by a program running
under valgrind may not be the same as the real environment - things like
signal handlers, signal masks, resource limits and son. That might be
confusing for the thread that isn't running under valgrind and might
even lead to that thread damaging the process state. I'm not saying
it will happen, just that it's something to beware of.

> > That would imply that the newly created thread was left to run on the
> > real CPU rather than the simulated CPU. If that's the case then I'm
> > not that it is possible anymore - I know we had to take out the stuff
> > that allowed valgrind to switch back to the real CPU after running a
> > specified number of basic blocks because it could no longer be made to
> > work.
> 
> We're not talking about a thread switching back and forth between the real
> CPU and the simulated one.  We're talking about a thread being created on
> the real CPU and staying there.

It's still switch from the simulated CPU to the real CPU though - the
thread of control arrives at the clone and then branches with one
branch continuing on the real CPU and one on the simulated CPU. That
sounds to me just the same (for the new thread) as the existing thread
of control continuing on the real CPU.

You probably really need Jeremy's thoughts on the matter - he's more
up on this stuff and I think he was involved in dropping the support
for switching back to the real CPU.

Tom

-- 
Tom Hughes (thh@cyberscience.com)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2004-08-04 17:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-08  4:13 [uml-devel] UML and valgrind Bahi, David
2004-08-03  2:47 ` [uml-devel] " D. Bahi
2004-08-03  5:17   ` Jeff Dike
2004-08-03  9:31     ` [Valgrind-users] " Nicholas Nethercote
2004-08-03 14:50       ` Jeff Dike
2004-08-03 14:31         ` Nicholas Nethercote
2004-08-03 17:50           ` Jeff Dike
2004-08-03 17:33             ` D. Bahi
2004-08-03 19:31               ` Jeff Dike
2004-08-03 20:12                 ` D. Bahi
2004-08-04  7:47                   ` Tom Hughes
2004-08-03 22:04                 ` Nicholas Nethercote
2004-08-04  7:52                 ` Tom Hughes
2004-08-04 15:10                   ` Jeff Dike
2004-08-04 15:35                   ` Jeff Dike
2004-08-04 14:58                     ` Tom Hughes
2004-08-04 18:00                       ` Jeff Dike
2004-08-04 17:57                         ` Tom Hughes [this message]
2004-08-04 21:02                           ` Jeff Dike
2004-08-05  9:28                             ` Nicholas Nethercote
2004-08-05 13:15                               ` D. Bahi
2004-08-05 15:24                               ` Jeff Dike
2004-08-03 19:40               ` Jeff Dike
2004-08-04  1:09               ` Nuno Silva
2004-08-04  2:47                 ` D. Bahi

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=2b464bd94c.work@loxley.compton.nu \
    --to=thh@cyberscience.com \
    --cc=dbahi@enterasys.com \
    --cc=jdike@addtoit.com \
    --cc=jdike@sonycom.com \
    --cc=njn25@cam.ac.uk \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    --cc=valgrind-users@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.