From dd00364807020a244aa8be4f3481f7ec0fefcc79 Mon Sep 17 00:00:00 2001 From: Chris Dearman Date: Sat, 4 Jan 2014 12:57:39 +0000 Subject: [PATCH] Pass a valid stack pointer to __bionic_clone in pthread.__bionic_clone __bionic_clone modifies the child stack before cloning so the stack pointer should be valid. The test is expecting an EINVAL error to be generated from the incorrect flags: CLONE_THREAD set without CLONE_SIGHAND. Change-Id: Ic02192081f6f52df6f03d9810efa82d923247a11 --- tests/pthread_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/pthread_test.cpp b/tests/pthread_test.cpp index e7a952aa2..bcef5662e 100644 --- a/tests/pthread_test.cpp +++ b/tests/pthread_test.cpp @@ -251,7 +251,7 @@ TEST(pthread, __bionic_clone) { // Check that our hand-written clone assembler sets errno correctly on failure. uintptr_t fake_child_stack[16]; errno = 0; - ASSERT_EQ(-1, __bionic_clone(CLONE_THREAD, &fake_child_stack[0], NULL, NULL, NULL, NULL, NULL)); + ASSERT_EQ(-1, __bionic_clone(CLONE_THREAD, &fake_child_stack[16], NULL, NULL, NULL, NULL, NULL)); ASSERT_EQ(EINVAL, errno); } #endif