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

Issue 1096063002: Fix array allocation overflow check on arm/arm64/mips. (Closed)

Created:
5 years, 8 months ago by koda
Modified:
5 years, 8 months ago
Reviewers:
zra, regis, Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org, zra
Visibility:
Public.

Description

Fix array allocation overflow check on arm/arm64/mips. When adding an object size in bytes to the allocation top address, we must check for *unsigned* overflow, not signed overflow. 32-bit example: if top is 0xfffff000 and size is 0x1008, then top + size is an unsigned, but not a signed, overflow. Add similar unit test for typed data (same issue). BUG=23254 R=regis@google.com Committed: https://code.google.com/p/dart/source/detail?r=45354

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 11

Patch Set 7 : #

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -23 lines) Patch
M runtime/tests/vm/vm.status View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M runtime/vm/assembler_arm.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -3 lines 0 comments Download
M runtime/vm/assembler_arm64.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -3 lines 0 comments Download
M runtime/vm/assembler_mips.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M runtime/vm/intrinsifier_arm.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -3 lines 0 comments Download
M runtime/vm/intrinsifier_arm64.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -3 lines 0 comments Download
M runtime/vm/intrinsifier_mips.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -4 lines 0 comments Download
M runtime/vm/object_test.cc View 1 2 3 4 5 6 7 1 chunk +54 lines, -0 lines 0 comments Download
M runtime/vm/stub_code_arm.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/stub_code_arm64.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M runtime/vm/stub_code_mips.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (2 generated)
koda
5 years, 8 months ago (2015-04-21 02:35:18 UTC) #1
koda
Note: Whether we hit this issue depends highly on where the new space section of ...
5 years, 8 months ago (2015-04-21 13:41:20 UTC) #3
zra
https://codereview.chromium.org/1096063002/diff/100001/runtime/vm/assembler_arm.cc File runtime/vm/assembler_arm.cc (right): https://codereview.chromium.org/1096063002/diff/100001/runtime/vm/assembler_arm.cc#newcode3391 runtime/vm/assembler_arm.cc:3391: AddImmediate(instance_reg, instance_size); Assembler::AddImmediateSetFlags(instance_reg, instance_reg, instance_size); Why is this TODO? ...
5 years, 8 months ago (2015-04-21 14:55:27 UTC) #5
koda
Fixed setting of flags. Thanks, Zach. This further shows that test coverage is still lacking. ...
5 years, 8 months ago (2015-04-21 16:08:46 UTC) #6
regis
lgtm I'll have another look once you upload you next version. Note that it may ...
5 years, 8 months ago (2015-04-21 17:10:30 UTC) #7
koda
Actually, I've changed my mind back. I think we should instead have a system-wide guarantee ...
5 years, 8 months ago (2015-04-21 20:47:34 UTC) #8
regis
lgtm in case you want to submit as-is for now, since you fix some bugs. ...
5 years, 8 months ago (2015-04-22 00:54:18 UTC) #9
regis
On 2015/04/21 17:10:30, regis wrote: > lgtm > > I'll have another look once you ...
5 years, 8 months ago (2015-04-22 01:06:49 UTC) #10
koda
5 years, 8 months ago (2015-04-22 18:32:51 UTC) #11
Message was sent while issue was closed.
Committed patchset #8 (id:140001) manually as r45354 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698