Fwd: HAL 0.5.10 (with patch)
Frederic Crozat
fcrozat at mandriva.com
Fri Oct 12 02:20:20 PDT 2007
Le vendredi 12 octobre 2007 à 10:47 +0400, Andy Jones a écrit :
> In the absence of anyone interested and some spare time on my hands,
> here is the patch to fix this in 0.5.10
>
> The issue was my 'glib' is compiled with debug, so the macros inside
> g_hash_table_foreach_remove() are no-ops thus passing programming bugs
> to the application (hald in this case) to be resolved by generating a SEGV.
I think you mean you have disable checks in your glib. This is probably
the best way to shoot yourself in the foot and it is not recommended by
glib maintainers. Either keep defaults (ie minimum debug or full debug
on unstable build) or set it to minimum debug.
> Essentially from my initial stack provided earlier, hash table is NULL
> in local_server_message_handler() so doing a
>
> g_hash_table_foreach_remove(NULL, ...)
>
> is plain wrong. Recompiling with the trivial fix attached and 0.5.10 is
> ok again.
You should probably use
if (G_UNLIKELY (!singletons)) {
for your test. And please use diff -u for your patches, it is easier to read.
--
Frederic Crozat <fcrozat at mandriva.com>
Mandriva
More information about the hal
mailing list