Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Apr 2016 09:24:05 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r297732 - head/sys/kern
Message-ID:  <201604090924.u399O5rG092580@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Sat Apr  9 09:24:05 2016
New Revision: 297732
URL: https://svnweb.freebsd.org/changeset/base/297732

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.
  
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation
  Reviewed by:	gnn, emaste
  Differential Revision:	https://reviews.freebsd.org/D5802

Modified:
  head/sys/kern/subr_hash.c

Modified: head/sys/kern/subr_hash.c
==============================================================================
--- head/sys/kern/subr_hash.c	Sat Apr  9 04:57:25 2016	(r297731)
+++ head/sys/kern/subr_hash.c	Sat Apr  9 09:24:05 2016	(r297732)
@@ -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?201604090924.u399O5rG092580>