|
From: Tom H. <th...@cy...> - 2004-02-28 18:19:57
|
In message <0aa...@lo...>
Tom Hughes <th...@cy...> wrote:
> There is also a new assertion firing in some tests:
>
> + valgrind: vg_libpthread.c:... (pthread_cond_init): Assertion `sizeof(*cond) >=
> sizeof(vg_pthread_cond_t)' failed.
>
> Presumably pthread_cond_t is a bit smaller in glibc 2.2 or something.
Indeed. Having checked, it looks like the padding was only added
to pthread_cond_t in recent glibc's. On RH7.2 and 7.3 we have this:
/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */
typedef struct
{
struct _pthread_fastlock __c_lock; /* Protect against concurrent access */
_pthread_descr __c_waiting; /* Threads waiting on this condition */
} pthread_cond_t;
but by RH8.0 it has become this:
typedef struct
{
struct _pthread_fastlock __c_lock; /* Protect against concurrent access */
_pthread_descr __c_waiting; /* Threads waiting on this condition */
char __padding[48 - sizeof (struct _pthread_fastlock)
- sizeof (_pthread_descr) - sizeof (__pthread_cond_align_t)];
__pthread_cond_align_t __align;
} pthread_cond_t;
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|