Subject: Re: unaligned access: how to track ?
To: Manuel Bouyer <email@example.com>
From: Chris G. Demetriou <firstname.lastname@example.org>
Date: 06/07/2000 09:20:39
Manuel Bouyer <email@example.com> 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
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 - firstname.lastname@example.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.