[Xorp-cvs] XORP cvs commit: xorp/libxorp

Ben Greear greearb at candelatech.com
Tue Apr 22 11:00:19 PDT 2008


Pavlin Radoslavov wrote:

> I was thinking about trivial work-around in the code itself like:
> 
>     unsigned long junk = 0;
>     unsigned long junk_seed[2];
> 
>     junk = junk_seed[1];
> 
> 
> What OS and compiler version are you using?
> I have FreeBSD-7.0 (amd64) with the following compiler version
> and the original code was compiling for me without a warning:
> 
> gcc (GCC) 4.2.1 20070719  [FreeBSD]

That's still referencing un-init memory (which is what you
are trying to do, after all).  Whenever someone fixes the compiler
(or uses something to detect bogus memory accesses),
it will break again.

Maybe instead just use the low-order bits of gettimeofday
by itself?  Surely that is random enough by itself?

Thanks,
Ben

> 
> Pavlin
> 
> _______________________________________________
> Xorp-cvs mailing list
> Xorp-cvs at icir.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-cvs


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-cvs mailing list