Verified Commit f0cddfb6 authored by Marc Vef's avatar Marc Vef
Browse files

Fix: syscall_intercept clone3 patch

parent e32fd199
Loading
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2,13 +2,16 @@ diff --git a/src/intercept.c b/src/intercept.c
index 41fd95d..c0cd865 100644
--- a/src/intercept.c
+++ b/src/intercept.c
@@ -689,7 +689,8 @@ intercept_routine(struct context *context)
@@ -689,7 +689,12 @@ intercept_routine(struct context *context)
 		 * the clone_child_intercept_routine instead, executing
 		 * it on the new child threads stack, then returns to libc.
 		 */
-		if (desc.nr == SYS_clone && desc.args[1] != 0)
+#ifdef SYS_clone3
+		if ((desc.nr == SYS_clone || desc.nr == SYS_clone3) &&
+				desc.args[1] != 0)
+#else
 		if (desc.nr == SYS_clone && desc.args[1] != 0)
+#endif
 			return (struct wrapper_ret){
 				.rax = context->rax, .rdx = 2 };
 		else