it would seem that you'd have to do more than this, wouldn't you?
you'd also have to copy the bytes out when you want to read the
records, i would think.
Jonathan
On Oct 24, 2005, at 7:13 AM, Nicolas Zin wrote:
> Hi again,
>
> i think I found the problem on 64 bit arch (bus error)
>
>
> In hash_drv.c, you should try this small diff
> ---
> 1080c1080
> < rec->hashcode = wrec->hashcode;
> ---
> > bcopy((char*)wrec,(char*)rec,sizeof(struct
> _hash_drv_spam_record));
>
>
> For technical explanation: in _hash_drv_set_spamrecord() dpsam try
> to write from in memory structure to a mmaped structure. But the
> mmapped structure is 4 bytes aligned, but not 8 bytes aligned (*),
> and so the processor can't make a copy on a (long long) type.
> I used a bcopy because it seems that memcpy is proned to alignment
> problems too. :-(
> I do not have seen any other place were the problem arises.
>
> Sounds good to everyone?
>
> /nicolas
>
>
>
> (*), for dspam developpers, apparently the file is composed first
> on a _hash_drv_header structure, and next dozens of
> _hash_drv_spam_record structures. _hash_drv_header have a size of a
> multiple of 4, not 8. so the other ones are not 8 bytes aligned
>
>
>
Received on Mon Oct 24 10:40:28 2005
This archive was generated by hypermail 2.1.8 : Tue Oct 25 2005 - 00:00:01 EDT