bugmldonkey, a multi-networks file-sharing client - Bugs: bug #7656, mldonkey Bus erros in static_tiger...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #7656: mldonkey Bus erros in static_tiger on Solaris 9

Submitter:  None
Submitted:  Mon 09 Feb 2004 10:54:23 PM UTC
   
 
Category:  Core Severity:  3 - Normal
Item Group:  Segmentation Fault Status:  Fixed
Assigned to:  None Open/Closed:  Closed
Release:  2.5.[5-9] Release:  2.5.9
Operating System:  Solaris Binaries Origin:  Binary from Savannah
CPU type:  Sparc

Jump to the original submission

Fri 09 Jul 2004 07:39:27 PM UTC, comment #7: 

Recently I had the chance to build Solaris cores. They ran for several days downloading and sharing Debian images without problems...

spiralvoice <spiralvoice>
Group administrator
Tue 04 May 2004 07:20:12 PM UTC, comment #6: 

Please check if this bug still is in current CVS version.
You should find a tarball of current CVS in files section of
this project: http://savannah.nongnu.org/download/mldonkey/

spiralvoice <spiralvoice>
Group administrator
Fri 09 Apr 2004 02:27:50 PM UTC, comment #5: 
spiralvoice <spiralvoice>
Group administrator
Fri 09 Apr 2004 12:09:45 PM UTC, comment #4: 
spiralvoice <spiralvoice>
Group administrator
Mon 16 Feb 2004 10:12:21 PM UTC, comment #3: 
Gabriel Forté <gab>
Fri 13 Feb 2004 01:41:12 AM UTC, comment #2: 

Index: tiger.c
===================================================================
RCS file: /cvsroot/mldonkey/mldonkey/src/utils/lib/tiger.c,v
retrieving revision 1.4
diff -u -r1.4 tiger.c
--- tiger.c     20 Nov 2003 16:43:26 -0000      1.4
+++ tiger.c     13 Feb 2004 01:17:07 -0000
@@ -176,7 +176,9 @@
 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_;
+/*  unsigned char temp[64]; */

   res[0]=0x0123456789ABCDEFLL

I still get:
=>[1] static_tiger(str = 0x472b00, length = 1025ULL, res = 0xffbfed09), line 183 in "tiger.c"
  [2] tiger_hash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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" ..., len = 1025, pos = 0, block_size = 1024, digest = 0xffbfed09 "?\x94L\xff?\x94L"), line 808 in "tiger.c"
  [4] tiger_tree_string(s = 0x4e7de0 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" ..., len = 1025, pos = 0, block_size = 2048, digest = 0x4af6a4 ""), line 815 in "tiger.c"
  [5] tigertree_unsafe_string(digest_v = 4912804, string_v = 5144032, len_v = 2051), line 850 in "tiger.c"
  [6] caml_c_call(0x4af6a4, 0x4e7de0, 0x803, 0x442d18, 0x7, 0x4af914), at 0x33fbd8
  [7] caml_main(0xffbfefd4, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x3302dc
  [8] main(0x1, 0xffbfefd4, 0xffbfefdc, 0x497668, 0x0, 0x0), at 0x330324


It's definetly a problem with declaring temp which causes this on Solaris (SPARC).

Bruno Saverio Delbono <bdelbono>
Wed 11 Feb 2004 06:16:44 PM UTC, comment #1: 


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

Anonymous
Mon 09 Feb 2004 10:54:23 PM UTC, original submission:  

$ dbx mlnet
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 7.1' in your .dbxrc
Reading mlnet
Reading ld.so.1
Reading libz.so.1
Reading libnsl.so.1
Reading libsocket.so.1
Reading libm.so.1
Reading libdl.so.1
Reading libc.so.1
Reading libmp.so.2
Reading libc_psr.so.1
(dbx) run
Running: mlnet
(process id 17186)
signal BUS (invalid address alignment) in static_tiger at 0x2d76b0
0x002d76b0: static_tiger+0x0028:        st      %o4, [%g1]
(dbx) where
=>[1] static_tiger(0x4058d8, 0x0, 0x401, 0xffbfed21, 0x0, 0x401), at 0x2d76b0
  [2] tiger_hash(0x0, 0x479de0, 0x400, 0xffbfed21, 0x0, 0x0), at 0x2d7c0c
  [3] tiger_tree_string(0x479de0, 0x401, 0x0, 0x400, 0xffbfed21, 0x800), at 0x2d7ca0
  [4] tiger_tree_string(0x479de0, 0x401, 0x0, 0x800, 0x442464, 0x800), at 0x2d7d48
  [5] tigertree_unsafe_string(0x442464, 0x479de0, 0x803, 0x4425b8, 0x479de0, 0x4435b8), at 0x2d7e68
  [6] caml_c_call(0x442464, 0x479de0, 0x803, 0x3d5af0, 0x7, 0x4426d4), at 0x2ef77c
  [7] caml_main(0xffbfefec, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x2dfe80
  [8] main(0x1, 0xffbfefec, 0xffbfeff4, 0x42a438, 0x0, 0x0), at 0x2dfec8
(dbx) backtrace
backtrace: not found
(dbx) bt
bt: not found
(dbx) pwd
/raid/homedirs/bdelbono/mldonkey-2.5.9
(dbx) uname -a
SunOS zion 5.9 Generic_112233-11 sun4u sparc SUNW,Ultra-Enterprise
(dbx) gcc -v
Reading specs from /opt/csw/gcc3/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/specs
Configured with: ../gcc-3.3.2/configure --prefix=/opt/csw/gcc3 --with-local-prefix=/opt/csw/gcc3 --enable-multilib --disable-nls --enable-threads
Thread model: posix
gcc version 3.3.2
(dbx) quit

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 7 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-07-09 spiralvoice StatusNone Fixed
    Open/ClosedOpen Closed
2004-03-02 spiralvoice Operating SystemSparc platforms Solaris
    CPU typeNone Sparc
2004-03-02 spiralvoice ReleaseNone 2.5.[5-9]
    Operating SystemNone Sparc platforms
2004-02-13 bdelbono Carbon-Copy- Added bruno --DOT-- s --DOT-- delbono --AT-- mail --DOT-- ac

Back to the top

Powered by Savane 3.13-3230.
Corresponding source code