Christian Biere wrote:
> Christian Biere wrote:
> > Okay. I confirm it's massively broken. I had to disable halloc, otherwise
> > it would just crash on startup[1]. Next I had to disable ADNS, otherwise it
> > would just hang on startup. I tried it now but I have no idea what to do
> > with it as it comes apparently with no documentation and the menus don't
> > explain too much.
> >
> > [1] Apparently, they are trying to mix g_malloc()ed and malloc()ed memory in
> > gtk/gtk-im-uim.c which is a bug and is likely caught by halloc. There's no
> > guarantee that it will be caught though and it might be source of the
> > problem you experience. Thus, try to disable halloc.
>
> I've added a command-line option --no-halloc as workaround for such issues.
> At the moment, I cannot reproduce the issue with ADNS anymore albeit it
> hang repeatedly before. May be some kind of race-condition.
I didn't notice that uim-toolbar-gtk was still running. This prevented the issue
to show up.
I could fix the memory issue in uim. See the attached patch. There are still
some obvious brain-dead bugs e.g., ParseComposeStringFile() though.
--
Christian
--- gtk/compose.c 2006-12-22 05:32:35.000000000 +0100
+++ gtk/compose.c 2007-06-28 17:22:43.000000000 +0200
@@ -440,7 +440,7 @@
return 0;
len = strlen(mb);
strlcpy(buf, mb, MB_LEN_MAX + 1);
- free(mb);
+ g_free(mb);
return len;
}
@@ -611,7 +611,12 @@
goto error;
}
- rhs_string_utf8 = g_locale_to_utf8(rhs_string_mb, -1, NULL, NULL, NULL);
+ {
+ char *yadda;
+ yadda = g_locale_to_utf8(rhs_string_mb, -1, NULL, NULL, NULL);
+ rhs_string_utf8 = strdup(yadda);
+ g_free(yadda);
+ }
for (i = 0; i < n; i++) {
for (p = *top; p; p = p->next) {
--- gtk/gtk-im-uim.c 2006-12-22 05:32:35.000000000 +0100
+++ gtk/gtk-im-uim.c 2007-06-28 16:48:56.000000000 +0200
@@ -259,7 +259,7 @@
}
}
- str = (char *)realloc(str, strlen(str) + strlen(segment_str) + 1);
+ str = (char *)g_realloc(str, strlen(str) + strlen(segment_str) + 1);
strcat(str, segment_str);
return str;
@@ -565,8 +565,8 @@
int i;
for (i = 0; i < uic->nr_psegs; i++)
- free(uic->pseg[i].str);
- free(uic->pseg);
+ g_free(uic->pseg[i].str);
+ g_free(uic->pseg);
uic->pseg = NULL;
uic->nr_psegs = 0;
@@ -582,7 +582,7 @@
&& !(attr & (UPreeditAttr_Cursor | UPreeditAttr_Separator)))
return;
- uic->pseg = realloc(uic->pseg,
+ uic->pseg = g_realloc(uic->pseg,
sizeof(struct preedit_segment) * (uic->nr_psegs + 1));
uic->pseg[uic->nr_psegs].str = g_strdup(str);
uic->pseg[uic->nr_psegs].attr = attr;
@@ -1138,7 +1138,7 @@
if (str)
*str = tmp;
else
- free(tmp);
+ g_free(tmp);
}
static void
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Gtk-gnutella-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel