Fix sgx platform issues (#916)

Fix ocall_poll incorrectly defined issue in which poll_fds should be defined as [in, out]
Fix is_xip_file incorrectly check issue
This commit is contained in:
Wenyong Huang
2021-12-28 08:41:43 +08:00
committed by GitHub
parent 89a1c8220d
commit 635084c9b2
2 changed files with 2 additions and 5 deletions

View File

@ -229,14 +229,11 @@ handle_cmd_load_module(uint64 *args, uint32 argc)
enclave_module->wasm_file = (uint8 *)enclave_module + sizeof(EnclaveModule);
bh_memcpy_s(enclave_module->wasm_file, wasm_file_size, wasm_file,
wasm_file_size);
if (is_xip_file) {
enclave_module->is_xip_file = true;
}
if (!(enclave_module->module =
wasm_runtime_load(enclave_module->wasm_file, wasm_file_size,
error_buf, error_buf_size))) {
if (!is_xip_file)
if (!enclave_module->is_xip_file)
wasm_runtime_free(enclave_module);
else
os_munmap(enclave_module, (uint32)total_size);