Re: db bug with i386: sanity check [BUG FOUND probably]
Re: db bug with i386: sanity check [BUG FOUND probably]
- Subject: Re: db bug with i386: sanity check [BUG FOUND probably]
- From: Stephane Sudre <email@hidden>
- Date: Tue, 28 Mar 2006 10:28:33 +0200
And the culprit is probably the __put_page function from hash_page.c
which is not un-swapping a buffer after writing it to disk. So this
leads to a corrupted data base in memory and the next call to a sync is
saving corrupted data (header is correct but the rest of the file is
incorrect).
Adding some un-swapping code after the _write call seems to make things
run fine on i386 with a BIG_ENDIAN data base. But I won't bet my right
hand on this fix for the moment.
AFAIK, the bug is also impacting the PPC platform because as soon as
the lorder is not the same as BYTE_ORDER, the swap problem is going to
happen.
Sadly, this means that if you don't use a fix, hash data base saved by
db on disks are not cross-endian compatible.
I filed a bug report on the FreeBSD site since this is where the
original source code is coming from.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden