From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6f1j-0001GK-Tf for qemu-devel@nongnu.org; Wed, 09 Dec 2015 08:43:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6f1g-0007no-Of for qemu-devel@nongnu.org; Wed, 09 Dec 2015 08:43:27 -0500 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:38523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6f1g-0007nj-JL for qemu-devel@nongnu.org; Wed, 09 Dec 2015 08:43:24 -0500 Received: by wmec201 with SMTP id c201so74061708wme.1 for ; Wed, 09 Dec 2015 05:43:24 -0800 (PST) Sender: Paolo Bonzini References: <87a8pl9hmt.fsf@blackfin.pond.sub.org> <20151208141938.GB2593@work-vm> <87io480y0n.fsf@blackfin.pond.sub.org> <566827FC.4080701@redhat.com> <20151209131210.GA18106@work-vm> From: Paolo Bonzini Message-ID: <56682FFB.4040908@redhat.com> Date: Wed, 9 Dec 2015 14:43:23 +0100 MIME-Version: 1.0 In-Reply-To: <20151209131210.GA18106@work-vm> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Error handling in realize() methods List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: qemu-devel@nongnu.org, Peter Maydell , Peter Crosthwaite , Markus Armbruster , =?UTF-8?Q?Andreas_F=c3=a4rber?= On 09/12/2015 14:12, Dr. David Alan Gilbert wrote: >> > Even if we don't, we should use &error_abort, not &error_fatal >> > (programmer error---due to laziness---rather than user error). >> > &error_fatal should really be restricted to code that is running very >> > close to main(). > No, we used to have error_abort and changed them out for error_fatal because > we were getting flooded with crash reports due to the aborts of people trying > to run VMs too big for their machine. That's a different call site, it's memory_region_allocate_system_memory and it currently does a manual error_report_err+exit(1). That one is okay, because it's indeed running "very close to main()" (it's called by machine_class->init, which is called by main). It could be kept open-coded or changed to error_fatal. Paolo