qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/3] qtest: kill QEMU process on g_assert() fail


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 3/3] qtest: kill QEMU process on g_assert() failure
Date: Tue, 18 Feb 2014 11:23:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Il 18/02/2014 11:17, Daniel P. Berrange ha scritto:
> >Yes, SIGABRT is synchronous for all purposes.  So the only danger is
> >that g_string_free() or g_free() could fail while we're in
> >g_assert(false).  But they don't, which makes sense because they are
> >totally unrelated to g_assert() and therefore can handle re-entrancy.
>
> If malloc aborts due to a double free or other similar problem, you
> may risk reentering it.
If you register the custom SIGABRT handler with sigaction + SA_RESETHAND
then you'd avoid the re-entrancy risk, since a cascading SIGABRT would
get handled by the system default handler, which would immediately
terminate the process.

I meant reentering malloc.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]