Re: [head tinderbox] failure on mips/mips

From: Bruce Simpson <bms_at_incunabulum.net>
Date: Wed, 18 Feb 2009 21:54:30 +0000
M. Warner Losh wrote:
> ...
> : The point being that programmers *do* code with certain
> : assumptions and as soon as those assumptions don't hold on
> : a platform, you end up worse off. My thoughts for MIPS n32
> : are to make it behave like any "normal" 32-bit strong-
> : alignment platform to avoid 1) a large number of runtime
> : alignment faults -- which are a bigger performance bottleneck
> : than forcing 64-bit integrals to be accessed with 2 32-bit
> : accesses
>   

FWIW, Linux use a type-length-value protocol for the netlink routing 
socket, so alignment issues of this kind are shifted around (forgive the 
pun).

> It also turns out that in this case, a simple (void *) is safe and
> causes no issues because that time_t isn't accessed...  It does give
> one time to pause and think about it.
>   

Yes, the void * cast works around the issue for now, but doesn't offer 
any guarantees that we are doing the right thing on strict alignment 
architectures.
If the alignment *is* invalid, then we take the hit.

cheers
BMS
Received on Wed Feb 18 2009 - 20:54:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:42 UTC