Re: New tarball of valgrind for WINE available

2003-11-07 Thread Adam Gundy
At 13:37 04/11/2003 +0100, Lionel Ulmer wrote:
On Tue, Nov 04, 2003 at 10:57:07AM +, Adam Gundy wrote:
 that looks like an incorrect or corrupt segment selector (thread local storage).
 
 one possibility is that it is trying to use the GDT instead of the LDT - are you
 using WINE with NPTL? try it with NPTL disabled if you are...

I am using Wine without NPTL support on a glibc-2.3.2 system but with a
stock 2.4 kernel.

Wine works just fine, it's only Wine + Valgrind that fails.

sorry for the long delay, very busy at the moment.

can you try setting the environment variable:

 LD_ASSUME_KERNEL=2.2.5

before running valgrind - it really doesn't like NPTL. In theory the 'valgrind'
shell script should be doing this if you have NPTL, but it may not be detecting
things correctly...


Seeya,
 Adam
--
Real Programmers don't comment their code. If it was hard to write,
it should be hard to read, and even harder to modify.
These are all my own opinions.




Re: New tarball of valgrind for WINE available

2003-11-04 Thread Lionel Ulmer
On Tue, Nov 04, 2003 at 10:57:07AM +, Adam Gundy wrote:
 that looks like an incorrect or corrupt segment selector (thread local storage).
 
 one possibility is that it is trying to use the GDT instead of the LDT - are you
 using WINE with NPTL? try it with NPTL disabled if you are...

I am using Wine without NPTL support on a glibc-2.3.2 system but with a
stock 2.4 kernel.

Wine works just fine, it's only Wine + Valgrind that fails.

 Lionel

-- 
 Lionel Ulmer - http://www.bbrox.org/



Re: New tarball of valgrind for WINE available

2003-11-03 Thread Raphaël Junqueira
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Adam

 A new tarball of valgrind modified to work with WINE is available from the
 valgrind home page:

   http://developer.kde.org/~sewardj/
   http://developer.kde.org/~sewardj/valgrind-20031012-wine.tar.bz2

 this is based on the latest stable valgrind release.

 use a current CVS or the latest snapshot of WINE.


 Seeya,
  Adam

Trying to run valgrind on wine directx (running Unreal2 with nvidia openGL 
drivers)

- - valgrind --workaround-gcc296-bugs=yes wine -- Unreal2.exe

snip
==13022== Conditional jump or move depends on uninitialised value(s)
==13022==at 0x40008BCA: _dl_relocate_object_internal (do-rel.h:117)
==13022==by 0x4038244E: (within /lib/i686/libc-2.3.2.so)
==13022==by 0x4000ABD7: _dl_catch_error_internal (dl-error.c:162)
==13022==by 0x4038212D: _dl_open (in /lib/i686/libc-2.3.2.so)
==13022== Warning: noted but unhandled ioctl 0x30B with no size/direction 
hints
==13022==This could cause spurious value errors to appear.
==13022==See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a 
proper wrapper.
snip
==13022==
==13022== Conditional jump or move depends on uninitialised value(s)
==13022==at 0x4000F6E9: strlen (strlen.S:112)
==13022==by 0x40382223: _dl_open (in /lib/i686/libc-2.3.2.so)
==13022==by 0x403A8000: (within /lib/libdl-2.3.2.so)
==13022==by 0x4000ABD7: _dl_catch_error_internal (dl-error.c:162)
==13022== discard syms in /etc/ld.so.cache due to munmap()
==13022== valgrind's libpthread.so: UNIMPLEMENTED FUNCTION: 
pthread_attr_setstack
==13022==

after it exit :(
How to get it working ? 

Regards,
Raphael
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/ps4jp7NA3AmQTU4RAn2jAJ914yJTP89ZQIrFknohWEasSm4/sgCfY0vr
rtj/5Lfvg1DN6g3Kde0JObU=
=Hxr5
-END PGP SIGNATURE-




Re: New tarball of valgrind for WINE available

2003-11-03 Thread Lionel Ulmer
 Trying to run valgrind on wine directx (running Unreal2 with nvidia openGL 
 drivers)

I think it's best to use software GL when using Valgrind... It is reported
to make the DRI crash and not support all syscalls needed by the NVIDIA GL
drivers.

Anyway, I have a different issue :

valgrind: vg_ldt.c:167 (vgPlain_do_useseg): Assertion (seg_selector  7) == 7' failed.

   Lionel

-- 
 Lionel Ulmer - http://www.bbrox.org/



Re: New tarball of valgrind for WINE available

2003-11-03 Thread Raphaël Junqueira
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Le Monday 03 November 2003 23:06, Lionel Ulmer a écrit :
  Trying to run valgrind on wine directx (running Unreal2 with nvidia
  openGL drivers)

 I think it's best to use software GL when using Valgrind... It is reported
 to make the DRI crash and not support all syscalls needed by the NVIDIA GL
 drivers.

well it seems NTPL-related (only one real reference of  pthread_attr_setstack, 
in ntdll):

int SYSDEPS_SpawnThread( void (*func)(TEB *), TEB *teb )
{
#ifdef HAVE_NPTL
pthread_t id;
pthread_attr_t attr;

pthread_attr_init( attr );
pthread_attr_setstack( attr, teb-DeallocationStack,
   (char *)teb-Tib.StackBase - (char 
*)teb-DeallocationStack );
if (pthread_create( id, attr, (void * (*)(void *))func, teb )) return 
- -1;
return 0;
#elif defined(HAVE_CLONE)
snip

Implementing it into valgrind is difficult ?

 Anyway, I have a different issue :

 valgrind: vg_ldt.c:167 (vgPlain_do_useseg): Assertion (seg_selector  7) ==
 7' failed.

strange, valgrind love wine :p

Lionel

Regards,
Raphael
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/ptNCp7NA3AmQTU4RAgF6AJ9p1GkWWvPsbr+fOiYBPnQyeLBTPgCeMPuQ
9GcdAWRKgK7ANP4+MBCOAlE=
=LJV6
-END PGP SIGNATURE-




Re: New tarball of valgrind for WINE available

2003-11-03 Thread Raphaël Junqueira
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi again,

With my little patch, valgrind/NTPL wine works like a charm (even with unreal2 
and after too many errors) :)

Now going to sleep

Regards,
Raphael

Le Monday 03 November 2003 23:14, Raphaël Junqueira a écrit :
 Le Monday 03 November 2003 23:06, Lionel Ulmer a écrit :
   Trying to run valgrind on wine directx (running Unreal2 with nvidia
   openGL drivers)
 
  I think it's best to use software GL when using Valgrind... It is
  reported to make the DRI crash and not support all syscalls needed by the
  NVIDIA GL drivers.

 well it seems NTPL-related (only one real reference of 
 pthread_attr_setstack, in ntdll):

 int SYSDEPS_SpawnThread( void (*func)(TEB *), TEB *teb )
 {
 #ifdef HAVE_NPTL
 pthread_t id;
 pthread_attr_t attr;

 pthread_attr_init( attr );
 pthread_attr_setstack( attr, teb-DeallocationStack,
(char *)teb-Tib.StackBase - (char
 *)teb-DeallocationStack );
 if (pthread_create( id, attr, (void * (*)(void *))func, teb )) return
 -1;
 return 0;
 #elif defined(HAVE_CLONE)
 snip

 Implementing it into valgrind is difficult ?

  Anyway, I have a different issue :
 
  valgrind: vg_ldt.c:167 (vgPlain_do_useseg): Assertion (seg_selector  7)
  == 7' failed.

 strange, valgrind love wine :p

 Lionel

 Regards,
 Raphael
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/puqlp7NA3AmQTU4RApWdAJ9GaAVd/YSxLtvKJzvvjRZi53GVzQCeKNCC
KX7p0QikmBaAOqWwKsKWQjs=
=+iec
-END PGP SIGNATURE-
Seulement dans ./addrcheck: .deps
Seulement dans ./addrcheck/docs: Makefile
Seulement dans ./addrcheck: Makefile
Seulement dans ./addrcheck/tests: Makefile
Seulement dans ./auxprogs: .deps
Seulement dans ./auxprogs: Makefile
Seulement dans ./auxprogs: valgrind-listener
Seulement dans ./cachegrind: cg_annotate
Seulement dans ./cachegrind: .deps
Seulement dans ./cachegrind/docs: Makefile
Seulement dans ./cachegrind: Makefile
Seulement dans ./cachegrind/tests: .deps
Seulement dans ./cachegrind/tests: Makefile
Seulement dans .: config.h
Seulement dans .: config.log
Seulement dans .: config.status
Seulement dans ./corecheck: .deps
Seulement dans ./corecheck/docs: Makefile
Seulement dans ./corecheck: Makefile
Seulement dans ./corecheck/tests: .deps
Seulement dans ./corecheck/tests: Makefile
Seulement dans ./coregrind/demangle: .deps
Seulement dans ./coregrind/demangle: libdemangle.a
Seulement dans ./coregrind/demangle: Makefile
Seulement dans ./coregrind: .deps
Seulement dans ./coregrind/docs: Makefile
Seulement dans ./coregrind: .in_place
Seulement dans ./coregrind: lib_replace_malloc.a
Seulement dans ./coregrind: Makefile
Seulement dans ./coregrind: valgrind
Seulement dans ./coregrind: vg_include.h~
diff --exclude='*.*o' -r -u ../valgrind-20031012-wine/coregrind/vg_libpthread.c 
./coregrind/vg_libpthread.c
--- ../valgrind-20031012-wine/coregrind/vg_libpthread.c 2003-10-17 13:46:50.0 
+0200
+++ ./coregrind/vg_libpthread.c 2003-11-04 00:44:12.0 +0100
@@ -377,6 +377,33 @@
barf(buf);
 }
 
+WEAK
+int pthread_attr_setstack (pthread_attr_t *__attr,
+  void* __stackaddr,
+  size_t __stacksize)
+{
+   size_t limit;
+   char buf[1024];
+   ensure_valgrind(pthread_attr_setstack);
+   limit = VG_PTHREAD_STACK_SIZE - VG_AR_CLIENT_STACKBASE_REDZONE_SZB;
+   if (__stacksize = limit  NULL != __stackaddr) {
+ __attr-__stackaddr = __stackaddr;
+ __attr-__stacksize = __stacksize;
+ return 0;
+   }
+   if (__stacksize  limit) {
+ snprintf(buf, sizeof(buf), pthread_attr_setstack: 
+ requested size %d  VG_PTHREAD_STACK_SIZE - 
VG_AR_CLIENT_STACKBASE_REDZONE_SZ\n   
+ edit vg_include.h and rebuild., __stacksize);
+   } else if (NULL == __stackaddr) {
+ snprintf(buf, sizeof(buf), pthread_attr_setstack: 
+ requested with a null stack pointer.);
+   }
+   buf[sizeof(buf)-1] = '\0'; /* Make sure it is zero terminated */
+   barf(buf);
+}
+
+
 
 /* This is completely bogus. */
 int  pthread_attr_getschedparam(const  pthread_attr_t  *attr,  
@@ -721,6 +748,11 @@
inttid_child;
NewThreadInfo* info;
int (*clone_fn)( void* (*)(void *), void *, int, void * );
+   struct {
+ int clone_flags;
+ void* user_stackaddr;
+ size_t user_stacksize;
+   } thread_create_info;
 
ensure_valgrind(pthread_create);
 
@@ -733,10 +765,17 @@
info = my_malloc(sizeof(NewThreadInfo));
my_assert(info != NULL);
 
-   if (__attr)
+   if (__attr) {
   info-attr__detachstate = __attr-__detachstate;
-   else 
+  thread_create_info.user_stackaddr = __attr-__stackaddr;
+  thread_create_info.user_stacksize = __attr-__stacksize;
+   } else {
   info-attr__detachstate = PTHREAD_CREATE_JOINABLE;
+  thread_create_info.user_stackaddr = NULL;
+  thread_create_info.user_stacksize = 0;
+   }
+
+   thread_create_info.clone_flags = flags;
 
info-root_fn = 

Re: New tarball of valgrind for WINE available

2003-10-31 Thread Dimitrie O. Paun
On October 31, 2003 05:38 am, Adam Gundy wrote:
 that looks unlikely at the moment :-(

Darn. Even if we have to provide a switch (like --wine)
to valgrind? That would be so much better than a different
binary. What's the problem, BTW?

-- 
Dimi.




Re: New tarball of valgrind for WINE available

2003-10-30 Thread Dimitrie O. Paun
On October 29, 2003 08:44 am, Adam Gundy wrote:
 A new tarball of valgrind modified to work with WINE is available from the
 valgrind home page:

   http://developer.kde.org/~sewardj/
   http://developer.kde.org/~sewardj/valgrind-20031012-wine.tar.bz2

 this is based on the latest stable valgrind release.

Any chance this will be merge into mainline valgrind?

-- 
Dimi.




New tarball of valgrind for WINE available

2003-10-29 Thread Adam Gundy
A new tarball of valgrind modified to work with WINE is available from the
valgrind home page:

  http://developer.kde.org/~sewardj/
  http://developer.kde.org/~sewardj/valgrind-20031012-wine.tar.bz2

this is based on the latest stable valgrind release.

use a current CVS or the latest snapshot of WINE.


Seeya,
 Adam
--
Real Programmers don't comment their code. If it was hard to write,
it should be hard to read, and even harder to modify.
These are all my own opinions.