current cvs segfault on Debian hppa

Gyepi SAM gyepi at praxis-sw.com
Thu Oct 3 22:23:11 CEST 2002


On Thu, Oct 03, 2002 at 02:43:18PM -0500, Eric Seppanen wrote:
> On Thu, Oct 03, 2002 at 09:32:21PM +0200, Matthias Andree wrote:
> > On Thu, 03 Oct 2002, Eric Seppanen wrote:
> > 
> > > Someone back me up on this: if hmalloc() is returning odd addresses and 
> > > we're laying down structures at that address, we're broken on many 
> > > architectures, right?
> > 
> > It will break or slow down m68k, break MIPS, and apparently it breaks
> > HP-PA. However, how do we figure if the machine in question needs 16, 32
> > or 64-bit aligned addresses? How will this scale on really big boxes?
> > Might there be machines that need 128 bit alignment?
> 
> There are two possible approaches:
> 
> 1. Write code in a way that the compiler takes care of this.  That's the 
> idea in getting rid of the hmalloc() wrapper.

An earlier version of the wordhash code actually did this. I have sent it to Clint
for testing.  Rather than allocating blocks for structs and 
strings from the same buffer, as the current code does, the original code maintained separate
buffers for the hashnode_t struct and for strings.

I'd much rather let the compiler take care of alignment whenever possible. Manual intervention of this
sort could be dangerous since different compilers may require different ways of doing this.

-Gyepi

For summay digest subscription: bogofilter-digest-subscribe at aotto.com



More information about the Bogofilter mailing list