|
From: Bart V. A. <bar...@gm...> - 2009-10-27 16:18:26
|
On Tue, Oct 27, 2009 at 4:47 PM, Tom Hughes <to...@co...> wrote: > On 27/10/09 15:22, Konstantin Serebryany wrote: > >> I have added a modified version of your test program to the repository >> and have filed this issue in bugzilla >> (https://bugs.kde.org/show_bug.cgi?id=212064). But I'm not sure that >> the proposed fix makes sense. The proposed modifications do not match >> the definitions in the kernel header files (<asm-generic/siginfo.h>). >> >> >> I took the code from /usr/include/bits/siginfo.h > > Which is a userland definition - valgrind deals with the system call > interface so need to work with kernel definitions. > > Basically somebody will need to work out what magic is going on between > glibc and the kernel that allows the two to have different expectations of > the size. The rt_sigqueueinfo wrapper in coregrind/m_syswrap/syswrap-linux.c contains a.o. the following statement: PRE_MEM_READ( "rt_sigqueueinfo(uinfo)", ARG3, sizeof(vki_siginfo_t) ); Apparently the size of the vki_siginfo_t structure defined in Valgrind's header files is larger than VKI_SI_MAX_SIZE. This doesn't make sense. I found the following comment in include/vki/vki-linux.h, of which I'm not sure that it is correct: ... // [[Nb: this type changed between 2.4 and 2.6, but not in a way that // affects Valgrind.]] typedef struct vki_siginfo { ... Bart. |