summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-01-15 01:43:45 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-01-15 01:43:45 +0000
commit918e0e07994fa03ed227e84ec1fac37384f72339 (patch)
tree348accb7de7ca27530929519a778e826b285fbe3 /sys
parentfccbec9e73d716dfc636b707544aac3f82939622 (diff)
skip zero-sized memory regions, which pass otherwise due to the address rounding and such; from Carson Harding <harding@motd.ca>
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/machdep.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index dc913b17665..624abaa9a24 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.217 2002/12/17 23:11:32 millert Exp $ */
+/* $OpenBSD: machdep.c,v 1.218 2003/01/15 01:43:44 mickey Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -2188,6 +2188,14 @@ init386(first_avail)
printf(" %u-%u", a, e);
#endif
+ /* skip zero sized regions */
+ if (im->size == 0) {
+#ifdef DEBUG
+ printf("-Z");
+#endif
+ continue;
+ }
+
/* skip shorter than page regions */
if ((e - a) < NBPG) {
#ifdef DEBUG