|
From: Tom H. <th...@cy...> - 2003-10-06 13:48:01
|
In message <Pin...@jd...>
Derick Rethans <de...@ph...> wrote:
> While debugging a program Valgrind (1.9.6) gave me the following error:
[ snipped banner ]
> valgrind: vg_ldt.c:167 (vgPlain_do_useseg): Assertion `(seg_selector & 7) == 7' failed.
>
> sched status:
>
> Thread 1: status = Runnable, associated_mx = 0x0, associated_cv = 0x0
> ==15995== at 0x42029E51: __new_exitfn (in /lib/tls/libc-2.3.2.so)
> ==15995== by 0x42029E08: __cxa_atexit_internal (in /lib/tls/libc-2.3.2.so)
> ==15995== by 0x40837727: (within /usr/lib/libstdc++.so.5.0.3)
> ==15995== by 0x40837779: (within /usr/lib/libstdc++.so.5.0.3)
>
> The program uses wxWindows, and was compiled with 3.2.2 on RedHat 9.
> Does anybody knows what might be wrong?
Yes. That assertion fires if the program tries to use a segment
register that refers to the GDT rather than the LDT. The normal
reason for that is that you're on a system that uses NPTL rather
than linux threads.
Recent versions of valgrind set LD_ASSUME_KERNEL in order to force
the system to fall back to linux threads, but you're using a fairly
old version which presumably doesn't.
Either upgrade to a more recent version or set LD_ASSUME_KERNEL to
2.4.1 in your environment and it should work.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|