From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UscK1-0006s8-Si for qemu-devel@nongnu.org; Fri, 28 Jun 2013 13:19:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UscJz-0008H1-AO for qemu-devel@nongnu.org; Fri, 28 Jun 2013 13:18:57 -0400 Received: from usindpps05.hds.com ([207.126.252.18]:59145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UscJz-0008Gw-2Z for qemu-devel@nongnu.org; Fri, 28 Jun 2013 13:18:55 -0400 From: Tomoki Sekiyama Date: Fri, 28 Jun 2013 17:18:41 +0000 Message-ID: In-Reply-To: <51CD6814.8070501@redhat.com> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: <644E6919FE120645826AA43161FE71C1@hds.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v4 06/10] qemu-ga: Add Windows VSS provider to quiesce applications on fsfreeze List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Laszlo Ersek Cc: "libaiqing@huawei.com" , "mdroth@linux.vnet.ibm.com" , "stefanha@gmail.com" , "qemu-devel@nongnu.org" , "lcapitulino@redhat.com" , "vrozenfe@redhat.com" , Seiji Aguchi , "areis@redhat.com" On 6/28/13 6:40 , "Paolo Bonzini" wrote: >Il 28/06/2013 12:40, Laszlo Ersek ha scritto: >>> > Also, this is not running in the context of qemu-ga, so I think it is >>> > better to be more conservative and trap memory allocation failure. >> In that case other "new" calls must assume the nothrow form too, plus >> other allocation functions should be checked as well (eg. >> SysAllocStringLen(), although its only use might be in the function that >> Tomoki plans to remove anyway). > >Agreed (nothrow or try...catch, depending on what's better for the C++ >runtime; I tried something like 'main(){ for(;;) new int[999]; }' and it caused: Terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc abnormal program termination I should catch and handle this. > by the way, Tomoki-san, I suspect this will require libstdc++ >when compiled with GCC---can you confirm?). Yes, we need "libstdc++-6.dll" from MinGW to run qemu-ga.exe. >Thanks, > >Paolo Thanks, Tomoki Sekiyama