qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for 4.2 0/3] require newer glib2 to enable autof


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH for 4.2 0/3] require newer glib2 to enable autofree'ing of stack variables exiting scope
Date: Thu, 25 Jul 2019 10:13:11 +0100

On Tue, 23 Jul 2019 at 16:49, Daniel P. Berrangé <address@hidden> wrote:
>
> Both GCC and CLang support a C extension attribute((cleanup)) which
> allows you to define a function that is invoked when a stack variable
> exits scope. This typically used to free the memory allocated to it,
> though you're not restricted to this. For example it could be used to
> unlock a mutex.

Does Coverity handle this? Can it be made to wire up this kind
of deallocation into checks of use-after-free/memory leaks/etc?

thanks
- PMM



reply via email to

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