Received: from eggs.gnu.org ([208.118.235.92]:38947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf3iZ-0004TD-3K for qemu-devel@nongnu.org; Wed, 22 May 2013 03:44:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uf3iU-0006Qx-Dq for qemu-devel@nongnu.org; Wed, 22 May 2013 03:44:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf3iU-0006QI-6K for qemu-devel@nongnu.org; Wed, 22 May 2013 03:44:10 -0400 From: Markus Armbruster References: <20130521214645.GA8863@redhat.com> <20130521220917.GA803@redhat.com> Date: Wed, 22 May 2013 09:44:04 +0200 In-Reply-To: <20130521220917.GA803@redhat.com> (Michael S. Tsirkin's message of "Wed, 22 May 2013 01:09:17 +0300") Message-ID: <87obc34fy3.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Peter Maydell , Anthony Liguori , qemu-devel@nongnu.org, Luiz Capitulino , Blue Swirl , Paolo Bonzini "Michael S. Tsirkin" writes: > On Tue, May 21, 2013 at 11:01:05PM +0100, Peter Maydell wrote: >> On 21 May 2013 22:46, Michael S. Tsirkin wrote: >> > Once in a while make gets killed and doesn't >> > clean up partial object files after it. >> > Result is nasty errors from link. >> > This hack checks object is well formed before linking, >> > and rebuilds it if not. >> > >> > Signed-off-by: Michael S. Tsirkin >> > --- >> > >> > Is below useful for others? >> >> Seems to me like this is just working around a make bug: >> it is supposed to delete the partial object if it gets >> killed. > > It can't if it gets killed by kill -9 or e.g. OOM killer > (or OS reboot). Any generated file could be truncated then, not just objects. If you abort a build with kill -9 or equivalent, you blow away the build tree and start over. A sufficiently unlucky truncation could still build, but not work. [...]