Update sample workload's scripts to align with latest emcc (#609)
And enable auxiliary stack overflow/underflow check in JIT mode
This commit is contained in:
@ -2458,6 +2458,7 @@ aot_convert_wasm_module(WASMModule *wasm_module,
|
||||
#if WASM_ENABLE_SIMD != 0
|
||||
option.enable_simd = true;
|
||||
#endif
|
||||
option.enable_aux_stack_check = true;
|
||||
#if (WASM_ENABLE_PERF_PROFILING != 0) || (WASM_ENABLE_DUMP_CALL_STACK != 0)
|
||||
option.enable_aux_stack_frame = true;
|
||||
#endif
|
||||
|
||||
@ -508,6 +508,18 @@ emscripten_notify_memory_growth_wrapper(wasm_exec_env_t exec_env, int i)
|
||||
(void)i;
|
||||
}
|
||||
|
||||
static void
|
||||
emscripten_thread_sleep_wrapper(wasm_exec_env_t exec_env, double timeout_ms)
|
||||
{
|
||||
uint64 ms = (uint64)timeout_ms;
|
||||
uint64 sec = ms / 1000, us = (ms % 1000) * 1000;
|
||||
|
||||
if (sec > 0)
|
||||
sleep(sec);
|
||||
if (us > 0)
|
||||
usleep(us);
|
||||
}
|
||||
|
||||
#endif /* end of BH_PLATFORM_LINUX_SGX */
|
||||
|
||||
#define REG_NATIVE_FUNC(func_name, signature) \
|
||||
@ -543,6 +555,7 @@ static NativeSymbol native_symbols_libc_emcc[] = {
|
||||
REG_NATIVE_FUNC(__sys_getcwd, "(*~)i"),
|
||||
REG_NATIVE_FUNC(__sys_uname, "(*)i"),
|
||||
REG_NATIVE_FUNC(emscripten_notify_memory_growth, "(i)"),
|
||||
REG_NATIVE_FUNC(emscripten_thread_sleep, "(F)"),
|
||||
#endif /* end of BH_PLATFORM_LINUX_SGX */
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user