ElectricFence

David Relson relson at osagesoftware.com
Fri Jan 10 14:39:00 CET 2003


At 08:30 AM 1/10/03, Graham Wilson wrote:

>On Thu, Jan 09, 2003 at 11:32:05PM -0500, David Relson wrote:
> > What's interesting about these tests is that bogofilter is run with input
> > that doesn't contain any tokens.  When the code gets to rstats_print()
> > there are 0 tokens to print.  This function allocates memory so it can 
> sort
> > the array of tokens.  With no tokens, the allocation call becomes
> > xcalloc(0, 4).  By forcing the count to 1 (instead of 0), all the tests
> > PASS with ElectricFence becomes happy with this test.
>
>do you mean that you are forcing count to in in xmalloc()?

No, I changed the value before the call to xmalloc().  I learned since then 
that ElectricFence can be told to ignore malloc(0), so I'm planning on 
taking the patch out.






More information about the bogofilter-dev mailing list