Subject: Re: unaligned access: how to track ?
To: Manuel Bouyer <>
From: Chris G. Demetriou <>
List: port-alpha
Date: 06/07/2000 09:20:39
Manuel Bouyer <> writes:
> This looks like the problem is in libc/db, but I'm not sure how to fix it and
> anyway I don't have the time to look at it.

No, it's not.  It's a bug in the code using the db interfaces.  To
quote dbopen(3):

       Access to all file types is based on key/data pairs.  Both
       keys and data are represented by the following data struc-
[ ... ]
       Key  and data byte strings may reference strings of essen-
       tially unlimited length although any two of them must  fit
       into  available  memory  at  the  same time.  It should be
       noted that the access methods provide no guarantees  about
       byte string alignment.

i.e., if you want to access them as structures, it's on you to make
sure you've put them in a form such that that is safe.

Chris Demetriou - -
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.