Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/sys Do not allow 0 as ILL si_code as it's res...



details:   https://anonhg.NetBSD.org/src/rev/48c4fcf56597
branches:  trunk
changeset: 450771:48c4fcf56597
user:      kamil <kamil%NetBSD.org@localhost>
date:      Thu Apr 25 11:47:59 2019 +0000

description:
Do not allow 0 as ILL si_code as it's reserved for SI_USER

diffstat:

 tests/lib/libc/sys/t_ptrace_wait.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r ce637931c8bf -r 48c4fcf56597 tests/lib/libc/sys/t_ptrace_wait.c
--- a/tests/lib/libc/sys/t_ptrace_wait.c        Thu Apr 25 11:45:12 2019 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.c        Thu Apr 25 11:47:59 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_wait.c,v 1.112 2019/04/25 11:45:12 kamil Exp $        */
+/*     $NetBSD: t_ptrace_wait.c,v 1.113 2019/04/25 11:47:59 kamil Exp $        */
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.112 2019/04/25 11:45:12 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.113 2019/04/25 11:47:59 kamil Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -471,7 +471,7 @@
                ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SEGV_MAPERR);
                break;
        case SIGILL:
-               ATF_REQUIRE(info.psi_siginfo.si_code >= 0 &&
+               ATF_REQUIRE(info.psi_siginfo.si_code >= ILL_ILLOPC &&
                            info.psi_siginfo.si_code <= ILL_BADSTK);
                break;
        case SIGFPE:
@@ -648,7 +648,7 @@
                ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SEGV_MAPERR);
                break;
        case SIGILL:
-               ATF_REQUIRE(info.psi_siginfo.si_code >= 0 &&
+               ATF_REQUIRE(info.psi_siginfo.si_code >= ILL_ILLOPC &&
                            info.psi_siginfo.si_code <= ILL_BADSTK);
                break;
        case SIGFPE:
@@ -828,7 +828,7 @@
                ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SEGV_MAPERR);
                break;
        case SIGILL:
-               ATF_REQUIRE(info.psi_siginfo.si_code >= 0 &&
+               ATF_REQUIRE(info.psi_siginfo.si_code >= ILL_ILLOPC &&
                            info.psi_siginfo.si_code <= ILL_BADSTK);
                break;
        case SIGFPE:
@@ -2126,7 +2126,7 @@
                        FORKEE_ASSERT_EQ(info.psi_siginfo.si_code, SEGV_MAPERR);
                        break;
                case SIGILL:
-                       FORKEE_ASSERT(info.psi_siginfo.si_code >= 0 &&
+                       FORKEE_ASSERT(info.psi_siginfo.si_code >= ILL_ILLOPC &&
                                    info.psi_siginfo.si_code <= ILL_BADSTK);
                        break;
                case SIGFPE:



Home | Main Index | Thread Index | Old Index