[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: nonstandard assumptions in the code

Howard Chu writes:
>>>> * no padding bits in 'unsigned int'
>>>>   (required by back-bdb/dbcache.c:bdb_db_hash() - don't know why)
>>>> (...)
>>> These should be fixed.
>> (...)
> This code reverses the byte-order of the hash on little-endian machines,
> which makes the hash databases in HEAD incompatible with RE22.
> I note that the BDB configure script demands that sizeof(u_int32_t) == 4,
> so I don't see any point in accomodating padding bits here.

Good point.  Though as far as I can see, that script only tests for
sizeof, it does not test that (u_int32_t)-1 == 0xffffffffU.  So there
can still be padding bits in u_int32_t.  But that probably just means db
would not work, so there is no need for OpenLDAP to allow for it.

>  I think the previous code was perfectly fine and we should revert.

OK.  I'll make OpenLDAP configure test for padding bits instead.
And send a bug report to Sleepycat.