Bug fix: pr8053 ark_js_vm crash

Fixed a bug causing ark_js_vm crash on phone
In js_runtime_options.h, new options in enum CommandValues should be added at the bottom and the assertiong should not be modified

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/IAE2EG?from=project-issue

Signed-off-by: xing-yunhao <xingyunhao1@huawei.com>
Change-Id: I3ca8e5d42bf991b32ee06413c67ca4ab069da30a
This commit is contained in:
xing-yunhao 2024-07-19 09:54:58 +08:00
parent 5933423ff3
commit 446ed412ef
2 changed files with 3 additions and 2 deletions

View File

@ -78,6 +78,7 @@ std::unordered_set<std::string> AotArgsSet {
"compiler-opt-value-numbering",
"compiler-opt-new-value-numbering",
"compiler-opt-inlining",
"compiler-try-catch-function",
"compiler-opt-pgotype",
"compiler-opt-track-field",
"entry-point",

View File

@ -127,7 +127,6 @@ enum CommandValues {
OPTION_COMPILER_OPT_STRING,
OPTION_COMPILER_OPT_VALUE_NUMBERING,
OPTION_COMPILER_OPT_INLINING,
OPTION_COMPILER_TRY_CATCH_FUNCTION,
OPTION_COMPILER_OPT_PGOTYPE,
OPTION_COMPILER_OPT_TRACK_FIELD,
OPTION_COMPILER_PGO_PROFILER_PATH,
@ -198,8 +197,9 @@ enum CommandValues {
OPTION_COMPILER_BASELINE_PGO,
OPTION_ASYNC_LOAD_ABC,
OPTION_PGO_TRACE,
OPTION_COMPILER_TRY_CATCH_FUNCTION,
};
static_assert(OPTION_SPLIT_ONE == 65);
static_assert(OPTION_SPLIT_ONE == 64); // add new option at the bottom, DO NOT modify this value
class PUBLIC_API JSRuntimeOptions {
public: