Ethereal-dev: Re: [Ethereal-dev] Buildbot not happy with tethereal

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Tue, 18 Apr 2006 14:07:07 +0200 (CEST)
Hi,

This looks interesting. We may have a hash collision here. See this note
in the code.

    /*
     * Make sure there's not already a protocol with any of those
     * names.  Crash if there is, as that's an error in the code
     * or an inappropriate plugin.
     * This situation has to be fixed to not register more than one
     * protocol with the same name.
     *
     * This is done by reducing the number of strcmp (and alike) calls as much as possible,
     * as this significally slows down startup time.
     *
     * Drawback: As a hash value is used to reduce insert time,
     * this might lead to a hash collision.
     * However, as we have around 500+ protocols and we're using a 32 bit int this is very,
     * very unlikely.
     */

    key = g_malloc (sizeof(gint));
    *key = g_str_hash(name);
    existing_name = g_hash_table_lookup(proto_names, key);
    if (existing_name != NULL) {
        /* g_error will terminate the program */
        g_error("Duplicate protocol name \"%s\"!"
            " This might be caused by an inappropriate plugin or a development error.", name);
    }

The g_error results in the entries 7 to 0.

Thanx,
Jaap

On Tue, 18 Apr 2006, Thomas Anders wrote:

> Jaap Keuter wrote:
> > On freebsd-ia64 and Solaris SPARC the test of tethereal coredumps right
> > away. Anyone a clue?
>
> On my Linux/x86 box tethereal (as of current SVN) aborts on startup in
> the following way:
>
> gdb) bt
> #0  0xffffe410 in ?? ()
> #1  0xbfffca08 in ?? ()
> #2  0x00000006 in ?? ()
> #3  0x00001fb4 in ?? ()
> #4  0x414c22c1 in raise () from /lib/tls/libc.so.6
> #5  0x414c3b75 in abort () from /lib/tls/libc.so.6
> #6  0x413eff25 in g_logv () from /opt/gnome/lib/libglib-2.0.so.0
> #7  0x413eff56 in g_log () from /opt/gnome/lib/libglib-2.0.so.0
> #8  0x402e4c5e in proto_register_protocol (
>      name=0x4094ffe8 "3Com XNS Encapsulation", short_name=0x4094ffe0
> "3COMXNS",
>      filter_name=0x4094ffd8 "3comxns") at proto.c:3250
> #9  0x4031a1e4 in proto_register_3com_xns () at packet-3com-xns.c:109
> #10 0x408bcf77 in register_all_protocols () at register.c:5
> #11 0x4173e255 in plugin_register () at plugin.c:48
> #12 0x402db706 in plugins_scan_dir (
>      dirname=0x828f000 "/bc/ethereal-svn/lib/ethereal/plugins/0.99.0")
>      at plugins.c:331
> #13 0x402db802 in init_plugins (plugin_dir=0x0) at plugins.c:415
> #14 0x402ea7ca in proto_init (plugin_dir=0x0,
>      register_all_protocols=0x804e1b8 <register_all_protocols>,
>      register_all_protocol_handoffs=0x804e5d8
> <register_all_protocol_handoffs>)
>      at proto.c:330
> #15 0x402d5a0e in epan_init (plugin_dir=0x0, register_all_protocols=0,
>      register_all_handoffs=0, report_failure=0, report_open_failure=0,
>      report_read_failure=0) at epan.c:67
> #16 0x0806173a in main (argc=3, argv=0xbfffd694) at tethereal.c:749
>
>
> Is this the same issue? FWIW, this is from a fresh installation after a
> "make distclean".
>
>
> +Thomas
>
> --
> Thomas Anders (thomas.anders at blue-cable.de)
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
>