[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mldonkey-users] static_tiger bus errors
From: |
Kevin A. Sindhu |
Subject: |
Re: [Mldonkey-users] static_tiger bus errors |
Date: |
Tue, 10 Feb 2004 09:30:05 -0800 |
User-agent: |
Mozilla Thunderbird 0.5 (Windows/20040207) |
Hi Falk,
Falk Hueffner wrote:
Looks like it's doing unaligned accesses on temp:
static void static_tiger(word64 *str, word64 length, word64 res[3])
{
...
unsigned char temp[64];
...
((word64*)(&(temp[56])))[0] = ((word64)length)<<3;
try replacing temp's declaration with
word64 temp_[64 / 8];
unsigned char *temp = (unsigned char *) temp_;
I tried doing this:
--- tiger.c Mon Feb 9 02:41:40 2004
+++ ../../../../../mldonkey-2.5.9/src/utils/lib/tiger.c Tue Feb 10
09:26:15 2004
@@ -176,7 +176,10 @@
static void static_tiger(word64 *str, word64 length, word64 res[3])
{
register word64 i, j;
- unsigned char temp[64];
+ word64 temp_[64 / 8];
+ unsigned char *temp = (unsigned char *) temp_;
+ / * Commenting out this line as it causes bus errors */
+ /* unsigned char temp[64]; */
res[0]=0x0123456789ABCDEFLL;
res[1]=0xFEDCBA9876543210LL;
However, I still have the bus errors:
(dbx) run
Running: mlnet
(process id 25001)
signal BUS (invalid address alignment) in static_tiger at 0x32600c
0x0032600c: static_tiger+0x0030: st %o4, [%g1]
(dbx) where
=>[1] static_tiger(0x4707b8, 0x0, 0x401, 0xffbfed21, 0x0, 0x401), at
0x32600c
[2] tiger_hash(0x0, 0x4e4de0, 0x400, 0xffbfed21, 0x0, 0x0), at 0x326564
[3] tiger_tree_string(0x4e4de0, 0x401, 0x0, 0x400, 0xffbfed21,
0x800), at 0x3265f8
[4] tiger_tree_string(0x4e4de0, 0x401, 0x0, 0x800, 0x4ad344, 0x800),
at 0x3266a0
[5] tigertree_unsafe_string(0x4ad344, 0x4e4de0, 0x803, 0x4ad498,
0x4e4de0, 0x4ae498), at 0x3267c0
[6] caml_c_call(0x4ad344, 0x4e4de0, 0x803, 0x4409d0, 0x7, 0x4ad5b4),
at 0x33e0d4
[7] caml_main(0xffbfefec, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x32e7d8
[8] main(0x1, 0xffbfefec, 0xffbfeff4, 0x495318, 0x0, 0x0), at 0x32e820
Kind Regards,
-Bruno