severity 350088 grave
reassign 350088 libmhash2 0.9.4a-1
retitle 350088 libmhash2: crc32 segfaults on big endian machines
tags 350088 + patch
thanks

Hi,

this is a bug in the new libmhash2 version 0.9.4a. The severity is grave
since it breaks existing software using the library (in this case
gringotts).
Uwe, if you want you can recompile libmhash2 with the attached patch and
see if it works. I cannot test this since the bug only occurs on big
endian machines like your powerpc.

Kind regards,
  Bastian


Uwe Steinmann schrieb:
> I get a segm fault when loading a file
> Herr ist first part of the backtrace.
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x0f1a3a4c in mutils_word32swap () from /usr/lib/libmhash.so.2
> (gdb) bt
> #0  0x0f1a3a4c in mutils_word32swap () from /usr/lib/libmhash.so.2
> #1  0x0f1a54ec in mhash_get_crc32 () from /usr/lib/libmhash.so.2
> #2  0x0f1a3034 in mhash_deinit () from /usr/lib/libmhash.so.2
> #3  0x0f1a30ac in mhash_end_m () from /usr/lib/libmhash.so.2
> #4  0x0f1a30fc in mhash_end () from /usr/lib/libmhash.so.2
> #5  0x0f57ca58 in grg_get_block_size () from /usr/lib/libgringotts.so.2
> #6  0x0f57caf4 in grg_get_block_size () from /usr/lib/libgringotts.so.2
> #7  0x0f57cd0c in grg2mcrypt () from /usr/lib/libgringotts.so.2
> #8  0x0f57d758 in grg_validate_file_direct () from /usr/lib/libgringotts.so.2
> #9  0x10008368 in ?? () #10 0x0f6c5f14 in g_cclosure_marshal_VOID__VOID () 
> from /usr/lib/libgobject-2.0.so.0
> #11 0x0f6b62b0 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
> #12 0x0f6ca2e8 in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
> #13 0x0f6cb558 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
> #14 0x0f6cb99c in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
> #15 0x0fed0bf8 in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
> #16 0x0fdc33e8 in gtk_menu_shell_activate_item () from 
> /usr/lib/libgtk-x11-2.0.so.0
> #17 0x0fdc37d8 in gtk_menu_shell_activate_item () from 
> /usr/lib/libgtk-x11-2.0.so.0
> #18 0x0fdb6cac in gtk_menu_reorder_child () from /usr/lib/libgtk-x11-2.0.so.0
> #19 0x0fdaf6dc in _gtk_marshal_BOOLEAN__BOXED () from 
> /usr/lib/libgtk-x11-2.0.so.0
> #20 0x0f6b59cc in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
> #21 0x0f6b62b0 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
> #22 0x0f6c9ef8 in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
> #23 0x0f6cb274 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
> #24 0x0f6cb99c in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
> #25 0x0fed0e84 in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
> #26 0x0fdad478 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
> #27 0x0fdad9f8 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
> #28 0x0fbc380c in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
> #29 0x0f5d2bb4 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
> #30 0x0f5d6e6c in g_main_context_check () from /usr/lib/libglib-2.0.so.0
> #31 0x0f5d72c4 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
> #32 0x0fdac7d8 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
> #33 0x10009960 in ?? ()
> #34 0x0f4358ac in __libc_init_first () from /lib/tls/libc.so.6
> #35 0x0f4358ac in __libc_init_first () from /lib/tls/libc.so.6
> #36 0x0f4358ac in __libc_init_first () from /lib/tls/libc.so.6
> 
> 
> -- System Information:
> Debian Release: testing/unstable
>   APT prefers unstable
>   APT policy: (990, 'unstable'), (500, 'sid'), (500, 'testing'), (500, 
> 'stable')
> Architecture: powerpc (ppc)
> Shell:  /bin/sh linked to /bin/bash
> Kernel: Linux 2.6.12-1-powerpc
> Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) (ignored: 
> LC_ALL set to [EMAIL PROTECTED])
> 
> Versions of packages gringotts depends on:
> ii  libatk1.0-0               1.10.3-1       The ATK accessibility toolkit
> ii  libc6                     2.3.5-12       GNU C Library: Shared libraries 
> an
> ii  libcairo2                 1.0.2-3        The Cairo 2D vector graphics 
> libra
> ii  libfontconfig1            2.3.2-1.1      generic font configuration 
> library
> ii  libglib2.0-0              2.8.6-1        The GLib library of C routines
> ii  libgringotts1             1.2.1-9        encapsulate data in an encrypted 
> a
> ii  libgtk2.0-0               2.8.10-1       The GTK+ graphical user 
> interface 
> ii  libpango1.0-0             1.10.2-1       Layout and rendering of 
> internatio
> ii  libpopt0                  1.7-5          lib for parsing cmdline 
> parameters
> ii  libx11-6                  6.9.0.dfsg.1-4 X Window System protocol client 
> li
> ii  libxcursor1               1.1.3-1        X cursor management library
> ii  libxext6                  6.9.0.dfsg.1-4 X Window System miscellaneous 
> exte
> ii  libxi6                    6.9.0.dfsg.1-4 X Window System Input extension 
> li
> ii  libxinerama1              6.9.0.dfsg.1-4 X Window System multi-head 
> display
> ii  libxrandr2                6.9.0.dfsg.1-4 X Window System Resize, Rotate 
> and
> ii  libxrender1               1:0.9.0.2-1    X Rendering Extension client 
> libra
> 
> gringotts recommends no packages.
> 
> -- no debconf information



-- 
  ,''`.                  Bastian Kleineidam
 : :' :                    GnuPG Schlüssel
 `. `'    gpg --keyserver wwwkeys.pgp.net --recv-keys 32EC6F3E
   `-

--- stdfns.c.orig       2006-01-30 23:27:34.584171324 +0100
+++ stdfns.c    2006-01-30 23:30:52.583966479 +0100
@@ -138,7 +138,7 @@
 mutils_word32swap(mutils_word32 x)
 {
 #if defined(WORDS_BIGENDIAN)
-       mutils_word32 out = MIX32(x);
+       mutils_word32 out = MIX32(&x);
 
        return(out);
 #else
@@ -179,7 +179,7 @@
 #if defined(WORDS_BIGENDIAN)
        for (loop = 0, ptr = buffer; loop < n; loop++, ptr++)
        {
-               *ptr = MIX32(*ptr);
+               *ptr = MIX32(ptr);
        }
 #endif
 

Reply via email to