[SERVER-20121] XorShift PRNG should use unsigned arithmetic Created: 25/Aug/15  Updated: 10/Mar/16  Resolved: 28/Aug/15

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 2.6.12, 3.0.7, 3.1.8

Type: Bug Priority: Major - P3
Reporter: Mathias Stearn Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-533 Aggregation stage to randomly sample ... Closed
is depended on by SERVER-19182 Integrate storage engine optimization... Closed
Related
related to SERVER-20153 ClusterFindInitialBatchSizeIsZero uni... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Participants:

 Description   

Using signed arithmetic gives incorrect behavior for >>.



 Comments   
Comment by Githook User [ 04/Mar/16 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'redbeard0531@gmail.com'}

Message: SERVER-20121 Use unsigned arithmetic in PsuedoRandom

(cherry picked from commit 1c5fdf8)
Fully manual cherry pick.
Branch: v2.6
https://github.com/mongodb/mongo/commit/ec270ef20b801d249b17d2ea9a115350ddd64de9

Comment by Githook User [ 23/Sep/15 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-20121 Use unsigned arithmetic in PsuedoRandom

(cherry picked from commit 1c5fdf89ee6fd377096b9369b94ee490792a22b8)

Conflicts:
src/mongo/db/pipeline/document_source_test.cpp
src/mongo/scripting/bson_template_evaluator.cpp
Branch: v3.0
https://github.com/mongodb/mongo/commit/447aa61998decf2c071b407163eb22a8b6f6858b

Comment by Githook User [ 28/Aug/15 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-20121 Use unsigned arithmetic in PsuedoRandom
Branch: master
https://github.com/mongodb/mongo/commit/1c5fdf89ee6fd377096b9369b94ee490792a22b8

Generated at Thu Feb 08 03:53:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.