From: no author Date: Tue, 16 Nov 2004 19:40:05 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create branch X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ba2145a1a150ade806c314b9aeae12899999de1;p=thirdparty%2Fvalgrind.git This commit was manufactured by cvs2svn to create branch 'VALGRIND_2_2_0_BRANCH'. git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@3031 --- diff --git a/none/tests/pth_stackalign.c b/none/tests/pth_stackalign.c new file mode 100644 index 0000000000..df8e561367 --- /dev/null +++ b/none/tests/pth_stackalign.c @@ -0,0 +1,34 @@ +#include +#include +#include +#include +#include + +static void *thread_main(void *arg) +{ + uintptr_t address = (uintptr_t)&arg; + + printf("alignment = %" PRIuPTR "\n", address & 3U); + + return NULL; +} + +int main(int argc, char **argv) +{ + pthread_t t; + int e; + + if ((e = pthread_create(&t, NULL, thread_main, NULL)) != 0) + { + fprintf(stderr, "pthread_create: %s\n", strerror(e)); + exit(1); + } + + if ((e = pthread_join(t, NULL)) != 0) + { + fprintf(stderr, "pthread_join: %s\n", strerror(e)); + exit(1); + } + + exit(0); +} diff --git a/none/tests/pth_stackalign.stderr.exp b/none/tests/pth_stackalign.stderr.exp new file mode 100644 index 0000000000..139597f9cb --- /dev/null +++ b/none/tests/pth_stackalign.stderr.exp @@ -0,0 +1,2 @@ + + diff --git a/none/tests/pth_stackalign.stdout.exp b/none/tests/pth_stackalign.stdout.exp new file mode 100644 index 0000000000..86e86d11c5 --- /dev/null +++ b/none/tests/pth_stackalign.stdout.exp @@ -0,0 +1 @@ +alignment = 0 diff --git a/none/tests/pth_stackalign.vgtest b/none/tests/pth_stackalign.vgtest new file mode 100644 index 0000000000..f28ac1b042 --- /dev/null +++ b/none/tests/pth_stackalign.vgtest @@ -0,0 +1 @@ +prog: pth_stackalign