Re: [PATCH] Fix removal of variable change notifications
- From: Sven Neumann <s neumann raumfeld com>
- To: Jens Georg <mail jensge org>
- Cc: gupnp-list gnome org
- Subject: Re: [PATCH] Fix removal of variable change notifications
- Date: Fri, 07 Dec 2012 14:43:02 +0100
On Fri, 2012-12-07 at 12:38 +0100, Jens Georg wrote:
> On Fr, 2012-12-07 at 11:59 +0100, Sven Neumann wrote:
> > Need to pass the key to g_hash_table_remove(), not the
> > value. This fixes crashes in emit_notification().
>
> Is there any way to trigger this so we can add a test?
Well, the code is obviously wrong. But if you absolutely want to test
this, you should be able to reproduce the crash by instantiating a
service-proxy object, using gupnp_service_proxy_add_notify() on it, then
use gupnp_service_proxy_remove_notify() to unregister yourself from
change notifications. After that change the state variable on the
service. You will most likely see a crash in emit_notification() because
it is accessing released memory. If it doesn't crash, then you should
use valgrind. It will definitely show you an invalid read.
Regards,
Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]