diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-09-04 18:08:05 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-09-04 18:08:05 +0000 |
commit | 64d1a73884c217de4e5c7107197784f586e4a261 (patch) | |
tree | fe4861088bfe9e67b8487e737c5442f6901f1088 /regress/sys | |
parent | 10a1a193e083b75702ae54b4d4ec7aa610473e91 (diff) |
When passing the (1ULL << 32) to EV_SET, it gets casted to __uintptr_t.
On 32 bit architectues, the high bit is lost and the test fails.
Create an invalid pid in the lower 32 bits.
OK guenther@
Diffstat (limited to 'regress/sys')
-rw-r--r-- | regress/sys/kern/kqueue/kqueue-process.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/regress/sys/kern/kqueue/kqueue-process.c b/regress/sys/kern/kqueue/kqueue-process.c index a579445cdd5..a9b800a4726 100644 --- a/regress/sys/kern/kqueue/kqueue-process.c +++ b/regress/sys/kern/kqueue/kqueue-process.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kqueue-process.c,v 1.10 2016/07/14 05:55:08 guenther Exp $ */ +/* $OpenBSD: kqueue-process.c,v 1.11 2016/09/04 18:08:04 bluhm Exp $ */ /* * Written by Artur Grabowski <art@openbsd.org> 2002 Public Domain */ @@ -67,7 +67,7 @@ do_process(void) warn("can't register events on kqueue")); /* negative case */ - EV_SET(&ke, pid + (1ULL << 32), EVFILT_PROC, EV_ADD|EV_ENABLE|EV_CLEAR, + EV_SET(&ke, pid + (1ULL << 30), EVFILT_PROC, EV_ADD|EV_ENABLE|EV_CLEAR, NOTE_EXIT|NOTE_FORK|NOTE_EXEC|NOTE_TRACK, 0, NULL); ASS(kevent(kq, &ke, 1, NULL, 0, NULL) != 0, warnx("can register bogus pid on kqueue")); |