Closed Bug 1505962 Opened 2 years ago Closed 2 years ago

Add redirection for rand()

Categories

(Core Graveyard :: Web Replay, enhancement)

enhancement
Not set
normal

Tracking

(firefox65 fixed)

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: bhackett1024, Assigned: bhackett1024)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
While in a single threaded context we should be able to control for the random number seed and generate the same sequence of numbers, there are several ways in which we could fail to replay the numbers exactly --- if rand() is called while events are passed through, or if it is called from multiple threads whose accesses aren't synchronized.  The attached patch adds a redirection to ensure that rand() calls always produce the same value.
Attachment #9023802 - Flags: review?(lsmyth)
Attachment #9023802 - Flags: review?(lsmyth) → review+
https://hg.mozilla.org/mozilla-central/rev/fa47f2e5c1fb
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
This patch broke Web Replay on 10.13 (and possibly other versions), backing out for now.

https://hg.mozilla.org/integration/mozilla-inbound/rev/c418b8e31eacc847c27c03c4636ce3315c0c7e2f
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Depends on: 1506280
Depends on: 1506311
It turns out this patch never broke things after all (after backing it out 10.13 was still broken), but the problem was with the CGColorSpaceCreateDeviceGray redirection added by bug 1505922.
https://hg.mozilla.org/mozilla-central/rev/f3cea0fce1e0
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.