YAMAMOTO Takashi and GitHub
bb5629811f
language-bindings/python/wamr-api: Fix a sample ( #1977 )
2023-02-21 18:36:03 +08:00
YAMAMOTO Takashi and GitHub
d8c333f32c
Fix wamrapi python binding for darwin ( #1978 )
2023-02-21 18:35:15 +08:00
YAMAMOTO Takashi and GitHub
37b09d0f24
Expose wasm_runtime_call_indirect ( #1969 )
...
The function has been there for long. While what it does look a bit unsafe
as it calls a function which may be not wasm-wise exported explicitly, it's
useful and widely used when implementing callback-taking APIs, including
our pthread_create's implementation.
2023-02-20 18:56:55 +08:00
YAMAMOTO Takashi and GitHub
ee1871d3f8
Enable iwasm --max-threads option for wasi-threads as well ( #1939 )
2023-02-07 13:46:41 +08:00
YAMAMOTO Takashi and GitHub
aab875b91f
wamr-compiler: enable wasi-threads ( #1938 )
...
cf. https://github.com/bytecodealliance/wasm-micro-runtime/pull/1893
2023-02-07 12:34:33 +08:00
YAMAMOTO Takashi and GitHub
7d3b2a8773
Make memory profiling show native stack usage ( #1917 )
2023-02-01 11:52:15 +08:00
YAMAMOTO Takashi and GitHub
42f8fed20e
Rename thread_spawn import ( #1907 )
...
Following the wit-defined ABI:
https://github.com/WebAssembly/wasi-threads/pull/26
cf. https://github.com/WebAssembly/wasi-libc/pull/387
2023-01-27 06:45:34 +08:00
YAMAMOTO Takashi and GitHub
5f0f8fe7ee
Relax wasi memory export check when wasi-threads is enabled ( #1893 )
...
https://github.com/WebAssembly/wasi-threads/issues/22
https://github.com/WebAssembly/WASI/issues/502
2023-01-16 20:21:51 +08:00
YAMAMOTO Takashi and GitHub
21ba730de3
Document some info about estimating memory usage ( #1879 )
...
Only covers limited configurations
2023-01-12 19:04:20 +08:00
YAMAMOTO Takashi and GitHub
d04f3988c3
libc-wasi: Fix spurious poll timeout ( #1824 )
...
This reverts the "Fix libc-wasi poll_oneoff hang issue" change.
https://github.com/bytecodealliance/wasm-micro-runtime/pull/1300
2022-12-21 17:29:29 +08:00
YAMAMOTO Takashi and GitHub
822a8a5e66
wasm_native.c: Fix build with certain combinations of options ( #1778 )
...
Fix a regression in https://github.com/bytecodealliance/wasm-micro-runtime/pull/1756
2022-12-02 11:41:40 +08:00
YAMAMOTO Takashi and GitHub
1032aac60b
Add wasm_runtime_get_wasi_exit_code ( #1748 )
...
Refer to https://github.com/bytecodealliance/wasm-micro-runtime/issues/1738
2022-11-24 20:26:18 +08:00
YAMAMOTO Takashi and GitHub
ff4ee4a95f
Add comments around wasm_runtime_set_wasi_args ( #1692 )
2022-11-09 17:18:22 +08:00
YAMAMOTO Takashi and GitHub
825544ddab
samples/native-lib: use the same shared lib name as product-mini ( #1669 )
...
Use the shared lib name `libiwasm` instead of static lib name `vmlib`
2022-11-01 21:55:43 +08:00
YAMAMOTO Takashi and GitHub
960b613d10
samples/native-lib: Add an example to use wamr API from native lib ( #1649 )
...
Real world native libs likely need to access the wasm_runtime_xxx API.
This example demonstrates it.
Build vmlib as a shared lib to make it straightforward to share a
single runtime instance between iwasm and native libs.
2022-10-28 19:31:21 +08:00
YAMAMOTO Takashi and GitHub
77ff7daaf4
Add wasm_runtime_unregister_natives ( #1647 )
...
Allow to unregister (or unload) the previously registered native libs,
so that no need to restart the whole engine by using
`wasm_runtime_destroy/wasm_runtime_init`.
2022-10-28 11:03:39 +08:00
YAMAMOTO Takashi and GitHub
bc58778c34
samples/native-lib: Add a bit more complicated example ( #1643 )
...
Add test_hello sample and update the document
2022-10-27 15:06:14 +08:00
YAMAMOTO Takashi and GitHub
15d645476a
Update the top level CMakeLists.txt a bit ( #1642 )
...
Disable -Wunused-parameter in the top level CMakeLists.txt as this repo
has tons of it. Note: We have this particular warning disabled in
build-scripts/runtime_lib.cmake too.
Bump minimum cmake version for the top level CMakeLists.txt to fix the
following warning on macOS.
```
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets: iwasm_shared
This warning is for project developers. Use -Wno-dev to suppress it.
```
2022-10-27 11:27:34 +08:00
YAMAMOTO Takashi and GitHub
654ac5feca
Use cmake POSITION_INDEPENDENT_CODE instead of hardcoding -pie -fPIE ( #1598 )
...
This fixes unused option warnings on -pie for macOS.
(On macOS cmake produces "-fPIE -Xlinker -pie")
Bump required cmake version to 3.14 for CheckPIESupported.
References:
https://cmake.org/cmake/help/latest/prop_tgt/POSITION_INDEPENDENT_CODE.html
https://cmake.org/cmake/help/latest/module/CheckPIESupported.html#module:CheckPIESupported
2022-10-19 01:51:18 +08:00
YAMAMOTO Takashi and GitHub
6f04f115ab
posix_thread.c: Avoid sem_getvalue deprecation warning on macOS ( #1596 )
2022-10-17 10:18:54 +08:00
YAMAMOTO Takashi and GitHub
9ba8c80850
samples/multi-module: Examine module registration a bit ( #1595 )
2022-10-14 16:37:57 +08:00
YAMAMOTO Takashi and GitHub
00ae8cd614
Remove unused wasm_runtime_is_module_registered ( #1594 )
...
It is unused and the same functionality is provided by
`wasm_runtime_find_module_registered`.
2022-10-14 15:46:30 +08:00
YAMAMOTO Takashi and GitHub
e6c7125851
export_native_api.md: Partially revert "Relax the ground rule" ( #1588 )
...
And add some clarifications
2022-10-13 18:33:06 +08:00
YAMAMOTO Takashi and GitHub
5a93f0d667
wasm_export.h: Add comments on wasm_runtime_register_natives ( #1580 )
2022-10-12 20:06:38 +08:00
YAMAMOTO Takashi and GitHub
1c89a37899
export_native_api.md: Relax the "ground rule" ( #1577 )
...
Nothing wrong with passing structures and function pointers
as far as the native code is aware of and careful about the
ABI used in the wasm module.
2022-10-12 20:04:59 +08:00
YAMAMOTO Takashi and GitHub
1e22d1a9e5
Fix the "register native with iwasm" stuff for macOS ( #1558 )
...
- core/shared/platform/darwin/platform_internal.h: macOS has dlopen
- samples/native-lib/README.md: Mention macOS
2022-10-07 15:17:36 +08:00
YAMAMOTO Takashi and GitHub
3094b20bd8
samples/native-lib: Fix exec_env type ( #1557 )
...
Change `wasm_exec_env_t *exec_env` to `wasm_exec_env_t exec_env`
2022-10-06 20:21:21 +08:00
YAMAMOTO Takashi and GitHub
3d56c8133c
Fix NuttX build error after dev/socket was merged ( #1517 )
2022-09-26 20:06:14 +08:00
YAMAMOTO Takashi and GitHub
aba3707529
build_llvm.sh: enable to pass through arguments ( #1506 )
...
To make it simpler to specify `--project`.
2022-09-20 17:54:50 +08:00
YAMAMOTO Takashi and GitHub
ab3ad535ab
core/iwasm/compilation/debug/dwarf_extractor.cpp: remove dead code ( #1507 )
...
Remove an unused function, dwarf_get_func_info, which is also
seemingly incomplete.
2022-09-20 14:43:29 +08:00
YAMAMOTO Takashi and GitHub
12bbb9189c
source_debugging.md: Add some notes about AOT debug ( #1496 )
2022-09-17 21:01:29 +08:00
YAMAMOTO Takashi and GitHub
f5939c7bc1
Fix AOT debug for macOS ( #1494 )
...
note: macOS doesn't have elf.h
2022-09-16 18:54:04 +08:00
YAMAMOTO Takashi and GitHub
1eedde7c33
Fix several issues related to AOT debug ( #1492 )
2022-09-16 12:06:46 +08:00
YAMAMOTO Takashi and GitHub
0a08b92662
VSCode-Extension: Add empty platform directories ( #1460 )
2022-09-07 14:30:39 +08:00
YAMAMOTO Takashi and GitHub
0ca271873d
debug-engine: Handle wasm_debug_instance_get_current_object_name failure ( #1453 )
...
Use an empty string instead of stack garbage.
2022-09-05 19:45:20 +08:00
YAMAMOTO Takashi and GitHub
ef8c6bd98a
doc/build_wasm_app.md: Update a note about LLVM 13 incompatibility ( #1441 )
...
Remove the workaround as it wasn't so good.
(It can cause the lack of ctor calls)
Mention that it's only about a command.
2022-09-05 11:56:24 +08:00
YAMAMOTO Takashi and GitHub
9f09e2661f
wamr-ide/VSCode-Extension: Make lldb binary path per platform ( #1437 )
...
hopefully this allows an extension package to run on multiple platforms.
cf. https://code.visualstudio.com/api/extension-guides/debugger-extension#anatomy-of-the-package.json-of-a-debugger-extension
2022-09-01 12:33:59 +08:00
YAMAMOTO Takashi and GitHub
47f17ef8f5
wamr-ide/VSCode-Extension: "set -e" in shell scripts ( #1436 )
...
To avoid mysterious behaviors caused by ignored errors.
2022-08-31 17:27:24 +08:00
YAMAMOTO Takashi and GitHub
7e02be836f
nuttx: Add CONFIG_INTERPRETERS_WAMR_DEBUG_INTERP ( #1426 )
...
the corresponding nuttx PR: https://github.com/apache/incubator-nuttx-apps/pull/1299
2022-08-30 18:38:28 +08:00
YAMAMOTO Takashi and GitHub
6b073af3b0
debug-engine: Reduce the default MAX_PACKET_SIZE ( #1425 )
2022-08-30 17:00:32 +08:00
YAMAMOTO Takashi and GitHub
fba12e9969
debug-engine: constify several global variables ( #1427 )
2022-08-30 15:43:47 +08:00
YAMAMOTO Takashi and GitHub
1985a251cd
debug-engine: Use default stack size for control thread ( #1424 )
2022-08-26 21:13:30 +08:00
YAMAMOTO Takashi and GitHub
04c1eb30cf
debug-engine: allocate "tmpbuf" dynamically ( #1423 )
...
Some configurations (eg. esp32/nuttx) have limited space for BSS,
0x20000 byte buffer is huge on embedded systems, change to
allocate the buffer dynamically.
2022-08-26 19:49:57 +08:00
YAMAMOTO Takashi and GitHub
3875c6649a
wasm_runtime_start_debug_instance: Allow to override port ( #1421 )
...
Allow the embedder to manage port number for this purpose by itself.
2022-08-26 16:33:47 +08:00
YAMAMOTO Takashi and GitHub
ee98b583d5
debug-engine: Fix process_port handling ( #1415 )
...
process_port=1 means "use port 1"
2022-08-25 20:03:44 +08:00
YAMAMOTO Takashi and GitHub
7c75f6cf63
wasm_debug_engine_create: Remove unused comment ( #1416 )
2022-08-25 19:29:26 +08:00
YAMAMOTO Takashi and GitHub
ebcbe0b571
wasm_application.c: Do not start debug instance automatically ( #1407 )
...
Leave the control from wasm_application_execute_main to host embedders,
eg. product-mini.
2022-08-24 20:50:26 +08:00
YAMAMOTO Takashi and GitHub
5586f7b82d
source debug: Remove unused platform_port ( #1403 )
2022-08-24 16:39:32 +08:00
YAMAMOTO Takashi and GitHub
d41543f829
cmake: Use CMAKE_BINARY_DIR instead of ${CMAKE_CURRENT_SOURCE_DIR}/build ( #1410 )
2022-08-24 15:57:03 +08:00
YAMAMOTO Takashi and GitHub
f5283399ec
debug: Retire wasm_debug_(get|set)_engine_active mechanism ( #1404 )
...
They are no longer necessary because we no longer create
debug instances automatically for exec env at this layer.
2022-08-24 12:15:37 +08:00
YAMAMOTO Takashi and GitHub
1fc01fab4b
wasm_create_exec_env_and_call_function: Remove "enable_debug" argument ( #1398 )
...
No one uses the `enable_debug` argument after the removal of
wasm_runtime_create_exec_env_and_call_wasm.
2022-08-19 20:28:10 +08:00
YAMAMOTO Takashi and GitHub
ccd664b81e
wasm_runtime_start_debug_instance: Don't create debug instance for AOT ( #1395 )
2022-08-19 17:10:50 +08:00
YAMAMOTO Takashi and GitHub
0ec99e9522
Remove unused wasm_runtime_create_exec_env_and_call_wasm ( #1396 )
...
It's unused since the following commit:
commit 260d36a62d
2022-08-19 15:23:31 +08:00
YAMAMOTO Takashi and GitHub
12931e7f59
Expose wasm_runtime_get_exec_env_singleton to the API users ( #1388 )
...
Sometimes it can be useful to access the singleton.
E.g. use wasm_runtime_set_user_data on it.
2022-08-17 16:13:46 +08:00
YAMAMOTO Takashi and GitHub
e0a943ee9c
nuttx: Provide a default WASM_STACK_GUARD_SIZE ( #1386 )
...
Unbreak builds with a bit older nuttx/apps for now.
Note: The default value here (0) was chosen to match the new default
in nuttx/apps, which is different from the old value used before
the introduction of WASM_STACK_GUARD_SIZE. (1024)
2022-08-15 19:49:39 +08:00
YAMAMOTO Takashi and GitHub
e8f0c9580b
Some wamr-ide improvements ( #1354 )
...
including:
- enable macOS support
- documentation improvements
- fix some warnings
2022-08-08 17:52:47 +08:00
YAMAMOTO Takashi and GitHub
425efb875f
wasm_c_api.c: improve unimplemented cases ( #1355 )
...
ASSERT_NOT_IMPLEMENTED is bh_assert, which might be no-op.
in that case, it's better to fall back to the "default" case,
which reports an error properly.
2022-08-08 16:46:54 +08:00
YAMAMOTO Takashi and GitHub
be8ba9e1fd
wasm_export.h: mention module byte buffer mutability ( #1271 )
2022-07-07 10:06:31 +08:00
YAMAMOTO Takashi and GitHub
653efecd02
debug_engine: Fix a few typos ( #1261 )
...
no functional changes are intended.
cf.
https://sourceware.org/gdb/onlinedocs/gdb/General-Query-Packets.html#General-Query-Packets
2022-06-30 15:45:46 +08:00
YAMAMOTO Takashi and GitHub
2b49a0b817
wasm_cluster_spread_custom_data: Fix a crash when called before exec ( #1257 )
2022-06-29 13:21:03 +08:00
YAMAMOTO Takashi and GitHub
d5d6b7284d
Fix a few redefinition warnings for WAMR_BUILD_DEBUG_INTERP=1 ( #1256 )
2022-06-29 12:23:58 +08:00
YAMAMOTO Takashi and GitHub
a67c1c1c01
doc/build_wasm_app.md: Mention a glitch with LLVM 13 and later ( #1255 )
...
References:
https://reviews.llvm.org/D81689#3611504
https://github.com/WebAssembly/WASI/issues/471
2022-06-28 19:56:24 +08:00
YAMAMOTO Takashi and GitHub
eb3cdaaf32
Fix macro redifinition warning for NuttX ( #1250 )
...
Fix the following warning introduced by the recent change.
```
In file included from wamr/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/locking.h:17,
from wamr/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.h:18,
from wamr/core/iwasm/aot/../common/wasm_runtime_common.h:18,
from wamr/core/iwasm/aot/aot_runtime.h:10,
from wamr/core/iwasm/aot/aot_loader.c:6:
wamr/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/ssp_config.h:55: error: "CONFIG_HAS_ISATTY" redefined [-Werror]
#define CONFIG_HAS_ISATTY 1
In file included from wamr/core/shared/utils/../platform/include/platform_common.h:13,
from wamr/core/shared/utils/bh_platform.h:9,
from wamr/core/iwasm/aot/aot_runtime.h:9,
from wamr/core/iwasm/aot/aot_loader.c:6:
wamr/core/shared/platform/nuttx/platform_internal.h:75: note: this is the location of the previous definition
#define CONFIG_HAS_ISATTY 0
```
2022-06-26 10:06:34 +08:00
YAMAMOTO Takashi and GitHub
ec299554dd
Remove the code for WASM_ENABLE_GC ( #1200 )
...
Remove the code for WASM_ENABLE_GC as it is for a dev branch
2022-06-01 16:46:11 +08:00
YAMAMOTO Takashi and GitHub
3168ba8dcf
Add comments on trailing uint8[1] members in the "Common" structures ( #1189 )
...
Add comments to avoid abusing these members to store extra data.
2022-05-26 11:53:50 +08:00
YAMAMOTO Takashi and GitHub
3fd763a95c
wasm_export.h: Make RuntimeInitArgs less config dependent ( #1190 )
...
This header file is supposed to be used by user code, which is not
a part of WAMR. Usually WAMR configuration is not available there,
remove DEBUG_INTERP macro control in it.
2022-05-25 18:15:51 +08:00
YAMAMOTO Takashi and GitHub
2288695a33
product-mini/platforms/nuttx/wamr.mk: Build libc-wasi ( #1129 )
2022-05-24 16:12:08 +08:00
YAMAMOTO Takashi and GitHub
da3b519642
core/shared/platform/nuttx: mock several APIs for libc-wasi ( #1127 )
2022-05-24 12:03:40 +08:00
YAMAMOTO Takashi and GitHub
723a808106
nuttx: Use text heap for executable memory ( #1181 )
...
Based on nuttx patch "Add up_textheap_heapmember":
https://github.com/apache/incubator-nuttx/pull/6306
2022-05-23 10:58:09 +08:00
YAMAMOTO Takashi and GitHub
69c23aa2d4
aot_reloc_xtensa.c: define __packed if not available ( #1179 )
2022-05-21 16:46:02 +08:00
YAMAMOTO Takashi and GitHub
c47b318aef
nuttx: add CONFIG_INTERPRETERS_WAMR_PERF_PROFILING ( #1178 )
...
Based on the corresponding nuttx patch:
https://github.com/apache/incubator-nuttx-apps/pull/1166
2022-05-21 14:56:56 +08:00
YAMAMOTO Takashi and GitHub
a50011a4dd
core/iwasm/common/wasm_application.c: Fix a typo of macro ( #1180 )
...
Change WAMR_ENABLE_PERF_PROFILING to WASM_ENABLE_PERF_PROFILING
2022-05-21 12:53:11 +08:00
YAMAMOTO Takashi and GitHub
362bd0cc5c
doc/wasm_c_api.md: Mention relationship with wasm_export.h ( #1159 )
2022-05-09 16:39:49 +08:00
YAMAMOTO Takashi and GitHub
3edb832f76
aot_reloc_arm.c: Implement R_ARM_MOVW_ABS_NC and R_ARM_MOVT_ABS ( #1148 )
...
Implement reloc type R_ARM_MOVW_ABS_NC and R_ARM_MOVT_ABS for arm,
refer to:
https://github.com/ARM-software/abi-aa/blob/main/aaelf32/aaelf32.rst#5614static-arm-relocations
2022-05-07 10:22:05 +08:00
YAMAMOTO Takashi and GitHub
8db6f5978b
aot_emit_aot_file.c: Convert switch lookup table relocation ( #1149 )
...
Fix the symbol resolving failure with recent version of wamrc:
```
AOT module load failed: resolve symbol .Lswitch.table.aot _func#82.2 failed
```
Replace the relocations for such symbols with .rodata section.
2022-05-07 08:41:53 +08:00
YAMAMOTO Takashi and GitHub
6fb402aeec
wasm_export.h: Add a few comments about heap and threads ( #1147 )
2022-05-06 18:30:48 +08:00
YAMAMOTO Takashi and GitHub
03f2153270
wasm_runtime_common.c: add assertion for BH_MALLOC/BH_FREE ( #1139 )
...
Add assertion for BH_MALLOC/BH_FREE in wasm_runtime_common.c,
when building runtime, the BH_MALLOC/BH_FREE macros should be
defined as wasm_runtime_malloc/wasm_runtime_free.
2022-05-06 13:47:56 +08:00
YAMAMOTO Takashi and GitHub
2e27d506d8
posix os_socket_inet_network: Use inet_addr instead of inet_network ( #1133 )
2022-04-28 13:53:01 +08:00
YAMAMOTO Takashi and GitHub
d9d0777051
Move dlfcn.h availability check to platform_common.h ( #1134 )
2022-04-28 12:31:28 +08:00
YAMAMOTO Takashi and GitHub
814a76ee89
product-mini/platforms/nuttx/wamr.mk: Provide BH_MALLOC/BH_FREE ( #1135 )
2022-04-28 12:03:29 +08:00
YAMAMOTO Takashi and GitHub
f8b4ca2a70
sandboxed-system-primitives: Remove unused file signals.h ( #1132 )
2022-04-27 18:59:09 +08:00
YAMAMOTO Takashi and GitHub
e1934f2478
sandboxed-system-primitives: Use d_ino=0 for NuttX ( #1128 )
...
NuttX doesn't have d_ino.
2022-04-27 17:49:06 +08:00
YAMAMOTO Takashi and GitHub
5343411623
libc-wasi/sandboxed-system-primitives: Convert signals only when available ( #1125 )
...
Many of these signal constants are not available on NuttX.
Maybe we can remove these signal stuff sooner or later:
https://github.com/WebAssembly/WASI/issues/7
https://github.com/WebAssembly/wasi-libc/pull/278
2022-04-27 16:22:43 +08:00
YAMAMOTO Takashi and GitHub
2fe83e29cd
sandboxed-system-primitives: make CPT/TCT clock ids optional ( #1126 )
...
NuttX doesn't have them.
2022-04-27 14:24:02 +08:00
YAMAMOTO Takashi and GitHub
91222e1e44
interpreter: Fix an UBSan complaint in word_copy ( #1106 )
...
Fix an UBSan complaint introduced by recent change by adding more checks
to word_copy:
```
wasm_interp_fast.c:792:9: runtime error: applying zero offset to null pointer
```
2022-04-21 12:21:37 +08:00
YAMAMOTO Takashi and GitHub
67d6a2886e
core/iwasm/aot/aot_loader.c: Fix a zero-sized malloc warning ( #1108 )
...
Fix the following warning when loading an aot file without relocations:
```
[20:19:00:528 - 1119F1600]: warning: wasm_runtime_malloc with size zero
```
2022-04-20 18:27:13 +08:00
YAMAMOTO Takashi and GitHub
a85f982297
wamr-compiler: Fix ubsan on macOS ( #1105 )
...
Supported on ubuntu as well
2022-04-20 16:59:13 +08:00
YAMAMOTO Takashi and GitHub
0f505aafd9
aot_runtime.c: Add static assertions for some offset assumptions ( #1103 )
2022-04-20 13:58:02 +08:00
YAMAMOTO Takashi and GitHub
b36931a589
aot_loader.c: Fix issues in "Refine interp/aot string storage" ( #1102 )
...
Fix issues in PR "Refine interp/aot string storage and emitting (#820 )",
which had a few issues:
- It looks a wrong byte to mark the flag
- It doesn't work for long strings (>= 0x80 in case of little endian)
This commit fixes them by maintaining a list of loaded symbols while loading
relocation section to avoid reading a string repeatedly, and no need to mark
the flag again.
2022-04-19 15:44:30 +08:00
YAMAMOTO Takashi and GitHub
87784cfb65
core/iwasm/aot/aot_runtime.c: Fix an unused function warning ( #1099 )
2022-04-19 09:48:28 +08:00
YAMAMOTO Takashi and GitHub
b4574123c9
aot_get_module_mem_consumption: Fix const strings size ( #1098 )
...
Fix the issue that the `*(uint32 *)p_const_string_size` is added repeatedly
while calculating the aot module's memory consumption.
2022-04-19 08:57:44 +08:00
YAMAMOTO Takashi and GitHub
2366e8c493
Fix a few signedness warnings ( #1095 )
...
Fix compile warnings in libc-wasi posix.c:
```
posix.c:880:41: warning: comparison of integers of different signs:
'unsigned long' and 'ssize_t' (aka 'long') [-Wsign-compare]
if (bufoff + iov[i].buf_len < len) {
posix.c:1359:32: warning: comparison of integers of different signs:
'off_t' (aka 'long long') and 'unsigned long long' [-Wsign-compare]
if (ret == 0 && sb.st_size < offset + len)
```
2022-04-18 16:54:15 +08:00
YAMAMOTO Takashi and GitHub
6edabbf632
Add __umoddi3 to target symbol map in aot_reloc_arm.c ( #828 )
2021-11-10 16:53:14 +08:00
YAMAMOTO Takashi and GitHub
d1be75c4a1
wamrc: return a non-zero exit code on failure ( #822 )
2021-11-09 13:13:20 +08:00
YAMAMOTO Takashi and GitHub
2613a68108
aot_reloc_x86_64: Fix pointer overflows ( #809 )
...
Fix pointer overflow of `(uint8 *)symbol_addr + reloc_addend` detected by UBSan:
```
core/iwasm/aot/arch/aot_reloc_x86_64.c:232:43: runtime error: addition of unsigned offset to 0x000041209004 overflowed to 0x000041209000
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior core/iwasm/aot/arch/aot_reloc_x86_64.c:232:43
```
2021-11-08 16:15:44 +08:00
YAMAMOTO Takashi and GitHub
68d72c300f
Fix a wrong alignment assumption when emitting aot file ( #792 )
...
The size used to apply "size = align_uint(size, 4)" may be different
when calculating total size (in get_object_data_sections_size) and
emitting actual data (in aot_emit_object_data_section_info) for the
object data section.
This patch fixes the "Error: emit object data section info failed".
2021-10-19 17:11:24 +08:00
YAMAMOTO Takashi and GitHub
808ad2e4f1
Add __umodsi3 to target symbol map in aot_reloc_arm.c ( #793 )
...
The symbol _umodsi3 may be used by AOT file generated with "wamrc --target=armv7".
2021-10-19 17:04:09 +08:00
YAMAMOTO Takashi and GitHub
ea835db54c
Enable wamr-test-suites on MacOS ( #740 )
2021-09-10 10:11:46 +08:00
YAMAMOTO Takashi and GitHub
336abc2b27
Fix a build on alpine, whose libc is musl ( #726 )
...
Change __syscall_slong_t to __SYSCALL_SLONG_TYPE, and use it when macro __SYSCALL_SLONG_TYPE is defined.
2021-09-07 10:03:54 +08:00
YAMAMOTO Takashi and GitHub
79f163d08b
Appease some UBSan complaints ( #720 )
2021-09-04 10:09:30 +08:00