Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Issue 2712363002: Use mach_override to intercept all newly registered malloc zones.

Created:
3 years, 9 months ago by erikchen
Modified:
3 years, 9 months ago
CC:
chromium-reviews, wfh+watch_chromium.org, mac-reviews_chromium.org, Dai Mikurube (NOT FULLTIME), vmpstr+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use mach_override to intercept all newly registered malloc zones. mach_override is required for two reasons: 1) There is no signal emitted when a new malloc zone is registered. Intercepting all malloc zones without mach_override requires polling, and the interception will not happen immediately at registration. 2) Polling requires Chrome to call malloc_get_all_zones, which is not thread safe and has undefined behavior if a zone is registered or deregistered during container traversal. BUG=693237

Patch Set 1 #

Patch Set 2 : Add test. #

Patch Set 3 : Clean up test. #

Patch Set 4 : Add tests. #

Patch Set 5 : remove debugging. #

Patch Set 6 : add logging. #

Patch Set 7 : Fix many tests. #

Patch Set 8 : More clean up. #

Patch Set 9 : Clean up test. #

Patch Set 10 : Remove CL depedency. #

Patch Set 11 : More test fixe. #

Patch Set 12 : Rebase. #

Patch Set 13 : More fixes. #

Patch Set 14 : Fix compile. #

Patch Set 15 : Rebase. #

Patch Set 16 : Debug logging. #

Patch Set 17 : more logging. #

Patch Set 18 : Fix test remove logging. #

Patch Set 19 : Fix test. #

Patch Set 20 : more debug logging. #

Patch Set 21 : Fix 10.9. #

Patch Set 22 : compile error. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -1 line) Patch
M base/BUILD.gn View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M base/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M base/allocator/allocator_interception_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +6 lines, -1 line 0 comments Download
M base/allocator/allocator_interception_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +83 lines, -0 lines 0 comments Download
A base/allocator/allocator_interception_mac_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +44 lines, -0 lines 0 comments Download
M base/allocator/allocator_shim.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +9 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 58 (55 generated)
erikchen
primiano, mark: Please review.
3 years, 9 months ago (2017-03-02 18:04:36 UTC) #56
Mark Mentovai
NAK. No more mach_override. We need to stop writing over program text. I think we’re ...
3 years, 9 months ago (2017-03-02 18:31:34 UTC) #57
erikchen
3 years, 9 months ago (2017-03-02 18:32:24 UTC) #58
On 2017/03/02 18:31:34, Mark Mentovai wrote:
> NAK. No more mach_override. We need to stop writing over program text. I think
> we’re only using it in CFBundleBlocker now, and we should get rid of that as
> soon as we can too.

Perhaps you could discuss and look at alternatives with myself and rsesek@? 

https://bugs.chromium.org/p/chromium/issues/detail?id=693237#c9

Powered by Google App Engine
This is Rietveld 408576698