[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[csmith-dev] arc4random on Windows/Visual Studio?



Does Visual Studio's runtime include a working `arc4random_buf'?

I'm leaning toward incorporating the following patch from the OpenBSD folks,
which uses `arc4random_buf' determine the (nodeterministic) seed for the
(deterministic) random-number generator:

https://github.com/openbsd/ports/blob/master/devel/csmith/patches/patch-src_platform_cpp

The nice thing about this method is that it's architecture neutral.  But is it
"OS neutral"?  Is is available on all the platforms we currently care about?

If it's not available on Windows, of course I can just leave the `rdtsc'-based
method in place for Windows.  It would be nice to avoid having another
Windows-specific thing, though.

Thanks ---

Eric.

-- 
-------------------------------------------------------------------------------
Eric Eide <eeide@cs.utah.edu>  .         University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX