mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 10:05:29 +00:00
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:
parent
239f21d07e
commit
e8e16af0dc
@ -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;
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
|
||||
sizeof(*si) = 128
|
||||
0 4 8 16
|
||||
Done.
|
||||
|
||||
HEAP SUMMARY:
|
||||
|
||||
@ -1 +1,2 @@
|
||||
prog: sigqueue
|
||||
args: -q
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user