[CRIU] [PATCH 09/14] alpine: sigaltstack returns EINVAL if SS_ONSTACK is set

Andrei Vagin avagin at virtuozzo.com
Sat Jun 2 00:02:59 MSK 2018


Actually this flag is ignored by kernel.

Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
---
 test/zdtm/static/sigaltstack.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/zdtm/static/sigaltstack.c b/test/zdtm/static/sigaltstack.c
index 3ccd18277..d324b0d37 100644
--- a/test/zdtm/static/sigaltstack.c
+++ b/test/zdtm/static/sigaltstack.c
@@ -64,7 +64,7 @@ static void *thread_func(void *arg)
 	sas_state[SAS_THRD_OLD] = (stack_t) {
 		.ss_size	= sizeof(stack_thread) - 8,
 		.ss_sp		= stack_thread,
-		.ss_flags	= SS_ONSTACK,
+		.ss_flags	= 0,
 	};
 
 	struct sigaction sa = {
@@ -106,7 +106,7 @@ int main(int argc, char *argv[])
 	sas_state[SAS_MAIN_OLD] = (stack_t) {
 		.ss_size	= sizeof(stack_main) - 8,
 		.ss_sp		= stack_main,
-		.ss_flags	= SS_ONSTACK,
+		.ss_flags	= 0,
 	};
 
 	struct sigaction sa = {
@@ -151,6 +151,9 @@ int main(int argc, char *argv[])
 	}
 	task_waiter_fini(&t);
 
+	sas_state[SAS_THRD_OLD].ss_flags = SS_ONSTACK;
+	sas_state[SAS_MAIN_OLD].ss_flags = SS_ONSTACK;
+
 	show_ss("main old", &sas_state[SAS_MAIN_OLD]);
 	show_ss("main new", &sas_state[SAS_MAIN_NEW]);
 	show_ss("thrd old", &sas_state[SAS_THRD_OLD]);
-- 
2.14.3



More information about the CRIU mailing list