On 19 Feb 2007, [EMAIL PROTECTED] wrote:

> I just had a freeze problem resulting in the following backtrace:

>>> 2  0x001a2754 in assertion_failure ()
>>> 3  0x001c10a0 in unknown_to_utf8 ()

> Not sure what to make of it; it's never happened before, and I think
> this may be the second tonight (I re-launched under GDB in case it
> happened again).

There are two asserts in this function.  At the start,

        g_assert(src);

and at the end...

        g_assert(utf8_is_valid_string(dst));

The first means a problem higher.  The second means a problem in this
function.  Does "bt full" give more information?  It should show the
parameters passed to the functions.  Then it would be easy to see if
"src==NULL".

Do you have a PPC?  I don't think that "char" and "unsigned char" have
problems like on an ARM.  But anyways, I have some splint output
below, in case it is helpful to anyone...

Hth,
Bill Pringlemeir.

[splint output..., utf8.c r12888] 
utf8.c: (in function utf8_name_to_cd)
utf8.c:177:14: Operands of < have incompatible types (guint, arbitrary unsigned
    integral type): i < (sizeof((utf8_cd_tab)) / sizeof(((utf8_cd_tab)[0])))
utf8.c: (in function utf8_cd_to_name)
utf8.c:192:20: Operands of < have incompatible types (guint, arbitrary unsigned
    integral type): i < (sizeof((utf8_cd_tab)) / sizeof(((utf8_cd_tab)[0])))
utf8.c:207:20: Operands of < have incompatible types (guint, arbitrary unsigned
    integral type): i < (sizeof((utf8_cd_tab)) / sizeof(((utf8_cd_tab)[0])))
utf8.c: (in function utf8_skip)
utf8.c:270:58: Initializer block for utf8len has 256 elements, but declared as
    guint8 [0]: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  Initializer block contains more elements than the size of a declared array.
  (Use -initsize to inhibit warning)
utf8.c: (in function uniskip)
utf8.c:364:9: Return value type int does not match declared type guint:
                 uc < 0x80U ? 1 : uc < 0x800 ? 2 : uc < 0x10000 ? 3 : 4
utf8.c: (in function utf8_encode_char)
utf8.c:409:6: Operands of <= have incompatible types (guint, size_t):
                 len <= size
utf8.c:413:4: Assignment of guint32 to gchar: buf[i] = (uc | 0x80) & 0xbf
utf8.c:416:3: Assignment of guint32 to gchar: buf[0] = uc | utf8len_mark[len]
utf8.c: (in function utf32_block_id)
utf8.c:464:228: Assignment of size_t to guint32: bs_item = (bs_index)
utf8.c:465:111: Return value type arbitrary unsigned integral type does not
                   match declared type guint: 1 + (bs_index)
utf8.c: (in function utf8_decode_char)
utf8.c:582:14: Variable v initialized to type gchar, expects guint32: *s
utf8.c:610:10: Return value type gchar does not match declared type guint32: *s
utf8.c:636:3: Assignment of gint to guint: *retlen = clen
utf8.c:688:3: Return value (type size_t) ignored: gm_snprintf(msg,...
utf8.c:691:3: Return value (type size_t) ignored: gm_snprintf(msg,...
/home/bpringle/gtk-gnutella/src/lib/utf8.c: (9 more similar errors unprinted)
utf8.c:731:3: Assignment of gint to guint: *retlen = expectlen ? expectlen :
                 len
utf8.c: (in function utf8_decode_char_fast)
utf8.c:840:3: Assignment of gchar to guchar: c = *++s
utf8.c:852:4: Assignment of gchar to guchar: c = *++s
utf8.c: (in function utf8_is_valid_data)
utf8.c:920:20: Function utf8_skip expects arg 1 to be guchar gets gchar: *src
utf8.c: (in function utf8_data_char_count)
utf8.c:950:41: Function utf8_skip expects arg 1 to be guchar gets gchar: *s
utf8.c:950:23: Operands of >= have incompatible types (guint, size_t):
                  (clen = utf8_skip(*s)) >= len
utf8.c: (in function utf8_strlcpy)
utf8.c:979:4: Assignment of int to size_t: clen = (((1) > (clen)) ? (1) :
                 (clen))
utf8.c:997:9: Return value type int does not match declared type size_t:
                 s - src
utf8.c: (in function utf8_strcpy_max)
utf8.c:1025:4: Assignment of int to size_t: clen = (((1) > (clen)) ? (1) :
                  (clen))
utf8.c:1044:9: Return value type int does not match declared type size_t:
                  s - src
utf8.c: (in function utf16_encode_char)
utf8.c:1062:3: Assignment of guint32 to guint16: *dst = uc
utf8.c:1066:3: Assignment of guint32 to guint16: dst[0] = (uc >> 10) | 0xd800
utf8.c:1067:3: Assignment of guint32 to guint16: dst[1] = (uc & 0x3ff) | 0xdc00
utf8.c: (in function utf8_to_iso8859)
utf8.c:1090:3: Assignment of size_t to gint: len = strlen(s)
utf8.c:1108:3: Assignment of guchar to gchar: *xw++ = (guchar)v
utf8.c: (in function get_iconv_charset_alias)
utf8.c:1223:4: Assignment of int to size_t: len = end - start
utf8.c:1225:4: Assignment of int to size_t: len = first_end - codesets[i] + 1
utf8.c:1226:32: Function g_strlcpy expects arg 3 to be gsize gets size_t:
                   (((len) < (sizeof((buf)))) ? (len) : (sizeof((buf))))
utf8.c:1226:4: Return value (type gsize) ignored: g_strlcpy(buf, c...
utf8.c: (in function locale_get_charset)
utf8.c:1253:3: Return value (type gboolean) ignored: g_get_charset(&cs)
utf8.c: (in function get_filename_charsets)
utf8.c:1336:29: Function g_strndup expects arg 2 to be gsize gets int: ep - s
utf8.c: (in function locale_init)
utf8.c:1520:2: Return value (type char *) ignored: setlocale(LC_ALL...
utf8.c:1541:14: Operands of < have incompatible types (guint, arbitrary
    unsigned integral type): i < (sizeof((latin_sets)) / sizeof(((latin_sets)[0]
    )))
utf8.c: (in function complete_iconv)
utf8.c:1691:9: Return value type int does not match declared type size_t:
                  (dst - dst0) + 1
utf8.c: (in function utf8_enforce)
utf8.c:1767:20: Operands of <= have incompatible types (size_t, int):
                   size <= INT_MAX
utf8.c:1775:8: Operands of > have incompatible types (int, size_t):
                  (((1) > (clen)) ? (1) : (clen)) > size
utf8.c:1795:9: Return value type int does not match declared type size_t:
                  d - dst
utf8.c: (in function ascii_enforce)
utf8.c:1818:20: Operands of <= have incompatible types (size_t, int):
                   size <= INT_MAX
utf8.c:1824:46: Assignment of gchar to guchar: c = *s
utf8.c:1825:4: Assignment of guchar to gchar: *d++ = isascii(c) ? c : '_'
utf8.c:1833:9: Return value type int does not match declared type size_t:
                  d - dst
utf8.c: (in function looks_like_koi8)
utf8.c:2031:17: Assignment of gchar to guchar: c = *s
utf8.c: (in function looks_like_iso8859_6)
utf8.c:2076:40: Assignment of gchar to guchar: c = *s
/home/bpringle/gtk-gnutella/src/lib/utf8.c: (3 more similar errors unprinted)
utf8.c: (in function iso8859_is_valid_string)
utf8.c:2175:31: Function iso8859_is_valid_char expects arg 1 to be guchar gets
                   gchar: *src
utf8.c: (in function utf8_to_utf32)
utf8.c:2593:20: Operands of <= have incompatible types (size_t, int):
                   size <= INT_MAX
utf8.c:2615:9: Return value type int does not match declared type size_t:
                  p - out
utf8.c: (in function utf32_to_utf8)
utf8.c:2641:20: Operands of <= have incompatible types (size_t, int):
                   size <= INT_MAX
utf8.c:2650:23: Operands of > have incompatible types (guint, size_t):
                   retlen > size
utf8.c:2663:9: Return value type int does not match declared type size_t:
                  p - dst
utf8.c: (in function utf32_strcmp)
utf8.c:2725:9: Return value type unsigned int does not match declared type
                  gint64: uc - *s2
utf8.c: (in function utf32_next_starter)
utf8.c:2874:9: Unrecognized identifier: deconstify_guint32
utf8.c: (in function utf8_sort_canonical)
utf8.c:3077:2: Return value (type guint32 *) ignored: utf32_sort_canon...
utf8.c: (in function utf32_compose_hangul)
utf8.c:3147:3: Assignment of unsigned int to gint: l_index = prev - l_base
utf8.c:3149:19: Variable v_index initialized to type unsigned int, expects
                   gint: uc - v_base
utf8.c:3158:3: Assignment of unsigned int to gint: s_index = prev - s_base
utf8.c:3160:19: Variable t_index initialized to type unsigned int, expects
                   gint: uc - t_base
utf8.c:3179:9: Return value type int does not match declared type size_t:
                  p - src
utf8.c: (in function utf32_decompose_char)
utf8.c:3287:3: Assignment of int to size_t: start = mod - old
utf8.c:3288:3: Assignment of int to size_t: size = p - cur
utf8.c: (in function utf32_strlen)
utf8.c:3315:9: Return value type int does not match declared type size_t: p - s
utf8.c: (in function utf32_strmaxlen)
utf8.c:3340:20: Operands of <= have incompatible types (size_t, int):
                   maxlen <= INT_MAX
utf8.c: (in function utf8_decompose)
utf8.c:3376:20: Operands of <= have incompatible types (size_t, int):
                   size <= INT_MAX
utf8.c:3413:4: Return value (type gchar *) ignored: utf8_sort_canoni...
utf8.c: (in function utf32_decompose)
utf8.c:3489:20: Operands of <= have incompatible types (size_t, int):
                   size <= INT_MAX
utf8.c:3502:3: Return value (type guint32 *) ignored: utf32_sort_canon...
utf8.c:3510:9: Return value type int does not match declared type size_t:
                  p - out
utf8.c: (in function utf8_remap)
utf8.c:3563:20: Operands of <= have incompatible types (size_t, int):
                   size <= INT_MAX
utf8.c:3586:9: Operands of > have incompatible types (guint, size_t):
                  retlen > size
utf8.c:3596:26: Operands of > have incompatible types (guint, size_t):
                   utf8_len > size
utf8.c:3604:3: Assignment of int to size_t: new_len = dst - dst0
utf8.c: (in function utf32_remap)
utf8.c:3648:20: Operands of <= have incompatible types (size_t, int):
                   size <= INT_MAX
utf8.c:3663:9: Return value type int does not match declared type size_t:
                  p - dst
utf8.c: (in function utf32_strlower)
utf8.c:3683:20: Operands of <= have incompatible types (size_t, int):
                   size <= INT_MAX
utf8.c: (in function utf32_strupper)
utf8.c:3705:20: Operands of <= have incompatible types (size_t, int):
                   size <= INT_MAX
/home/bpringle/gtk-gnutella/src/lib/utf8.c: (2 more similar errors unprinted)
utf8.c: (in function utf32_filter_char)
utf8.c:3963:11: Return value type int does not match declared type guint32:
                   prev || last ? 0 : 0x0020
utf8.c: (in function utf32_filter)
utf8.c:3990:20: Operands of <= have incompatible types (size_t, int):
                   size <= INT_MAX
utf8.c:4010:9: Return value type int does not match declared type size_t:
                  p - dst
utf8.c: (in function utf32_split_blocks)
utf8.c:4033:20: Operands of <= have incompatible types (size_t, int):
                   size <= INT_MAX
utf8.c:4071:9: Return value type int does not match declared type size_t:
                  p - dst
utf8.c: (in function utf32_compose)
utf8.c:4465:4: Assignment of guint to gint: cc = utf32_combining_class(uc2)
utf8.c:4492:9: Return value type int does not match declared type size_t:
                  p - src
utf8.c: (in function compose_root_cmp)
utf8.c:4722:20: Operands of < have incompatible types (guint, arbitrary
    unsigned integral type): i < (sizeof((utf32_nfkd_lut)) /
    sizeof(((utf32_nfkd_lut)[0])))
utf8.c:4723:20: Operands of < have incompatible types (guint, arbitrary
    unsigned integral type): j < (sizeof((utf32_nfkd_lut)) /
    sizeof(((utf32_nfkd_lut)[0])))
utf8.c: (in function unicode_compose_init)
utf8.c:4843:24: Function unicode_compose_add expects arg 1 to be guint gets
                   size_t: i
utf8.c: (in function utf8_dejap)
utf8.c:4954:9: Return value type int does not match declared type size_t:
                  d - dst
utf8.c: (in function regression_normalization_character_identity)
utf8.c:5127:27: Function utf32_bad_codepoint expects arg 1 to be guint32 gets
                   size_t: i
utf8.c:5127:64: Function utf32_is_normalization_special expects arg 1 to be
                   guint32 gets size_t: i
utf8.c:5130:3: Assignment of size_t to guint32: s[0] = i
utf8.c: (in function regression_normalization_issue)
utf8.c:5155:5: Initializer block for tests[0].s has 4 elements, but declared as
                  guint32 [8]: 0x0b47, 0x0300, 0x0b3e, 0
utf8.c:5156:5: Initializer block for tests[1].s has 4 elements, but declared as
                  guint32 [8]: 0x1100, 0x0300, 0x1161, 0
utf8.c:5157:5: Initializer block for tests[2].s has 5 elements, but declared as
                  guint32 [8]: 0x1100, 0x0300, 0x1161, 0x0323, 0
utf8.c:5161:14: Operands of < have incompatible types (guint, arbitrary
    unsigned integral type): i < (sizeof((tests)) / sizeof(((tests)[0])))
utf8.c: (in function regression_bug_1211413)
utf8.c:5230:2: Return value (type size_t) ignored: utf8_to_utf32(s,...
utf8.c: (in function utf8_regression_checks)
utf8.c:5821:86: Return value (type int) ignored: fflush(stdout)
utf8.c:5822:73: Return value (type int) ignored: fflush(stdout)
/home/bpringle/gtk-gnutella/src/lib/utf8.c: (4 more similar errors unprinted)



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Gtk-gnutella-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel

Reply via email to