apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: Some pending pathches for review/commit
Date Wed, 22 Sep 2004 17:34:24 GMT
Ben Laurie wrote:
>>> Set the hash tables to zero on init.
>>> Although the test are passing now, some deep explanation
>>> would be fine (probably from Ben Laurie).
>>> I presume that the unix is setting the
>>> memory to zero while on WIN32 it is set to 0xCD, and that's
>>> why the expected test values are never met on WIN32.
> Ah, this would also explain David's problems with BeOS, probably. 
> However, I am concerned that unused memory shouldn't be, err, used. I'm 
> not sure about this, though, since using unused memory for random 
> numbers is a rare case where its OK - and I don't have time to check the 
> code right now, but I'm wondering if this is indicative of some deeper bug?

Actually only g->H = apr_pcalloc(p,H_size(g)) in apr_random_init
is enough. But if I write:
     g->H = apr_pcalloc(p,H_size(g));
     for (n = 0; n < H_size(g); n++)
         g->H[n] = n;

The test are failing again.

So either the algorithm expects that the initial state of the H buffer
is zeroed or is broken.


View raw message