Quark may be bug
file: glib/gquark.c
func: static inline Gquark quark_new (gquark *string)
//now
if (quark_seq_id % QUARK_BLOCK_SIZE == 0)
{
quarks_new = g_new (gchar*, quark_seq_id + QUARK_BLOCK_SIZE);
if (quark_seq_id != 0)
memcpy (quarks_new, quarks, sizeof (char *) * quark_seq_id);
memset (quarks_new + quark_seq_id, 0, sizeof (char *) * QUARK_BLOCK_SIZE); <-------- !!!!
/* This leaks the old quarks array. Its unfortunate, but it allows
* us to do lockless lookup of the arrays, and there shouldn't be that
* many quarks in an app
*/
g_atomic_pointer_set (&quarks, quarks_new);
}
//may it must be
memset (quarks_new + sizeof (char *) * quark_seq_id, 0, sizeof (char *) * QUARK_BLOCK_SIZE);