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

Issue 3003023002: Avoid triggering an ASSERT in TypedData (Closed)

Created:
3 years, 4 months ago by Kevin Millikin (Google)
Modified:
3 years, 4 months ago
Reviewers:
aam, siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Avoid triggering an ASSERT in TypedData When a zero-sized string occurs as that last string in the Kernel string table, the code would attempt to compute the address that lies one element past the end of the string table's backing store. Though this is benign in C++ as long as that address is not dereferenced, it would trigger an assertion failure in TypedData::DataAddr. Avoid triggering the assertion by performing the address arithmetic in the caller based on DataAddr(0) rather than relying on the address arithmetic in DataAddr. This fixes issue 30420. BUG=https://github.com/dart-lang/sdk/issues/30420 R=aam@google.com, asiva@google.com Committed: https://github.com/dart-lang/sdk/commit/b38c00a341dee90f1d2e49c73d455e4d167370a0

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -8 lines) Patch
M runtime/tests/vm/vm.status View 1 chunk +0 lines, -1 line 0 comments Download
M runtime/vm/kernel_to_il.h View 1 chunk +6 lines, -0 lines 0 comments Download
M runtime/vm/kernel_to_il.cc View 4 chunks +20 lines, -7 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Kevin Millikin (Google)
The assertion in question is ASSERT((byte_offset == 0) || ((byte_offset > 0) && (byte_offset < ...
3 years, 4 months ago (2017-08-21 11:40:20 UTC) #1
Kevin Millikin (Google)
3 years, 4 months ago (2017-08-21 11:40:42 UTC) #3
aam
lgtm, thanks!
3 years, 4 months ago (2017-08-21 14:23:18 UTC) #4
siva
lgtm
3 years, 4 months ago (2017-08-21 15:36:12 UTC) #5
Kevin Millikin (Google)
3 years, 4 months ago (2017-08-22 07:27:30 UTC) #7
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
b38c00a341dee90f1d2e49c73d455e4d167370a0 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698