[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GIOP errors (Re: XTL 1.3.pl.9)



Angus Leeming wrote:
> giop.h input_raw/output_raw cause unaligned access errors at the
> moment. (Ie your FIXME needs attention!)  See Note 1.
> 
> Fixing it to not produce these errors "breaks the standard". Once done, however,
> together with the other changes (see below) I can confirm that example codes
> compile and run as they should on Alpha machines running Tru64 unix 4.0e, code
> compiled with gcc-2.95.2 and with DIGITAL C++ V6.1-029. (I'd also note that
> compiling optimised code with g++ takes forever in comparison to cxx.)
> 
> So, giop.h needs sorting. I'll have a look next week. You too?

Can you test the included patch? I think this might fix the problem
(if I correctly remember how the align variable is used).

I'll address your remaining sugestions later. 
 
> Finally: mips - SGI (really?)
> No! I'll have a go on 32 and 64 bit SGI machines next week. Perhaps!

Funny. Somehow config.h knows about sgi... :-)
 

-- 
Jose Orlando Pereira
* mailto:jop@di.uminho.pt * http://gsd.di.uminho.pt/~jop *
Index: 1.3.pl.9/include/xtl/giop.h
--- 1.3.pl.9/include/xtl/giop.h Fri, 05 May 2000 18:57:58 +0100 jop (xtl/6_giop.h 1.13 644)
+++ 1.3.pl.9(w)/include/xtl/giop.h Tue, 09 May 2000 10:52:21 +0100 jop (xtl/6_giop.h 1.13 644)
@@ -151,12 +151,7 @@
 			memcpy(data, require(256), 256);
 		int res=size-(i<<8);
 		memcpy(data, require(res), res);
-// FIXME: I'm not sure about this. Why is it required in GIOP?
-// Even if it is, it should not depend on local word length, or
-// we will not be able to talk to a different architecture at
-// the other end.
-//		if (res%lenWord!=0)
-//			require(lenWord-res%lenWord);
+		align+=res;
 	}
 
  	void output_start() {
@@ -204,8 +199,7 @@
 			memcpy(desire(256), data, 256);
 		int res=size-(i<<8);
 		memcpy(desire(res), data, res);
-//		if (res%lenWord!=0)
-//			memset(desire(lenWord-res%lenWord), 0, lenWord-res%lenWord);
+		align+=res;
 	}
 };