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

Issue 2527533003: Make SyzyAsan support the allocation > 1GB (Closed)

Created:
4 years ago by Sébastien Marchand
Modified:
4 years ago
CC:
syzygy-changes_googlegroups.com
Target Ref:
refs/heads/master
Project:
syzygy
Visibility:
Public.

Description

Make SyzyAsan support the allocation > 1GB Currently SyzyAsan doesn't support the allocations > 1GB (although we don't enforce this, see crbug.com/656554). This is causing an issue when using it on a Large Address Aware applications because this kind of allocations are valid. This also make the SyzyAsan tests run in 4G mode by default. BUG=656554 R=chrisha@chromium.org Committed: https://github.com/google/syzygy/commit/ea4e050ecd48b344e82433f69c29d149bea89ed0

Patch Set 1 #

Patch Set 2 : Nit. #

Patch Set 3 : Bug fixes. #

Patch Set 4 : Add a maximum allocation size check. #

Total comments: 7

Patch Set 5 : Move the limit to block.h/cc #

Total comments: 2

Patch Set 6 : Do an unguarded alloc if the size > 2GB #

Patch Set 7 : Do an unguarded alloc if the size > 2GB #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -16 lines) Patch
M syzygy/agent/asan/block.h View 1 2 3 4 5 2 chunks +5 lines, -2 lines 0 comments Download
M syzygy/agent/asan/block.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M syzygy/agent/asan/block_unittest.cc View 1 2 3 4 5 6 1 chunk +6 lines, -1 line 0 comments Download
M syzygy/agent/asan/error_info.h View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M syzygy/agent/asan/error_info_unittest.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M syzygy/agent/asan/heap_managers/block_heap_manager.cc View 1 2 3 4 5 3 chunks +21 lines, -9 lines 2 comments Download
M syzygy/agent/asan/heap_managers/block_heap_manager_unittest.cc View 1 2 3 2 chunks +23 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (8 generated)
Sébastien Marchand
PTAL.
4 years ago (2016-11-23 16:28:54 UTC) #3
chrisha
This could still fail, but now for allocations that are bigger than 2GB, no? We ...
4 years ago (2016-11-23 18:27:50 UTC) #4
Sébastien Marchand
Done, PTAnL.
4 years ago (2016-11-23 19:27:11 UTC) #5
chrisha
https://codereview.chromium.org/2527533003/diff/80001/syzygy/agent/asan/heap_managers/block_heap_manager.cc File syzygy/agent/asan/heap_managers/block_heap_manager.cc (right): https://codereview.chromium.org/2527533003/diff/80001/syzygy/agent/asan/heap_managers/block_heap_manager.cc#newcode51 syzygy/agent/asan/heap_managers/block_heap_manager.cc:51: const size_t kMaxAllocSize = 0x8000000; This should be part ...
4 years ago (2016-11-23 19:37:17 UTC) #6
Sébastien Marchand
PTAL. https://codereview.chromium.org/2527533003/diff/80001/syzygy/agent/asan/heap_managers/block_heap_manager.cc File syzygy/agent/asan/heap_managers/block_heap_manager.cc (right): https://codereview.chromium.org/2527533003/diff/80001/syzygy/agent/asan/heap_managers/block_heap_manager.cc#newcode51 syzygy/agent/asan/heap_managers/block_heap_manager.cc:51: const size_t kMaxAllocSize = 0x8000000; On 2016/11/23 19:37:17, ...
4 years ago (2016-11-23 22:36:01 UTC) #9
chrisha
https://codereview.chromium.org/2527533003/diff/80001/syzygy/agent/asan/heap_managers/block_heap_manager.cc File syzygy/agent/asan/heap_managers/block_heap_manager.cc (right): https://codereview.chromium.org/2527533003/diff/80001/syzygy/agent/asan/heap_managers/block_heap_manager.cc#newcode51 syzygy/agent/asan/heap_managers/block_heap_manager.cc:51: const size_t kMaxAllocSize = 0x8000000; On 2016/11/23 22:36:01, Sébastien ...
4 years ago (2016-11-24 17:23:23 UTC) #10
Sébastien Marchand
Thanks, PTAnL https://codereview.chromium.org/2527533003/diff/80001/syzygy/agent/asan/heap_managers/block_heap_manager.cc File syzygy/agent/asan/heap_managers/block_heap_manager.cc (right): https://codereview.chromium.org/2527533003/diff/80001/syzygy/agent/asan/heap_managers/block_heap_manager.cc#newcode238 syzygy/agent/asan/heap_managers/block_heap_manager.cc:238: On 2016/11/24 17:23:22, chrisha (slow) wrote: > ...
4 years ago (2016-11-25 02:38:21 UTC) #11
chrisha
Awesome, lgtm!
4 years ago (2016-11-25 16:14:59 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2527533003/180001
4 years ago (2016-11-25 16:16:34 UTC) #14
commit-bot: I haz the power
CQ has no permission to schedule in bucket tryserver.client.syzygy
4 years ago (2016-11-25 16:16:44 UTC) #16
Sébastien Marchand
Committed patchset #7 (id:180001) manually as ea4e050ecd48b344e82433f69c29d149bea89ed0.
4 years ago (2016-11-25 16:31:13 UTC) #18
Sigurður Ásgeirsson
https://codereview.chromium.org/2527533003/diff/180001/syzygy/agent/asan/heap_managers/block_heap_manager.cc File syzygy/agent/asan/heap_managers/block_heap_manager.cc (right): https://codereview.chromium.org/2527533003/diff/180001/syzygy/agent/asan/heap_managers/block_heap_manager.cc#newcode239 syzygy/agent/asan/heap_managers/block_heap_manager.cc:239: // The allocation might fail because its size exceed ...
4 years ago (2016-11-25 18:16:12 UTC) #20
Sébastien Marchand
4 years ago (2016-11-25 21:14:57 UTC) #21
Message was sent while issue was closed.
https://codereview.chromium.org/2527533003/diff/180001/syzygy/agent/asan/heap...
File syzygy/agent/asan/heap_managers/block_heap_manager.cc (right):

https://codereview.chromium.org/2527533003/diff/180001/syzygy/agent/asan/heap...
syzygy/agent/asan/heap_managers/block_heap_manager.cc:239: // The allocation
might fail because its size exceed the maximum size that
On 2016/11/25 18:16:11, Sigurður Ásgeirsson wrote:
> It would IMHO make much more sense, and be much simpler and easier to maintain
> correctness, if we outright reject allocations that are too large. I guarantee
> that there's no code in Chrome that requires the ability to allocate >1Gb in a
> chunk, though there will be code that makes that attempt.

I'm not sure, we had some CF test cases who allocate some really large buffers,
and I don't think that this is an issue? We shouldn't crash for these, we could
return nullptr but we've always to try to mimic Chrome as much as we can in this
kind of edge cases, and in this case Chrome doesn't cap the allocation size, so
I'm not sure that we should do it either (not instrumenting this allocation is a
different thing).

Powered by Google App Engine
This is Rietveld 408576698