Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nr4gB-00046U-Cq for qemu-devel@nongnu.org; Mon, 15 Mar 2010 03:25:35 -0400 Received: from [199.232.76.173] (port=57420 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nr4g7-00045k-T9 for qemu-devel@nongnu.org; Mon, 15 Mar 2010 03:25:32 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nr4g6-0004Fx-N6 for qemu-devel@nongnu.org; Mon, 15 Mar 2010 03:25:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20242) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nr4g6-0004Fr-Bk for qemu-devel@nongnu.org; Mon, 15 Mar 2010 03:25:30 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH, RFC] Replace assert(0) with abort() or cpu_abort() References: Date: Mon, 15 Mar 2010 08:25:25 +0100 In-Reply-To: (Blue Swirl's message of "Sat, 13 Mar 2010 16:56:03 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel Blue Swirl writes: > When building with -DNDEBUG, assert(0) will not stop execution > so it must not be used for abnormal termination. For each case: are you sure the code does not recover after assert(0)? Not saying it does, just asking whether you checked. > Use cpu_abort() when in CPU context, abort() otherwise. I sympathize with the general idea, but I don't like dead code after abort(). What about cleaning that up?