[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the hue of death: setting color property crashes application
From: |
Andy Wingo |
Subject: |
Re: the hue of death: setting color property crashes application |
Date: |
Tue, 29 Jul 2008 21:03:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Hi,
On Mon 28 Jul 2008 17:43, "gregory benison" <address@hidden> writes:
> In the latest guile-gnome, setting a "color" property can cause a crash:
>
> G_SLICE=debug-blocks guile-gnome-2
>> (use-modules (oop goops)(gnome gtk))
>> (set (make <gtk-color-button>) 'color "red")
> GSlice: MemChecker: attempt to release non-allocated block: 0x81a50a8 size=12
> Aborted
>
> Without 'debug-blocks', the crash is delayed, but will happen
> eventually because the heap is corrupted.
>
> The cause is a GdkColor* being allocated with g_new0(), but freed with
> g_slice_free1() rather than g_free():
Wow, that's a nasty one. Good catch. As you say it probably affects
GdkRectangle as well, and perhaps also GtkTreeIter.
Your patch is good, will apply.
Andy
--
http://wingolog.org/