-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwamr.patch
48 lines (42 loc) · 1.48 KB
/
wamr.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--- /core/iwasm/interpreter/wasm_interp_fast.c.orig
+++ /core/iwasm/interpreter/wasm_interp_fast.c
@@ -3981,10 +3981,10 @@
RECORD_STACK_USAGE(exec_env, (uint8 *)&prev_frame);
-#if !(defined(OS_ENABLE_HW_BOUND_CHECK) \
+#if (defined(OS_ENABLE_HW_BOUND_CHECK) \
&& WASM_DISABLE_STACK_HW_BOUND_CHECK == 0)
if ((uint8 *)&prev_frame < exec_env->native_stack_boundary) {
wasm_set_exception((WASMModuleInstance *)exec_env->module_inst,
"native stack overflow");
return;
}
#endif
--- /core/shared/platform/common/posix/posix_memmap.c
+++ /core/shared/platform/common/posix/posix_memmap.c
@@ -76,12 +76,12 @@ os_mmap(void *hint, size_t size, int prot, int flags, os_file_handle file)
if (prot & MMAP_PROT_EXEC)
map_prot |= PROT_EXEC;
-#if defined(BUILD_TARGET_X86_64) || defined(BUILD_TARGET_AMD_64)
-#ifndef __APPLE__
- if (flags & MMAP_MAP_32BIT)
- map_flags |= MAP_32BIT;
-#endif
-#endif
+ // #if defined(BUILD_TARGET_X86_64) || defined(BUILD_TARGET_AMD_64)
+ // #ifndef __APPLE__
+ // if (flags & MMAP_MAP_32BIT)
+ // map_flags |= MAP_32BIT;
+ // #endif
+ // #endif
if (flags & MMAP_MAP_FIXED)
map_flags |= MAP_FIXED;
--- /product-mini/platforms/posix/main.c
+++ /product-mini/platforms/posix/main.c
@@ -14,6 +14,8 @@
#include "bh_read_file.h"
#include "wasm_export.h"
+void *__dso_handle = 0;
+
#if WASM_ENABLE_LIBC_WASI != 0
#include "../common/libc_wasi.c"
#endif