Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Apr 2016 19:06:33 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r297515 - projects/vnet/sys/kern
Message-ID:  <201604021906.u32J6X3T001366@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Sat Apr  2 19:06:33 2016
New Revision: 297515
URL: https://svnweb.freebsd.org/changeset/base/297515

Log:
  Make the KASSERT message in hash destroy more informative.
  While the pointer might not be too helpful, the malloc type might
  at least give a good hint about which hashtbl we are talking.
  
  Sponsored by:	The FreeBD Foundation
  Put up as Differential Revision:	D5802

Modified:
  projects/vnet/sys/kern/subr_hash.c

Modified: projects/vnet/sys/kern/subr_hash.c
==============================================================================
--- projects/vnet/sys/kern/subr_hash.c	Sat Apr  2 16:53:12 2016	(r297514)
+++ projects/vnet/sys/kern/subr_hash.c	Sat Apr  2 19:06:33 2016	(r297515)
@@ -93,7 +93,8 @@ hashdestroy(void *vhashtbl, struct mallo
 
 	hashtbl = vhashtbl;
 	for (hp = hashtbl; hp <= &hashtbl[hashmask]; hp++)
-		KASSERT(LIST_EMPTY(hp), ("%s: hash not empty", __func__));
+		KASSERT(LIST_EMPTY(hp), ("%s: hashtbl %p not empty "
+		    "(malloc type %s)", __func__, hashtbl, type->ks_shortdesc));
 	free(hashtbl, type);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604021906.u32J6X3T001366>