Closed Bug 1652081 Opened 4 years ago Closed 4 years ago

Guarantee that newly created shared memory is zeroed

Categories

(Core :: IPC, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: jld, Assigned: jld)

Details

Attachments

(1 file)

There was a question recently in Matrix about whether IPC shared memory is zeroed when it's created. Newly created shared memory is acquired from the OS, so for security reasons the OS won't give us a previous allocation's data like for malloc; in practice that means it's zeroed (rather than filled with some nonzero pattern), and this is observed to be the case with the APIs we currently use, but we should guarantee that to save callers the cost of unnecessary memsets. I've written some unit tests to check this.

Pushed by jedavis@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/97d02fb626d4
Verify that newly allocated shared memory is zeroed. r=mccr8
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80

== Change summary for alert #26520 (as of Thu, 16 Jul 2020 06:24:24 GMT) ==

Improvements:

59% build times windows2012-32-shippable opt instrumented taskcluster-c5.4xlarge 1,579.95 -> 642.93
51% build times windows2012-32-shippable opt instrumented taskcluster-c5d.4xlarge 1,513.29 -> 734.57

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=26520

Keywords: perf-alert

This was a simple patch to add some tests; it almost certainly didn't improve build time.

Keywords: perf-alert
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: