Closed Bug 1505962 Opened 6 years ago Closed 6 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

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+
Status: NEW → RESOLVED
Closed: 6 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.
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: