v8/test/mjsunit/regress/asm/regress-1252747.js
Clemens Backes 44b68bc2ca [wasm] Add regression test for 1252747
R=manoskouk@chromium.org

Bug: chromium:1252747
Change-Id: I337d5e26015f5af8c76caebb962093d1dad42952
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3190095
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77115}
2021-09-28 13:03:14 +00:00

28 lines
525 B
JavaScript

// Copyright 2021 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
function print_stack(unsigned) {
print('stack:');
print((new Error()).stack);
}
function asm(global, env) {
'use asm';
var print_stack = env.print_stack;
function main() {
var count = 0;
while ((count | 0) < 10) {
print_stack(1);
count = count + 1 | 0;
}
}
return main;
}
asm({}, {'print_stack': print_stack})();