mirror of
https://gitee.com/openharmony/arkcompiler_runtime_core
synced 2025-04-08 21:48:27 +00:00

Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/I5G96F Test: Test262 suit, ark unittest, rk3568 XTS, ark previewer demo Signed-off-by: huangyu <huangyu76@huawei.com> Change-Id: I3f63d129a07deaa27a390f556dcaa5651c098185
61 lines
1.8 KiB
Plaintext
61 lines
1.8 KiB
Plaintext
# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
#! CHECKER Stack overflow
|
|
#! RUN force_jit: true, options: "--compiler-regex _GLOBAL::__noinline__inc_recursive", entry: "_GLOBAL::main", result: 0
|
|
#! EVENT /Compilation,_GLOBAL::__noinline__inc_recursive,.*,COMPILED/
|
|
|
|
#.language Java
|
|
|
|
#.record java.lang.StackOverflowError <external>
|
|
.record panda.StackOverflowException <external>
|
|
|
|
.function i32 __noinline__inc_recursive(i32 a0) {
|
|
inci a0, 1
|
|
call.short __noinline__inc_recursive, a0
|
|
return
|
|
}
|
|
|
|
.function i32 main() {
|
|
|
|
try_begin:
|
|
movi v0, 0
|
|
call.short __noinline__inc_recursive, v0
|
|
ldai 1
|
|
return
|
|
try_end:
|
|
|
|
catch_all_begin:
|
|
|
|
ldai 1
|
|
return
|
|
|
|
catch_stackoverflow_begin:
|
|
ldai 0
|
|
return
|
|
|
|
.catch panda.StackOverflowException, try_begin, try_end, catch_stackoverflow_begin
|
|
.catchall try_begin, try_end, catch_all_begin
|
|
}
|
|
|
|
#! CHECKER Stack overflow unhandled
|
|
#! RUN force_jit: true, options: "--compiler-regex _GLOBAL::__noinline__inc_recursive", entry: "_GLOBAL::main_no_catch", result: 1
|
|
#! EVENT /Compilation,_GLOBAL::__noinline__inc_recursive,.*,COMPILED/
|
|
|
|
.function i32 main_no_catch() {
|
|
movi v0, 0
|
|
call.short __noinline__inc_recursive, v0
|
|
ldai 0
|
|
return
|
|
}
|