From owner-svn-src-stable-10@freebsd.org Sat Oct 3 11:37:01 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C906BA0FE97; Sat, 3 Oct 2015 11:37:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9ECF219D6; Sat, 3 Oct 2015 11:37:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t93Bb1Iq070266; Sat, 3 Oct 2015 11:37:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t93Bb1fB070264; Sat, 3 Oct 2015 11:37:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510031137.t93Bb1fB070264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 3 Oct 2015 11:37:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288595 - in stable/10: cddl/contrib/opensolaris/cmd/sgs/tools/common sys/cddl/contrib/opensolaris/common/avl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Oct 2015 11:37:01 -0000 Author: mav Date: Sat Oct 3 11:37:00 2015 New Revision: 288595 URL: https://svnweb.freebsd.org/changeset/base/288595 Log: MFV r287703, r287705 (by delphij): 6091 avl_add doesn't assert on non-debug builds Use assfail() from libuutil instead of ASSERT() in userland AVL avl_add. illumos/illumos-gate@faa2b6be2fc102adf9ed584fc1a667b4ddf50d78 Illumos issues: 6091 avl_add doesn't assert on non-debug builds https://www.illumos.org/issues/6091 Modified: stable/10/cddl/contrib/opensolaris/cmd/sgs/tools/common/sgsmsg.c stable/10/sys/cddl/contrib/opensolaris/common/avl/avl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/sgs/tools/common/sgsmsg.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/sgs/tools/common/sgsmsg.c Sat Oct 3 11:35:18 2015 (r288594) +++ stable/10/cddl/contrib/opensolaris/cmd/sgs/tools/common/sgsmsg.c Sat Oct 3 11:37:00 2015 (r288595) @@ -132,6 +132,8 @@ typedef struct msg_string { static msg_string *msg_head; static msg_string *msg_tail; +int aok; + /* * message_append() is responsible for both inserting strings into * the master Str_tbl as well as maintaining a list of the Modified: stable/10/sys/cddl/contrib/opensolaris/common/avl/avl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/avl/avl.c Sat Oct 3 11:35:18 2015 (r288594) +++ stable/10/sys/cddl/contrib/opensolaris/common/avl/avl.c Sat Oct 3 11:37:00 2015 (r288595) @@ -25,6 +25,7 @@ /* * Copyright (c) 2014 by Delphix. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ /* @@ -635,14 +636,17 @@ avl_add(avl_tree_t *tree, void *new_node /* * This is unfortunate. We want to call panic() here, even for * non-DEBUG kernels. In userland, however, we can't depend on anything - * in libc or else the rtld build process gets confused. So, all we can - * do in userland is resort to a normal ASSERT(). + * in libc or else the rtld build process gets confused. + * Thankfully, rtld provides us with its own assfail() so we can use + * that here. We use assfail() directly to get a nice error message + * in the core - much like what panic() does for crashdumps. */ if (avl_find(tree, new_node, &where) != NULL) #ifdef _KERNEL panic("avl_find() succeeded inside avl_add()"); #else - ASSERT(0); + (void) assfail("avl_find() succeeded inside avl_add()", + __FILE__, __LINE__); #endif avl_insert(tree, new_node, where); }