Made sure that the sigqueue regression test passes on 32-bit and on 64-bit systems.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10922
This commit is contained in:
Bart Van Assche 2009-10-30 11:37:35 +00:00
parent 239f21d07e
commit e8e16af0dc
3 changed files with 13 additions and 10 deletions

View File

@ -8,18 +8,22 @@
#include <syscall.h>
#include <unistd.h>
int main()
int main(int argc, char **argv)
{
siginfo_t *si;
const size_t sz = sizeof(*si);
fprintf(stderr, "sizeof(*si) = %zu\n", sz);
fprintf(stderr, "%zd %zd %zd %zd\n",
offsetof(siginfo_t, si_signo),
offsetof(siginfo_t, si_errno),
offsetof(siginfo_t, si_code),
offsetof(siginfo_t, _sifields)
);
if (argc == 1) {
fprintf(stderr, "sizeof(*si) = %zu\n", sz);
fprintf(stdout, "offsetof(siginfo_t, si_signo) = %zd\n",
offsetof(siginfo_t, si_signo));
fprintf(stdout, "offsetof(siginfo_t, si_errno) = %zd\n",
offsetof(siginfo_t, si_errno));
fprintf(stdout, "offsetof(siginfo_t, si_code) = %zd\n",
offsetof(siginfo_t, si_code));
fprintf(stdout, "offsetof(siginfo_t, _sifields) = %zd\n",
offsetof(siginfo_t, _sifields));
}
si = calloc(1, sz);
si->si_signo = SIGWINCH;
si->si_code = SI_QUEUE;

View File

@ -1,6 +1,4 @@
sizeof(*si) = 128
0 4 8 16
Done.
HEAP SUMMARY:

View File

@ -1 +1,2 @@
prog: sigqueue
args: -q