[CRIU] [PATCH 2/2] session02: hard-code the value of the macro CLONE_STACK_SIZE

Alexander Kartashov alekskartashov at parallels.com
Wed Apr 3 12:03:03 EDT 2013


The macro PAGE_SIZE is declared in the following way in Debian:

 #define PAGE_SIZE               (sysconf(_SC_PAGESIZE))

that makes it impossible to use the macro as the size of
the array clone_args::stack since this generates the following error:

cc -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -iquote ../../lib/arch/arm/include -I../../lib   session02.c ../../lib/libzdtmtst.a   -o session02
session02.c:70:7: error: variably modified 'stack' at file scope

Cc: Andrey Vagin <avagin at openvz.org>
Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
---
 test/zdtm/live/static/session02.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/zdtm/live/static/session02.c b/test/zdtm/live/static/session02.c
index 201e469..0638b87 100644
--- a/test/zdtm/live/static/session02.c
+++ b/test/zdtm/live/static/session02.c
@@ -64,7 +64,7 @@ static void mainloop()
 		handle_command();
 }
 
-#define CLONE_STACK_SIZE	PAGE_SIZE
+#define CLONE_STACK_SIZE	4096
 /* All arguments should be above stack, because it grows down */
 struct clone_args {
 	char stack[CLONE_STACK_SIZE];
-- 
1.7.10.4



More information about the CRIU mailing list