xfs
[Top] [All Lists]

Re: [PATCH] xfsprogs: use abort() not ASSERT(0) for impossible switch ca

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH] xfsprogs: use abort() not ASSERT(0) for impossible switch case
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 21 Aug 2014 10:44:14 -0700
Cc: xfs-oss <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <53F62D12.8010505@xxxxxxxxxxx>
References: <53F62D12.8010505@xxxxxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
On Thu, Aug 21, 2014 at 12:32:02PM -0500, Eric Sandeen wrote:
> The original reason for the expletive below has been lost
> in the mists of time, but at any rate, ASSERT() goes away in
> libxfs, and this leads static analysis checkers to believe that
> XFS_BTNUM_MAX is possible, and that we might overflow an array
> later when using it as an index.
> 
> We can shut this up and mark it as truly impossible with abort().

This won't work in kernel space, and we'd like to keep this file in sync.

<Prev in Thread] Current Thread [Next in Thread>