David Lee wrote:
On Fri, 6 Jan 2006, Alan Robertson wrote:
Matthew Soffen wrote:
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.
It does indeed align things properly - it gets ALL its space from malloc.
In my particular case, I think we might be seeing an effect from elsewhere
in the heartbeat code. (That is, that malloc() may well be fine and that
ha_malloc() may similarly be fine.)
Rather, is it possible that the "pool" code ("lib/clplumbing/ocf_ipc.c"?)
is doing naughty things? For instance, does it do a relatively big
"malloc" (properly aligned) but then hand out (i.e. setting "currpos",
perhaps?) non-aligned chunks? Does the pool code regard it merely as a
bytestream, rather than something which may contain entities requiring
alignment?
Could someone who knows this area confirm this possibility (or
definitively refute it), please?
If this is the case, then one solution is for its author (or current
maintainer) to rework it to handle alignment.
Alternatively, the attached patch fixes its effects, by replacing the two
(known, remaining) instances of integer assignments by "memcpy()".(*)
(*) Actually he patch itself has a strange wrinkle, documented in its
comment.
Maybe gshi can look at this. I wrote the original code, but gshi wrote
this part...
--
Alan Robertson <[EMAIL PROTECTED]>
"Openness is the foundation and preservative of friendship... Let me
claim from you at all times your undisguised opinions." - William
Wilberforce
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/