Re: Very strange bug - memory alignment - after upgrading to GLib 2.12.4-1



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Oct 09, 2006 at 01:56:49PM -0300, Fabricio Rocha wrote:
Dearest ones,

       Yesterday I upgraded GLib from 2.12.3-2 to 2.12.4-1, Debian 
Unstable installation. After that, a piece of my program which was 
compiling and working perfectly has gone nuts.

       In a given section, I call a function to create an instance of a 
structure with g_new(), and set up its values. One of these values is a 
guint8 variable. Later, I use this value as the second parameter to 
gtk_combo_box_set_active(), with a cast to gint. Just before, there is 
another gtk_combo_box_set_active() call for another combobox, with 
completely different parameters. With GDB I could see that right after 
the first call to set_active(), the pointer to the guint8 variable 
(dialogvar->qualifier) points to a correct value (0, as set before). But 
one step further the variable (and only this guint8 variable) gets the 
value 255 plus some rubbish,

I don't understand this: is there any room for "some rubish" beyond the
255 in a guint8?

                             and when casted to (gint) its value is 255 
-- the limit of a guint8.

You could try to set a watchpoint on the guint8 var to see what changes
it. And you could show us your code, maybe someone sees something...

Regards
- -- tomÃs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFFKySrBcgs9XrR2kYRAiAWAJwMXu/+se3DJnqnUVgRFHDCPc8YYACeOq0V
OLNWlOV1xkoY+sdDHbBxuEY=
=aVLe
-----END PGP SIGNATURE-----




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