Bug#537952: Use more random random seed than localtime

Don Armstrong don at donarmstrong.com
Fri Jul 31 00:09:59 UTC 2009


On Thu, 30 Jul 2009, Jonathan Yu wrote:
> On Thu, Jul 30, 2009 at 7:35 PM, Don Armstrong<don at donarmstrong.com> wrote:
> > On Thu, 30 Jul 2009, Jonathan Yu wrote:
> >> I should also note that changing the patch to this:
> >> +void
> >> +set_default_seed(long time)
> >> +       PREINIT:
> >> +       long seed;
> >> +       CODE:
> >> +       seed = Perl_get_seed;
> >> +       setall(seed, seed);
> >>
> >> Yielded the same error. Am I missing something about how to use setall()?
> >
> > Yes. You're missing the modulus which is present in my second patch.
> 
> I don't think I am. Here is the code prior to that bit:

Ugh. Puting the limitation of setall into this function is silly. But
regardless, you need *two* diferent seed values. Read my patch again.
 
> I did that so that if Perl_seed isn't available, it would fall back to
> using 'time' (which is passed in as a parameter).

Which is wrong and not aplicable to debian regardless. Let the
upstream maintainer decide this if the want to support ancient perls.


Don Armstrong

-- 
All bad precedents began as justifiable measures.
 -- Gaius Julius Caesar in "The Conspiracy of Catiline" by Sallust

http://www.donarmstrong.com              http://rzlab.ucr.edu





More information about the pkg-perl-maintainers mailing list