Răsfoiți Sursa

address comments

Georgii Rylov 10 luni în urmă
părinte
comite
bc00b3e492
2 a modificat fișierele cu 5 adăugiri și 1 ștergeri
  1. 1 1
      core/iwasm/aot/aot_runtime.c
  2. 4 0
      core/iwasm/common/wasm_runtime_common.c

+ 1 - 1
core/iwasm/aot/aot_runtime.c

@@ -10,7 +10,6 @@
 #include "../common/wasm_runtime_common.h"
 #include "../common/wasm_memory.h"
 #include "../interpreter/wasm_runtime.h"
-#include <string.h>
 #if WASM_ENABLE_SHARED_MEMORY != 0
 #include "../common/wasm_shared_memory.h"
 #endif
@@ -4201,6 +4200,7 @@ aot_copy_callstack_standard_frame(WASMExecEnv *exec_env, wasm_frame_t *buffer,
         cur_frame = cur_frame->prev_frame;
         ++count;
     }
+    return count;
 #else
 /*
  * TODO: add support for standard frames when GC is enabled

+ 4 - 0
core/iwasm/common/wasm_runtime_common.c

@@ -1773,6 +1773,10 @@ wasm_copy_callstack(const wasm_exec_env_t exec_env, wasm_frame_t *buffer,
     }
 #endif
 #endif
+    char *err_msg =
+            "No copy_callstack API was actually executed";
+    strncpy(error_buf, err_msg, error_buf_size);
+    return 0;
 }
 #endif // WAMR_ENABLE_COPY_CALLSTACK