That is correct.  It didn't .   Also, Remember that many of the functions use the HA malloc code which may/may not properly align things in memory.

This was the change I made for that fix.

struct sys_config               config_init_value;
struct sys_config *             config  = &config_init_value;

* Revision 1.236  2003/01/16 00:49:46  msoffen
* Created static variable instead of "run time" allocation for config variable
* becuase on Solaris the variable wasn't being created with proper memory
* alignment.

Matt


On Thu, 2006-01-05 at 12:28 -0700, Alan Robertson wrote:
David Lee wrote:
> In what follows the term "Solaris" is probably wider than that.  A better
> reading might turn out to be:
>    "OSes and/or architectures in which multibyte operations (e.g. assign a
>    16-bit quantity) require a multibyte alignment (e.g. word, doubleword,
>    etc)."
> 
> So understand my use of the word "Solaris" as a shorthand for that!
> 
> Firstly: a general query to all:  Have any "Solaris" users successfully
> run "ipctest" (under "lib/clplumbing")?  Success/failure?
> 
> For me, it fails, as the client is trying to write "String-2".  After much
> tedious insertion of debugging statements, I have pinned it down.  The
> "client" process of ipctest crashes in "socket_resume_io_write()" at the
> statement:
>    head->msg_len = msg->msg_len
> 
> Sure enough "head", on this occasion, is not cleanly aligned for an "int".
> (I suspect that there will also be similar assignments with similar
> problems: for instance I see one in the line following the one above!)
> 
> Further when I run this on Linux (although "Intel" might be a better
> technical interpretation) all is well: these unaligned assignments are
> still present, but work fine.
> 
> 
> Secondly: a specific query to the developers:  Could you confirm that the
> above analysis is reasonable?  If so, how do we set about addressing this
> problem, and its instances?  Should we be using "memcpy" for such
> instances?

Malloc is supposed to ALWAYS return storage which is sufficiently 
aligned for any purpose.  It sounds like it's not.  (didn't this come up 
before on Solaris?)

What libc are you using?


_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to