Here's a backtrace I've got for it:

r...@debian:/tmp/mailutils-2.0+dfsg1# gdb examples/.libs/lt-decode2047
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc-linux-gnu"...
(gdb) run < mailbox/testsuite/Decode2047 
Starting program: /tmp/mailutils-2.0+dfsg1/examples/.libs/lt-decode2047 < 
mailbox/testsuite/Decode2047
[Thread debugging using libthread_db enabled]
# This file is part of Mailutils testsuite.=> Success
# This file is part of Mailutils testsuite.
# Copyright (C) 2003, 2006, 2007 Free Software Foundation=> Success
# Copyright (C) 2003, 2006, 2007 Free Software Foundation
#  => Success
#  
# This program is free software; you can redistribute it and/or modify=> Success
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by=> Success
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or=> Success
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.=> Success
# (at your option) any later version.
#   => Success
#   
# This program is distributed in the hope that it will be useful,=> Success
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of=> Success
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the=> Success
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.=> Success
# GNU General Public License for more details.
#  => Success
#  
# You should have received a copy of the GNU General Public License=> Success
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,=> 
Success
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. => Success
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
#=> Success
#
=> Success

[New Thread 0xf7f86ff0 (LWP 21601)]
=?US-ASCII?Q?Keith_Moore?= <mo...@cs.utk.edu> => Success=> Success
Keith Moore <mo...@cs.utk.edu> => Success
Keith Moore <mo...@cs.utk.edu>=> Success
Keith Moore <mo...@cs.utk.edu>
=> Success


Program received signal SIGBUS, Bus error.
[Switching to Thread 0xf7f86ff0 (LWP 21601)]
mu_assoc_clear (assoc=0x236a0) at assoc.c:256
256           if (elem->name)
(gdb)  bt
#0  mu_assoc_clear (assoc=0x236a0) at assoc.c:256
#1  0xf7f08f08 in mu_assoc_destroy (passoc=0x22068) at assoc.c:270
#2  0xf7f36a98 in mu_property_destroy (pp=0x22020, owner=0x22018) at 
property.c:72
#3  0xf7f16050 in filter_destroy (stream=<value optimized out>) at filter.c:50
#4  0xf7f3bc68 in mu_stream_destroy (pstream=0xffc5f5fc, owner=0x22018) at 
stream.c:87
#5  0xf7f37bc8 in mu_rfc2047_decode (tocode=0x10b90 "iso-8859-1", 
input=0xffc5f670 "=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <k...@dkuug.dk> => 
Success", 
    ptostr=0xffc5f774) at rfc2047.c:171
#6  0x000109d4 in main (argc=<value optimized out>, argv=<value optimized out>) 
at decode2047.c:73
(gdb) disass
Dump of assembler code for function mu_assoc_clear:
0xf7f08e4c <mu_assoc_clear+0>:  save  %sp, -112, %sp
0xf7f08e50 <mu_assoc_clear+4>:  sethi  %hi(0x50800), %l7
0xf7f08e54 <mu_assoc_clear+8>:  call  0xf7f089dc
0xf7f08e58 <mu_assoc_clear+12>: add  %l7, 0x350, %l7    ! 0x50b50
0xf7f08e5c <mu_assoc_clear+16>: cmp  %i0, 0
0xf7f08e60 <mu_assoc_clear+20>: be  0xf7f08ed8 <mu_assoc_clear+140>
0xf7f08e64 <mu_assoc_clear+24>: nop 
0xf7f08e68 <mu_assoc_clear+28>: ld  [ %i0 + 0xc ], %l2
0xf7f08e6c <mu_assoc_clear+32>: cmp  %l2, 0
0xf7f08e70 <mu_assoc_clear+36>: be  0xf7f08ed8 <mu_assoc_clear+140>
0xf7f08e74 <mu_assoc_clear+40>: sethi  %hi(0xfffff000), %g1
0xf7f08e78 <mu_assoc_clear+44>: ld  [ %i0 + 4 ], %g2
0xf7f08e7c <mu_assoc_clear+48>: or  %g1, 0x1d4, %g1
0xf7f08e80 <mu_assoc_clear+52>: sll  %g2, 2, %g2
0xf7f08e84 <mu_assoc_clear+56>: ld  [ %l7 + %g1 ], %g3
0xf7f08e88 <mu_assoc_clear+60>: ld  [ %g3 + %g2 ], %l3
0xf7f08e8c <mu_assoc_clear+64>: cmp  %l3, 0
0xf7f08e90 <mu_assoc_clear+68>: be  0xf7f08ed8 <mu_assoc_clear+140>
0xf7f08e94 <mu_assoc_clear+72>: clr  %l1
0xf7f08e98 <mu_assoc_clear+76>: b  0xf7f08ea4 <mu_assoc_clear+88>
0xf7f08e9c <mu_assoc_clear+80>: ld  [ %i0 + 8 ], %g1
0xf7f08ea0 <mu_assoc_clear+84>: ld  [ %i0 + 8 ], %g1
0xf7f08ea4 <mu_assoc_clear+88>: add  %g1, 7, %g1
0xf7f08ea8 <mu_assoc_clear+92>: smul  %g1, %l1, %l0
0xf7f08eac <mu_assoc_clear+96>: inc  %l1
0xf7f08eb0 <mu_assoc_clear+100>:        ld  [ %l2 + %l0 ], %g1
0xf7f08eb4 <mu_assoc_clear+104>:        cmp  %g1, 0
0xf7f08eb8 <mu_assoc_clear+108>:        be  0xf7f08ecc <mu_assoc_clear+128>
0xf7f08ebc <mu_assoc_clear+112>:        add  %l2, %l0, %o1
0xf7f08ec0 <mu_assoc_clear+116>:        call  0xf7f08c1c <assoc_free_elem>
0xf7f08ec4 <mu_assoc_clear+120>:        mov  %i0, %o0
0xf7f08ec8 <mu_assoc_clear+124>:        clr  [ %l2 + %l0 ]
0xf7f08ecc <mu_assoc_clear+128>:        cmp  %l3, %l1
0xf7f08ed0 <mu_assoc_clear+132>:        bgu,a   0xf7f08ea0 <mu_assoc_clear+84>
0xf7f08ed4 <mu_assoc_clear+136>:        ld  [ %i0 + 0xc ], %l2
0xf7f08ed8 <mu_assoc_clear+140>:        ret 
0xf7f08edc <mu_assoc_clear+144>:        restore 
End of assembler dump.
(gdb) info reg
g0             0x0      0
g1             0xb      11
g2             0x0      0
g3             0xf7f41170       -134999696
g4             0xf7f5b08c       -134893428
g5             0x10     16
g6             0x3200474c       838879052
g7             0xf7f86ff0       -134713360
o0             0xf7f08e4c       -135229876
o1             0x236d8  145112
o2             0xffc5f3ac       -3804244
o3             0xf7f8f190       -134680176
o4             0x0      0
o5             0x1      1
sp             0xffc5f348       0xffc5f348
o7             0xf7f08e54       -135229868
l0             0xb      11
l1             0x2      2
l2             0x236d8  145112
l3             0x25     37
l4             0xffc5f390       -3804272
l5             0x0      0
l6             0x0      0
l7             0xf7f599a4       -134899292
i0             0x236a0  145056
i1             0xf7eec000       -135348224
i2             0xffc5f41c       -3804132
i3             0xf7f8f190       -134680176
i4             0x0      0
i5             0x1      1
fp             0xffc5f3b8       0xffc5f3b8
i7             0xf7f08f00       -135229696
y              0x0      0
psr            0xff000080       [ S #24 #25 #26 #27 #28 #29 #30 #31 ]
wim            0x0      0
tbr            0x0      0
pc             0xf7f08eb0       0xf7f08eb0 <mu_assoc_clear+100>
npc            0xf7f08eb4       0xf7f08eb4 <mu_assoc_clear+104>
fsr            0x0      [ ]
csr            0x0      0
(gdb) list
251     
252       hs = hash_size[assoc->hash_num];
253       for (i = 0; i < hs; i++)
254         {
255           struct _mu_assoc_elem *elem = ASSOC_ELEM (assoc, i);
256           if (elem->name)
257             {
258               assoc_free_elem (assoc, elem);
259               elem->name = NULL;
260             }
(gdb) print i
$1 = 2
(gdb) print assoc->tab
$2 = (void *) 0x236d8
(gdb) print sizeof(struct _mu_assoc_elem)
$3 = 8
(gdb) print assoc->elsize
$4 = 4

Definition of macros:

#define ASSOC_ELEM_SIZE(a) ((a)->elsize + sizeof(struct _mu_assoc_elem) - 1)

#define __ASSOC_ELEM(a,p,n) \
 ((struct _mu_assoc_elem*) ((char*) (p) + ASSOC_ELEM_SIZE (a) * n))

#define ASSOC_ELEM(a,n) __ASSOC_ELEM(a,(a)->tab,n)

In our case ASSOC_ELEM_SIZE(assoc) is 11 (stored in %l0 register), assoc->tab
is 0x236d8 (stored in %l2) and it chokes trying to load the word into %g1 from
memory location [%l2 + %l0], because it's not word aligned. Generally, packing
the structures of irregular size (11 bytes in this case) in a memory region is
asking for trouble on the platforms with strict alignment requirements.

Best regards,
-- 
Jurij Smakov                                           ju...@wooyd.org
Key: http://www.wooyd.org/pgpkey/                      KeyID: C99E03CC



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to