Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm uvm(9): KASSERT(A && B) -> KASSERT(A); KASSERT(B)
details: https://anonhg.NetBSD.org/src/rev/6c50cd6c6f47
branches: trunk
changeset: 373769:6c50cd6c6f47
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Feb 27 16:24:45 2023 +0000
description:
uvm(9): KASSERT(A && B) -> KASSERT(A); KASSERT(B)
While here, print some of the inputs with KASSERTMSG.
diffstat:
sys/uvm/uvm_map.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (40 lines):
diff -r bdfbd3cd0ff9 -r 6c50cd6c6f47 sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Mon Feb 27 16:24:28 2023 +0000
+++ b/sys/uvm/uvm_map.c Mon Feb 27 16:24:45 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_map.c,v 1.403 2022/11/23 23:53:53 riastradh Exp $ */
+/* $NetBSD: uvm_map.c,v 1.404 2023/02/27 16:24:45 riastradh Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.403 2022/11/23 23:53:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.404 2023/02/27 16:24:45 riastradh Exp $");
#include "opt_ddb.h"
#include "opt_pax.h"
@@ -2123,7 +2123,10 @@
else
tmp = RIGHT_ENTRY(prev);
for (;;) {
- KASSERT(tmp && tmp->maxgap >= length);
+ KASSERT(tmp);
+ KASSERTMSG(tmp->maxgap >= length,
+ "tmp->maxgap=0x%"PRIxVSIZE" length=0x%"PRIxVSIZE,
+ tmp->maxgap, length);
if (topdown)
child = RIGHT_ENTRY(tmp);
else
@@ -2685,7 +2688,8 @@
* REMOVE.
*/
- KASSERT((start & PAGE_MASK) == 0 && (len & PAGE_MASK) == 0);
+ KASSERTMSG((start & PAGE_MASK) == 0, "start=0x%"PRIxVADDR, start);
+ KASSERTMSG((len & PAGE_MASK) == 0, "len=0x%"PRIxVADDR, len);
KASSERT((flags & UVM_EXTRACT_REMOVE) == 0 ||
(flags & (UVM_EXTRACT_CONTIG|UVM_EXTRACT_QREF)) == 0);
Home |
Main Index |
Thread Index |
Old Index