[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen: let ASSERT_UNREACHABLE() WARN() in non-debug builds


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 24 Aug 2022 12:35:02 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AGEKUeJzVOvF7VGb+YX3a3KvhIR3n0h0gLApfLqs+xc=; b=I5uhoHWZsKdTti6yvAOThXoNM/ZPWX989D/JtSSBc87ttkR0+Caedv3QIgMtoMBXWwS9DyZrI6uHL+JIlOOPSfe/xrMQUjFYoinPlNKU8qq4FB+s0Ov+2iiUJnqmeFg066z+bkNgGSpn17eegT6MxXfMd+Z3h0E6e+atkKavusMFU/l/Cg7dF2htow1iBW+9uknpGlUQX+1zBmjaMCktnusgzTHd1bXgdRQY1eilz1tE/HhgVVgr9bZ2QRBMWqn8p235RAZMPvO655/BVYM/PjkEh9GGMM1Lokh+x7iRm+C7qsmpg9amAIv+j3KZzu+QateFHZdPxnMMSgkjbFsymA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FpTtecJW1cVut6dodSkBca8hCBvRgW1Gs2Zs5P/miZd/coXYqMZInHg4GHgvTVQJ0H8/+/8h2NSLmsjKqPJLpzNMlZhJusKjDG1wZsOBPTfMAN98l7K/x46v78KJbRjYmNee0q6QPjQ2fJx5bbUydGE8oR7yfNoOdGlO+6HXIZCYa2lXUgtBC6SsA0RW2HQREiDNa64LLnWbBx/IFWZeRCnIznq5t9ZlRr8IkRF14CTzjX7EN3LLjIAO/lITqHzvuvxPCqOGgkz02H7G413HH+jjC6KaN2BqsnuIxMyfDZBpWetuYjwYVVXwv8sK0oF4PFLbXhTdpDz49edI5HxstQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Henry.Wang@xxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 24 Aug 2022 10:35:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.08.2022 12:22, Juergen Gross wrote:
> Hitting an ASSERT_UNREACHABLE() is always wrong, so even in production
> builds a warning seems to be appropriate when hitting one.

I disagree, for two reasons: This violates the implication of NDEBUG
meaning ASSERT() and friends expand to no actual code. Plus if doing so
for ASSERT_UNREACHABLE(), why would we not do the same for ASSERT()?
There's a reason we have ASSERT() and friends and, independently,
WARN_ON() / BUG_ON() et al.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.