You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by ms...@apache.org on 2021/11/17 00:48:40 UTC

[incubator-teaclave] branch master updated: [WAMR] check init return values (#573)

This is an automated email from the ASF dual-hosted git repository.

mssun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave.git


The following commit(s) were added to refs/heads/master by this push:
     new 492e3dd  [WAMR] check init return values (#573)
492e3dd is described below

commit 492e3dd6d7c2357b6c05388c0b7b678613062123
Author: Qinkun Bao <qi...@gmail.com>
AuthorDate: Tue Nov 16 16:48:36 2021 -0800

    [WAMR] check init return values (#573)
---
 executor/src/wamr.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/executor/src/wamr.rs b/executor/src/wamr.rs
index f934733..e9f8d1d 100644
--- a/executor/src/wamr.rs
+++ b/executor/src/wamr.rs
@@ -115,10 +115,10 @@ impl TeaclaveExecutor for WAMicroRuntime {
 
         set_thread_context(Context::new(runtime))?;
 
-        unsafe { wasm_runtime_init() };
+        let ret = unsafe { wasm_runtime_init() };
+        assert!(ret != false);
 
         // export native function
-
         let export_symbols: [NativeSymbol; 5] = [
             NativeSymbol {
                 symbol: b"teaclave_open_input\0".as_ptr() as _,

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org