mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-08 00:24:00 +00:00
Exception not thrown!
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I9G8GB Signed-off-by: jiachong <jiachong6@huawei.com> Change-Id: I1badcc30f5f71f3a724cb1a52bd23356c07246de
This commit is contained in:
parent
05e9c703ec
commit
d476d2c4f6
@ -339,6 +339,7 @@ JSTaggedValue BuiltinsFunction::FunctionPrototypeToString(EcmaRuntimeCallInfo *a
|
||||
if (method->IsNativeWithCallField()) {
|
||||
JSHandle<JSTaggedValue> nameKey = thread->GlobalConstants()->GetHandledNameString();
|
||||
JSHandle<EcmaString> methodName(JSObject::GetProperty(thread, thisValue, nameKey).GetValue());
|
||||
RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread);
|
||||
std::string nameStr = EcmaStringAccessor(methodName).ToStdString();
|
||||
std::string startStr = "function ";
|
||||
std::string endStr = "() { [native code] }";
|
||||
|
@ -13,3 +13,4 @@
|
||||
|
||||
stack overflow!
|
||||
15000
|
||||
stack overflow success
|
||||
|
@ -36,4 +36,26 @@ try {
|
||||
if ((e instanceof RangeError)) {
|
||||
print("stack overflow!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function runNearStackLimit(f) {
|
||||
function t() {
|
||||
try {
|
||||
t();
|
||||
} catch (e) {
|
||||
f();
|
||||
}
|
||||
};
|
||||
try {
|
||||
t();
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
const v3 = new Proxy(Boolean, []);
|
||||
const v4 = v3.bind();
|
||||
function f5(a6, a7) {
|
||||
4294967296n + v4;
|
||||
return runNearStackLimit(f5);
|
||||
}
|
||||
f5();
|
||||
print("stack overflow success");
|
Loading…
Reference in New Issue
Block a user