Expose the max size of returnable memory view by v8 |
||
Issue descriptionv8 uses smi::kMaxValue to decide what is the largest view of memory that can be returned to the user. This is arch dependent. In Blink, we are using 2^32 as the maximum object size for ImageData, etc. which is fine for x64 but crashes the renderer on x86 if the object size is larger than 1GB. This is happening because v8::smi::kMaxValue is 2^30 on 32 bit architecture. We need to have access to the max size of returnable memory by V8 to avoid allocating the memory in first place if it cannot be returned to the user. This bug priority is set to 1 as it is blocking another P1 bug.
,
Jul 31 2017
zakerinasab, if you apply https://chromium-review.googlesource.com/c/594677/ to your local copy of V8, does it adequately address your issue?
,
Aug 2 2017
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/19fee8b24b2f1580a92910635e0ca02cbdf615af commit 19fee8b24b2f1580a92910635e0ca02cbdf615af Author: Jeremy Roman <jbroman@chromium.org> Date: Wed Aug 02 22:15:57 2017 Expose v8::TypedArray::kMaxLength. There is an API check failure if values larger than i::Smi::kMaxValue are provided, but it is inconvenient for API users to know what this value is (and SIZE_MAX and INT_MAX are both incorrect). This is analogous to v8::String::kMaxLength. Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Bug: chromium:750788 Change-Id: Ic3e0da62aeacfeb996122595232aa0ea8744517e Reviewed-on: https://chromium-review.googlesource.com/594677 Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Jeremy Roman <jbroman@chromium.org> Cr-Commit-Position: refs/heads/master@{#47099} [modify] https://crrev.com/19fee8b24b2f1580a92910635e0ca02cbdf615af/include/v8.h [modify] https://crrev.com/19fee8b24b2f1580a92910635e0ca02cbdf615af/src/api.cc
,
Aug 2 2017
Fixed. Will become available with the next V8 roll. |
||
►
Sign in to add a comment |
||
Comment 1 by jbroman@chromium.org
, Jul 31 2017