Closed Bug 1508091 Opened Last year Closed Last year

Add redirection for mach_vm_map

Categories

(Core :: Web Replay, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: bhackett, Assigned: bhackett)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
mach_vm_map is used when mapping shared memory blocks within a recording/replaying process.  While we can't record/replay all shared memory block behaviors --- if the other process writes to any part of the block while recording, those changes won't replay --- some shared memory blocks are only written to, and not read from.  Redirecting mach_vm_map lets us allocate memory for these mapped blocks when replaying.  This fixes crashes when dragging around images or selected text on pages, but because of the above there may still be a future need for other changes to how we deal with shared memory.
Attachment #9025904 - Flags: review?(lsmyth)
Comment on attachment 9025904 [details] [diff] [review]
patch

Review of attachment 9025904 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good.

Is there no need to deal with any of the other arguments because the callsites in FF don't use them, or just because they are safe to ignore in this context?
Attachment #9025904 - Flags: review?(lsmyth) → review+
(In reply to Logan Smyth [:loganfsmyth] from comment #1)
> Comment on attachment 9025904 [details] [diff] [review]
> patch
> 
> Review of attachment 9025904 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Looks good.
> 
> Is there no need to deal with any of the other arguments because the
> callsites in FF don't use them, or just because they are safe to ignore in
> this context?

Mainly the first --- Gecko only calls this function to initialize the shared memory mappings, so we don't need to carefully emulate its behavior (which is fortunate, as like mmap this API looks like a swiss army knife and Apple also hasn't bothered to document it).
Pushed by bhackett@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/44f52ad4773b
Add redirection for mach_vm_map, r=lsmyth.
https://hg.mozilla.org/mozilla-central/rev/44f52ad4773b
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.