Module Name:    src
Committed By:   kamil
Date:           Mon May 14 12:42:34 UTC 2018

Modified Files:
        src/tests/lib/libc/sys: t_ptrace_amd64_wait.h

Log Message:
Simplify the x86_64_cve_2018_8897 ATF ptrace(2) test

Do not call _exit() from the child, ad this code shall not be reached.
Put there assert().

No functional change. The test still passes.

Sponsored by <The NetBSD Foundation>


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_ptrace_amd64_wait.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/sys/t_ptrace_amd64_wait.h
diff -u src/tests/lib/libc/sys/t_ptrace_amd64_wait.h:1.3 src/tests/lib/libc/sys/t_ptrace_amd64_wait.h:1.4
--- src/tests/lib/libc/sys/t_ptrace_amd64_wait.h:1.3	Sun May 13 23:14:47 2018
+++ src/tests/lib/libc/sys/t_ptrace_amd64_wait.h	Mon May 14 12:42:34 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_amd64_wait.h,v 1.3 2018/05/13 23:14:47 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_amd64_wait.h,v 1.4 2018/05/14 12:42:34 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -239,7 +239,6 @@ trigger_cve_2018_8897(void)
 
 ATF_TC_BODY(x86_64_cve_2018_8897, tc)
 {
-	const int exitval = 5;
 	const int sigval = SIGSTOP;
 	pid_t child, wpid;
 #if defined(TWAIT_HAVE_STATUS)
@@ -274,8 +273,8 @@ ATF_TC_BODY(x86_64_cve_2018_8897, tc)
 
 		trigger_cve_2018_8897();
 
-		DPRINTF("Before exiting of the child process\n");
-		_exit(exitval);
+		/* NOTREACHED */
+		FORKEE_ASSERTX(0 && "This shall not be reached");
 	}
 	DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(), child);
 

Reply via email to