From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [Qemu-devel] [PATCH v2 for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid() Date: Thu, 14 Nov 2013 12:17:30 +0100 Message-ID: <5284B14A.9070305@redhat.com> References: <1384384147-11076-1-git-send-email-peter.maydell@linaro.org> <52846263.1020608@weilnetz.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Stefan Weil , QEMU Developers , Gleb Natapov , kvm-devel , Patch Tracking , Andreas Tobler , Anthony Liguori , Richard Henderson To: Peter Maydell Return-path: Received: from mx1.redhat.com ([209.132.183.28]:58830 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753307Ab3KNLRr (ORCPT ); Thu, 14 Nov 2013 06:17:47 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Il 14/11/2013 12:06, Peter Maydell ha scritto: > On 14 November 2013 05:40, Stefan Weil wrote: >> If you happen to write a v3 patch, g_assert_not_reached would be even >> better than abort. >> >> It's impossible to tell why QEMU terminated after an assert without a >> debugger, >> whereas g_assert_not_reached clearly shows the location. > > Maybe. I was mostly just following the pattern of existing > stub functions. Should all instances of abort() be replaced? > (g_assert_not_reached() is compile-time disablable, unlike > abort()). No, disabling asserts is almost always bad, but disabling unconditional asserts is even worse. Paolo From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vguvn-00073T-3v for qemu-devel@nongnu.org; Thu, 14 Nov 2013 06:17:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vguvh-0000tL-Kd for qemu-devel@nongnu.org; Thu, 14 Nov 2013 06:17:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:16673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vguvh-0000t9-DY for qemu-devel@nongnu.org; Thu, 14 Nov 2013 06:17:45 -0500 Message-ID: <5284B14A.9070305@redhat.com> Date: Thu, 14 Nov 2013 12:17:30 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1384384147-11076-1-git-send-email-peter.maydell@linaro.org> <52846263.1020608@weilnetz.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: kvm-devel , Gleb Natapov , Patch Tracking , Stefan Weil , QEMU Developers , Andreas Tobler , Anthony Liguori , Richard Henderson Il 14/11/2013 12:06, Peter Maydell ha scritto: > On 14 November 2013 05:40, Stefan Weil wrote: >> If you happen to write a v3 patch, g_assert_not_reached would be even >> better than abort. >> >> It's impossible to tell why QEMU terminated after an assert without a >> debugger, >> whereas g_assert_not_reached clearly shows the location. > > Maybe. I was mostly just following the pattern of existing > stub functions. Should all instances of abort() be replaced? > (g_assert_not_reached() is compile-time disablable, unlike > abort()). No, disabling asserts is almost always bad, but disabling unconditional asserts is even worse. Paolo