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

Side by Side Diff: test/mjsunit/wasm/stack.js

Issue 2609363004: [asm.js] [wasm] Store function start position for stack check (Closed)
Patch Set: It's 2017 already :) Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/mjsunit/wasm/asm-wasm-stack.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // clang-format off 5 // clang-format off
6 // Flags: --expose-wasm 6 // Flags: --expose-wasm
7 7
8 load("test/mjsunit/wasm/wasm-constants.js"); 8 load("test/mjsunit/wasm/wasm-constants.js");
9 load("test/mjsunit/wasm/wasm-module-builder.js"); 9 load("test/mjsunit/wasm/wasm-module-builder.js");
10 10
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 kExprCallIndirect, sig_index, kTableZero 138 kExprCallIndirect, sig_index, kTableZero
139 ]) 139 ])
140 .exportFunc() 140 .exportFunc()
141 builder.appendToTable([0]); 141 builder.appendToTable([0]);
142 142
143 try { 143 try {
144 builder.instantiate().exports.recursion(); 144 builder.instantiate().exports.recursion();
145 fail("expected wasm exception"); 145 fail("expected wasm exception");
146 } catch (e) { 146 } catch (e) {
147 assertEquals("Maximum call stack size exceeded", e.message, "trap reason"); 147 assertEquals("Maximum call stack size exceeded", e.message, "trap reason");
148 assertTrue(e.stack.length >= 4, "expected at least 4 stack entries");
149 verifyStack(e.stack.splice(0, 4), [
150 // isWasm function line pos file
151 [ true, "recursion", 0, 0, null],
152 [ true, "recursion", 0, 3, null],
153 [ true, "recursion", 0, 3, null],
154 [ true, "recursion", 0, 3, null]
155 ]);
148 } 156 }
149 })(); 157 })();
OLDNEW
« no previous file with comments | « test/mjsunit/wasm/asm-wasm-stack.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698