|
|
Description[wasm] Update WasmMemoryObject correctly when module memory is exported.
BUG=chromium:670683
R=titzer@chromium.org
Committed: https://crrev.com/0061089aa01d031c91373477dab422a35fb1d5fc
Cr-Commit-Position: refs/heads/master@{#41603}
Patch Set 1 #Patch Set 2 : Add export-grow test in import-memory.js #
Total comments: 3
Patch Set 3 : Fix bot failures #Patch Set 4 : Format #
Total comments: 2
Patch Set 5 : Eric's review #Patch Set 6 : Remove incorrect fix #Patch Set 7 : Rebase #
Messages
Total messages: 55 (41 generated)
The CQ bit was checked by gdeepti@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by gdeepti@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
gdeepti@chromium.org changed reviewers: + bradnelson@chromium.org, titzer@chromium.org - titzer@cheomium.org
Description was changed from ========== [wasm] Instance memory object should not be set when memory is exported. BUG=chromium:670683 R=titzer@cheomium.org ========== to ========== [wasm] Instance memory object should not be set when memory is exported. BUG=chromium:670683 R=titzer@chromium.org ==========
Description was changed from ========== [wasm] Instance memory object should not be set when memory is exported. BUG=chromium:670683 R=titzer@cheomium.org ========== to ========== [wasm] Instance memory object should not be set when memory is exported. BUG=chromium:670683 R=titzer@chromium.org ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: v8_linux64_gyp_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_gyp_rel_ng/build...) v8_linux64_gyp_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_gyp_rel_ng_trigg...)
https://codereview.chromium.org/2548223002/diff/20001/test/mjsunit/wasm/impor... File test/mjsunit/wasm/import-memory.js (right): https://codereview.chromium.org/2548223002/diff/20001/test/mjsunit/wasm/impor... test/mjsunit/wasm/import-memory.js:384: assertEquals(kPageSize, instance.exports.exported_mem.buffer.byteLength); As per my understanding, this should be the correct behavior when memory is exported as exports are returned at instantiation time. Ben, could you confirm? Fails when guard pages are enabled, debugging bot failures.
The CQ bit was checked by gdeepti@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by gdeepti@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== [wasm] Instance memory object should not be set when memory is exported. BUG=chromium:670683 R=titzer@chromium.org ========== to ========== [wasm] Instance memory object should not be set when memory is exported. - Exports are returned at instantiate, new memory object created when exports are processed should not be set on the instance object. - Use a different buffer for creating an exported memory object when guard pages are enabled, so exported memory object does not have a handle to instance memory. BUG=chromium:670683 R=titzer@chromium.org ==========
gdeepti@chromium.org changed reviewers: + eholk@chromium.org - bradnelson@chromium.org
https://codereview.chromium.org/2548223002/diff/20001/test/mjsunit/wasm/impor... File test/mjsunit/wasm/import-memory.js (right): https://codereview.chromium.org/2548223002/diff/20001/test/mjsunit/wasm/impor... test/mjsunit/wasm/import-memory.js:384: assertEquals(kPageSize, instance.exports.exported_mem.buffer.byteLength); On 2016/12/04 17:48:37, gdeepti wrote: > As per my understanding, this should be the correct behavior when memory is > exported as exports are returned at instantiation time. Ben, could you confirm? > Fails when guard pages are enabled, debugging bot failures. Yes, that's right.
https://codereview.chromium.org/2548223002/diff/20001/test/mjsunit/wasm/impor... File test/mjsunit/wasm/import-memory.js (right): https://codereview.chromium.org/2548223002/diff/20001/test/mjsunit/wasm/impor... test/mjsunit/wasm/import-memory.js:384: assertEquals(kPageSize, instance.exports.exported_mem.buffer.byteLength); On 2016/12/05 09:40:54, titzer wrote: > On 2016/12/04 17:48:37, gdeepti wrote: > > As per my understanding, this should be the correct behavior when memory is > > exported as exports are returned at instantiation time. Ben, could you > confirm? > > Fails when guard pages are enabled, debugging bot failures. > > Yes, that's right. Thanks! Bot failures fixed with latest patch.
https://codereview.chromium.org/2548223002/diff/60001/src/wasm/wasm-module.cc File src/wasm/wasm-module.cc (right): https://codereview.chromium.org/2548223002/diff/60001/src/wasm/wasm-module.cc... src/wasm/wasm-module.cc:1794: if (!buffer.is_null() && buffer->has_guard_region()) { We talked about this offline, but I'm summarizing here. It's probably best to do this branch using wasm::NewArrayBuffer. To match the old behavior, I think the right thing to do is to copy the old buffer into a newly allocated buffer. Otherwise we'll end up with inconsistencies where once the buffer grows sometimes it looks like the old size and sometimes it looks like the new size.
The CQ bit was checked by gdeepti@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #5 (id:80001) has been deleted
Dry run: Try jobs failed on following builders: v8_win_nosnap_shared_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win_nosnap_shared_rel_ng...) v8_win_nosnap_shared_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win_nosnap_shared_rel_ng...)
The CQ bit was checked by gdeepti@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: v8_linux64_gyp_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_gyp_rel_ng/build...) v8_linux64_gyp_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_gyp_rel_ng_trigg...)
The CQ bit was checked by gdeepti@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== [wasm] Instance memory object should not be set when memory is exported. - Exports are returned at instantiate, new memory object created when exports are processed should not be set on the instance object. - Use a different buffer for creating an exported memory object when guard pages are enabled, so exported memory object does not have a handle to instance memory. BUG=chromium:670683 R=titzer@chromium.org ========== to ========== [wasm] Update WasmMemoryObject correctly when memory is exported. BUG=chromium:670683 R=titzer@chromium.org ==========
Description was changed from ========== [wasm] Update WasmMemoryObject correctly when memory is exported. BUG=chromium:670683 R=titzer@chromium.org ========== to ========== [wasm] Update WasmMemoryObject correctly when module memory is exported. BUG=chromium:670683 R=titzer@chromium.org ==========
PTAL Previous fix was incorrect, fixed now. Updated issue subject, test. https://codereview.chromium.org/2548223002/diff/60001/src/wasm/wasm-module.cc File src/wasm/wasm-module.cc (right): https://codereview.chromium.org/2548223002/diff/60001/src/wasm/wasm-module.cc... src/wasm/wasm-module.cc:1794: if (!buffer.is_null() && buffer->has_guard_region()) { On 2016/12/05 19:54:52, Eric Holk wrote: > We talked about this offline, but I'm summarizing here. > > It's probably best to do this branch using wasm::NewArrayBuffer. To match the > old behavior, I think the right thing to do is to copy the old buffer into a > newly allocated buffer. Otherwise we'll end up with inconsistencies where once > the buffer grows sometimes it looks like the old size and sometimes it looks > like the new size. Summarizing offline discussions, previous interpretation of the spec was incorrect, exported memory objects reference instance memory, and should reflect new size when grow_memory is called. Removed this block of code.
lgtm from my standpoint.
The CQ bit was checked by gdeepti@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Ping Brad/Ben for owners review.
On 2016/12/08 07:38:29, gdeepti wrote: > Ping Brad/Ben for owners review. Ping++ as chromium:671783, chromium:671761 and the issue referenced above are because of the same root cause.
bradnelson@chromium.org changed reviewers: + bradnelson@chromium.org
The CQ bit was checked by bradnelson@chromium.org
lgtm
The patchset sent to the CQ was uploaded after l-g-t-m from eholk@chromium.org Link to the patchset: https://codereview.chromium.org/2548223002/#ps140001 (title: "Rebase")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 140001, "attempt_start_ts": 1481228891845380, "parent_rev": "6b65acbbbe762f4a1cd77461a114aa17bb701768", "commit_rev": "41ade8087df12be76155a17c8b4cba8f1574f38d"}
Message was sent while issue was closed.
Description was changed from ========== [wasm] Update WasmMemoryObject correctly when module memory is exported. BUG=chromium:670683 R=titzer@chromium.org ========== to ========== [wasm] Update WasmMemoryObject correctly when module memory is exported. BUG=chromium:670683 R=titzer@chromium.org ==========
Message was sent while issue was closed.
Committed patchset #7 (id:140001)
Message was sent while issue was closed.
Description was changed from ========== [wasm] Update WasmMemoryObject correctly when module memory is exported. BUG=chromium:670683 R=titzer@chromium.org ========== to ========== [wasm] Update WasmMemoryObject correctly when module memory is exported. BUG=chromium:670683 R=titzer@chromium.org Committed: https://crrev.com/0061089aa01d031c91373477dab422a35fb1d5fc Cr-Commit-Position: refs/heads/master@{#41603} ==========
Message was sent while issue was closed.
Patchset 7 (id:??) landed as https://crrev.com/0061089aa01d031c91373477dab422a35fb1d5fc Cr-Commit-Position: refs/heads/master@{#41603} |