summaryrefslogtreecommitdiff
path: root/regress/sys
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-07-20 18:22:26 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-07-20 18:22:26 +0000
commit9eb9e561d4c9412e4b63122562ceb8ba66cbe135 (patch)
tree8ba85baf26ff8ba61dbffcb4cc85c5d63e599acd /regress/sys
parenta9928f0ba236806bb876d27b0498091c964ec03e (diff)
Accessing a mmap(2)ed file behind its end should result in a SIGBUS
according to POSIX. Bring regression test and kernel in line for amd64 and i386. Other architectures have to follow. OK deraadt@ kettenis@
Diffstat (limited to 'regress/sys')
-rw-r--r--regress/sys/kern/siginfo-fault/siginfo-fault.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regress/sys/kern/siginfo-fault/siginfo-fault.c b/regress/sys/kern/siginfo-fault/siginfo-fault.c
index 07b941edff2..b5b7c4ce98b 100644
--- a/regress/sys/kern/siginfo-fault/siginfo-fault.c
+++ b/regress/sys/kern/siginfo-fault/siginfo-fault.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siginfo-fault.c,v 1.4 2017/07/13 00:29:14 bluhm Exp $ */
+/* $OpenBSD: siginfo-fault.c,v 1.5 2017/07/20 18:22:25 bluhm Exp $ */
/*
* Copyright (c) 2014 Google Inc.
*
@@ -156,7 +156,7 @@ main()
p[3] = 1;
FAIL();
}
- fail += checksig("mmap file", SIGBUS, BUS_ADRERR, p + 3);
+ fail += checksig("mmap file", SIGBUS, BUS_OBJERR, p + 3);
return (fail);
}