> Does anyone know how can we run  Webrunnerwidgets using valgrind?

>> ==24551== Unsupported clone() flags: 0x800600

/usr/include/bits/sched.h:
# define CLONE_VM      0x00000100 /* Set if VM shared between processes.  */
# define CLONE_FS      0x00000200 /* Set if fs info shared between processes.  
*/
# define CLONE_FILES   0x00000400 /* Set if open files shared between 
processes.  */
# define CLONE_PTRACE  0x00002000 /* Set if tracing continues on the child.  */
# define CLONE_UNTRACED 0x00800000 /* Set if the tracing process can't
                                      force CLONE_PTRACE on this clone.  */

coregrind/m_syswrap/syswrap-<architecture>-linux.c:
PRE(sys_clone)
   switch (cloneflags & (VKI_CLONE_VM | VKI_CLONE_FS
                         | VKI_CLONE_FILES | VKI_CLONE_VFORK)) {
   case VKI_CLONE_VM | VKI_CLONE_FS | VKI_CLONE_FILES:  /* new thread */
   case VKI_CLONE_VFORK | VKI_CLONE_VM: /* vfork */
   case 0: /* plain fork */
   default:  /* unknown */

The deciding bit is CLONE_VM, which is _not_ set in flags of Webrunnerwidgets.
This means that the clone() is some kind of "plain fork (new process)",
not "new thread (in same process)".

Valgrind is overly cautious because valgrind does not know the meaning of
"plain fork (new process), but shared fs info and shared files (CLONE_FS |
CLONE_FILES)".  I don't know the meaning of this, either.

The obvious work-around is to add a statement at the end of
the "default:" case in PRE(sys_clone), after all the VG(message)s:
   if (0==(CLONE_VM & cloneflags))
      goto plain_fork;
and add a label "plain_fork:" just after "case 0:".  If this works, then
congratulations!  If it doesn't work, then pester the implementors
of Webrunnerwidgets to explain their use of clone_flags, and point out
that those implementors should help valgrind deal with such usage,
else be held responsible for impeding code quality.

-- 


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to