Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Issue 200483003: - Do not rely on time to seed the default PRNG. (Closed)

Created:
6 years, 9 months ago by Ivan Posva
Modified:
6 years, 9 months ago
Reviewers:
siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

- Do not rely on time to seed the default PRNG. R=asiva@google.com Committed: https://code.google.com/p/dart/source/detail?r=33704

Patch Set 1 #

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -5 lines) Patch
M runtime/lib/math.cc View 1 chunk +8 lines, -0 lines 1 comment Download
M runtime/lib/math_patch.dart View 1 1 chunk +3 lines, -5 lines 1 comment Download
M runtime/vm/bootstrap_natives.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Ivan Posva
6 years, 9 months ago (2014-03-14 17:18:42 UTC) #1
siva
https://codereview.chromium.org/200483003/diff/20001/runtime/lib/math.cc File runtime/lib/math.cc (right): https://codereview.chromium.org/200483003/diff/20001/runtime/lib/math.cc#newcode185 runtime/lib/math.cc:185: seed |= (static_cast<int64_t>(rnd->NextUInt32())) << 32; I would prefer seed ...
6 years, 9 months ago (2014-03-14 17:27:12 UTC) #2
siva
lgtm
6 years, 9 months ago (2014-03-14 17:27:18 UTC) #3
Ivan Posva
Committed patchset #2 manually as r33704 (presubmit successful).
6 years, 9 months ago (2014-03-14 17:30:40 UTC) #4
siva
6 years, 9 months ago (2014-03-17 17:46:01 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/200483003/diff/20001/runtime/lib/math_patch.dart
File runtime/lib/math_patch.dart (right):

https://codereview.chromium.org/200483003/diff/20001/runtime/lib/math_patch.d...
runtime/lib/math_patch.dart:157: static var _prng = new Random(_initialSeed());
This can potentially result in an overflow error when the flag
--throw_on_javascript_int_overflow flag is used.

Powered by Google App Engine
This is Rietveld 408576698