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

Issue 2657173002: Disallow sequences with lengths exceeding max allocation supported. (Closed)

Created:
3 years, 10 months ago by sof
Modified:
3 years, 10 months ago
CC:
chromium-reviews, oilpan-reviews, Mads Ager (chromium), blink-reviews-bindings_chromium.org, blink-reviews, kinuko+watch, kouhei+heap_chromium.org, blink-reviews-wtf_chromium.org, Mikhail
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Disallow sequences with lengths exceeding max allocation supported. Vector backing stores are limited in size by the maximum allowed by their allocator. When converting incoming IDL sequence types into native arrays, check if the requested size exceed that max limit and throw a TypeError(), if needed. Only pathological inputs will run up against this limit and exception. R= BUG=682910 Review-Url: https://codereview.chromium.org/2657173002 Cr-Commit-Position: refs/heads/master@{#447466} Committed: https://chromium.googlesource.com/chromium/src/+/4da5a6bc55b8e3909b98f3e0f23d7c5d0cb9ecb8

Patch Set 1 #

Patch Set 2 : add expected output #

Total comments: 7

Patch Set 3 : switch to RangeError #

Patch Set 4 : re-add expected output #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -15 lines) Patch
A third_party/WebKit/LayoutTests/fast/events/message-event-max-ports.html View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/events/message-event-max-ports-expected.txt View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8Binding.h View 1 2 9 chunks +36 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/HeapAllocator.h View 1 chunk +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/wtf/Vector.h View 1 2 2 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/allocator/PartitionAllocator.h View 1 2 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 31 (20 generated)
sof
please take a look.
3 years, 10 months ago (2017-01-27 10:06:09 UTC) #5
haraken
+junov, who had been working on implementing a similar issue: https://codereview.chromium.org/1414553002/ I'm actually not sure ...
3 years, 10 months ago (2017-01-27 10:46:06 UTC) #7
sof
On 2017/01/27 10:46:06, haraken wrote: > +junov, who had been working on implementing a similar ...
3 years, 10 months ago (2017-01-27 11:25:09 UTC) #8
sof
https://codereview.chromium.org/2657173002/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8Binding.h File third_party/WebKit/Source/bindings/core/v8/V8Binding.h (right): https://codereview.chromium.org/2657173002/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8Binding.h#newcode666 third_party/WebKit/Source/bindings/core/v8/V8Binding.h:666: exceptionState.throwTypeError("Array length exceeds supported limit."); Throwing RangeError is an ...
3 years, 10 months ago (2017-01-27 14:05:33 UTC) #11
sof
For reference/context, the limit being imposed here on sequence lengths is 2^24 (64-bit target) when ...
3 years, 10 months ago (2017-01-28 08:00:33 UTC) #12
Yuta Kitamura
lgtm wtf/ LGTM. https://codereview.chromium.org/2657173002/diff/20001/third_party/WebKit/Source/wtf/Vector.h File third_party/WebKit/Source/wtf/Vector.h (right): https://codereview.chromium.org/2657173002/diff/20001/third_party/WebKit/Source/wtf/Vector.h#newcode338 third_party/WebKit/Source/wtf/Vector.h:338: DCHECK(newCapacity <= nit+optional: Use DCHECK_LE? https://codereview.chromium.org/2657173002/diff/20001/third_party/WebKit/Source/wtf/allocator/PartitionAllocator.h ...
3 years, 10 months ago (2017-01-30 07:19:42 UTC) #14
Justin Novosad
https://codereview.chromium.org/2657173002/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8Binding.h File third_party/WebKit/Source/bindings/core/v8/V8Binding.h (right): https://codereview.chromium.org/2657173002/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8Binding.h#newcode666 third_party/WebKit/Source/bindings/core/v8/V8Binding.h:666: exceptionState.throwTypeError("Array length exceeds supported limit."); On 2017/01/27 14:05:33, sof ...
3 years, 10 months ago (2017-01-30 23:10:48 UTC) #15
sof
https://codereview.chromium.org/2657173002/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8Binding.h File third_party/WebKit/Source/bindings/core/v8/V8Binding.h (right): https://codereview.chromium.org/2657173002/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8Binding.h#newcode666 third_party/WebKit/Source/bindings/core/v8/V8Binding.h:666: exceptionState.throwTypeError("Array length exceeds supported limit."); On 2017/01/30 23:10:48, Justin ...
3 years, 10 months ago (2017-01-31 21:01:43 UTC) #22
haraken
LGTM
3 years, 10 months ago (2017-02-01 04:00:23 UTC) #25
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/2657173002/60001
3 years, 10 months ago (2017-02-01 07:10:22 UTC) #28
commit-bot: I haz the power
3 years, 10 months ago (2017-02-01 07:15:14 UTC) #31
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/4da5a6bc55b8e3909b98f3e0f23d...

Powered by Google App Engine
This is Rietveld 408576698