capget capget.stderr.exp \
lsframe1.vgtest lsframe1.stdout.exp lsframe1.stderr.exp \
lsframe2.vgtest lsframe2.stdout.exp lsframe2.stderr.exp \
+ sigqueue.vgtest sigqueue.stderr.exp \
stack_changes.stderr.exp stack_changes.stdout.exp \
stack_changes.stdout.exp2 stack_changes.vgtest \
stack_switch.stderr.exp stack_switch.vgtest \
capget \
lsframe1 \
lsframe2 \
+ sigqueue \
stack_changes \
stack_switch \
timerfd-syscall
--- /dev/null
+#include <signal.h>
+#include <string.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <syscall.h>
+#include <unistd.h>
+
+int main()
+{
+ 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)
+ );
+ si = calloc(1, sz);
+ si->si_signo = SIGWINCH;
+ si->si_code = SI_QUEUE;
+ si->si_pid = getpid();
+ si->si_uid = getuid();
+ syscall(__NR_rt_sigqueueinfo, getpid(), SIGWINCH, si);
+ free(si);
+ fprintf(stderr, "Done.\n");
+ return 0;
+}
--- /dev/null
+
+sizeof(*si) = 128
+0 4 8 16
+Done.
+
+HEAP SUMMARY:
+ in use at exit: 0 bytes in 0 blocks
+ total heap usage: 1 allocs, 1 frees, 128 bytes allocated
+
+For a detailed leak analysis, rerun with: --leak-check=full
+
+For counts of detected and suppressed errors, rerun with: -v
+ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)