YAMAMOTO Takashi
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
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
Wenyong Huang
64c0b15c52
loader: Sub local count can be 0 ( #1504 )
...
Sub local count is allowed to be 0 in each group of function local types.
2022-09-20 12:40:24 +08:00
Marcin Kolny
c072b5172c
Assert on correct parameters ( #1505 )
...
This also fixes debug build
2022-09-20 08:58:02 +08:00
Daniel Ludwig
046f5f2212
Fix Windows/MSVC build issues ( #1498 )
...
Fix two issues of building WAMR on Windows:
- The build_llvm.py script calls itself, spawning instances faster than they expire,
which makes Python3 eat up the entire RAM in a pretty short time.
- The MSVC compiler doesn't support preprocessor statements inside macro expressions.
Two places inside bh_assert() were found.
2022-09-17 21:16:38 +08:00
YAMAMOTO Takashi
12bbb9189c
source_debugging.md: Add some notes about AOT debug ( #1496 )
2022-09-17 21:01:29 +08:00
YAMAMOTO Takashi
f5939c7bc1
Fix AOT debug for macOS ( #1494 )
...
note: macOS doesn't have elf.h
2022-09-16 18:54:04 +08:00
YAMAMOTO Takashi
1eedde7c33
Fix several issues related to AOT debug ( #1492 )
2022-09-16 12:06:46 +08:00
Marcin Kolny
f96773410a
Fix bind()
calls to receive the correct size of sockaddr
structure ( #1490 )
...
For some implementations (e.g. Mac OS) `bind()` requires the length to be exactly
equal to either `sockaddr_in` or `sockaddr_in6` structure. Because we always used
`sizeof(struct sockaddr_storage)`, `bind()` was returning errors. In this change we
fix the behavior. See StackOverflow [1] for details.
[1] https://stackoverflow.com/questions/73707162/socket-bind-failed-with-invalid-argument-error-for-program-running-on-macos
2022-09-16 11:09:03 +08:00
Shengyun Zhou
edaff3c6ec
thread-mgr: Prevent an already detached thread from being detached again ( #1487 )
...
If WASM app has called pthread_detach() to detach a thread, it will be detached again
when thread exits. Attempting to detach an already detached thread may result in crash
in musl-libc. This patch fixes it.
2022-09-15 17:13:33 +08:00
Callum Macmillan
4de5b52ba0
Added http downloader and multicast socket options ( #1467 )
...
Add a group of socket options used by cURL and rust stdlib, as well as some UDP multicast options.
2022-09-15 17:09:39 +08:00
Huang Qi
bbea005db6
Make libc-builtin buffered printf be a common feature ( #1483 )
...
Add macros to control whether to use the libc-builtin buffered printf
and the buffer size.
2022-09-15 15:09:01 +08:00
Wenyong Huang
ab929c20a3
Add check for code section size, fix interp float operations ( #1480 )
...
And enable classic interpreter instead fast interpreter when llvm jit is enabled,
so as to fix the issue that llvm jit cannot handle opcode drop_64/select_64.
2022-09-14 19:49:18 +08:00
Marcin Kolny
b731ca4668
Implement sock_send_to and sock_recv_from system calls ( #1457 )
2022-09-13 09:00:05 +08:00
Wenyong Huang
56b4a8bd4c
Merge main into dev/socket
2022-09-10 22:12:43 +08:00
Wang Ning
7593668066
WARM-IDE: Add check for invalid project name when creating new project ( #1461 )
2022-09-08 17:34:24 +08:00
Wenyong Huang
8a7dd4dc3e
Remove handling unsupported opcodes in loader ( #1464 )
...
Remove handling opcode DROP_64/SELECT_64 in loader stage
prepare_bytecode, as they are the modified opcodes of DROP/SELECT
for optimization purpose, but not the opcodes defined by spec.
2022-09-08 15:38:16 +08:00
Qiang
6820af6212
Fix a potential memory leak issue in wasm_native_init ( #1465 )
...
Should call `wasm_native_destroy` to destroy the registered native libs
when registering native lib failed in `wasm_native_init`.
2022-09-08 14:22:34 +08:00
Qiang
da79e3e9b2
Add more checks for Fast JIT gen insn and jit_lock_reg_in_insn ( #1449 )
...
Add more checks for Fast JIT generating insn and jit_lock_reg_in_insn
in compile_int_div_no_check and other places to avoid accessing
NULL insn.
2022-09-07 16:52:35 +08:00
YAMAMOTO Takashi
0a08b92662
VSCode-Extension: Add empty platform directories ( #1460 )
2022-09-07 14:30:39 +08:00
Wenyong Huang
8a2c1a2471
Fix build error on alios platform ( #1459 )
...
Add the definition of `korp_sem` in platform_internal.h.
2022-09-07 13:50:11 +08:00
Xu Jun
5722fcc40a
Fix issue in multi-thread sample ( #1458 )
...
Set `WAMR_BUILD_LIB_PTHREAD_SEMAPHORE` for the sample,
and update document.
2022-09-07 12:56:50 +08:00
Zeuson
729c4aeeaa
Enable remote attestation by librats in SGX mode ( #1445 )
...
Add library librats, update SGX build scripts, add sample and update document.
2022-09-06 14:29:58 +08:00
Wenyong Huang
a9cb9206d6
Fix build issue of the meshoptimizer workload ( #1452 )
...
meshoptimizer repo had changed, change the patch accordingly.
2022-09-05 21:56:23 +08:00
YAMAMOTO Takashi
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
Huang Qi
8fcc556e50
ci: Cover more configurations & targets on NuttX ( #1448 )
...
Enable building iwasm on Nuttx for target:
* x86
* cortex-m0
* cortex-m4
* cortex-m7
* rv32imac
* rv64imac
* rv64gc
2022-09-05 12:12:32 +08:00
YAMAMOTO Takashi
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
Callum Macmillan
72367f47eb
Added socket send and recv timeout options ( #1419 )
...
Added socket send and recv timeout options with implementation for posix platform.
This is part of a extending support for sockets in WASI. #1336 .
Also add sample that sets and reads back the send and receive timeouts using
the native function binding.
2022-09-03 08:35:23 +08:00
Huang Qi
531a011700
Move WASM_ENABLE_SPEC_TEST to correct place ( #1447 )
...
Fix compilation warning:
```
wamr/product-mini/platforms/nuttx/../posix/main.c:622:5: warning: "WASM_ENABLE_SPEC_TEST" is not defined, evaluates to 0 [-Wundef]
622 | #if WASM_ENABLE_SPEC_TEST != 0
```
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-09-03 08:18:45 +08:00
Marcin Kolny
3c4e980c9c
Implement getaddrinfo in wasi_socket_ext.c ( #1413 )
...
So getaddrinfo() can be used when compiling wasm app of C programs.
2022-09-02 21:11:58 +08:00
Marcin Kolny
9a04c21075
Implement ns lookup allowlist ( #1420 )
...
The ns-lookup accepts domain names as well as suffixes, e.g.:
```
--allow-resolve=* # allow all domain names
--allow-resolve=example.com # only allow example.com name resolution
--allow-resolve=example.com --allow-resolve=*.example.com # allow example.com and its subdomains' name resolution
```
2022-09-02 19:26:31 +08:00
Huang Qi
c56fd8bd5b
Introduce basic CI for nuttx ( #1444 )
2022-09-02 11:07:59 +08:00
Marcin Kolny
df782c5f2a
Fix bug for IPv4 in sock_open
( #1446 )
2022-09-02 10:28:05 +08:00
Marcin Kolny
0ffac101a1
Add support for IPv6 in WAMR ( #1411 )
...
For now this implementation only covers posix platforms, as defined in MVP #1336
2022-09-01 22:20:53 +08:00
Wenyong Huang
d095876ae6
Enable memory leak check ( #1429 )
...
Report the memory leak info when building iwasm with
`cmake .. -DWAMR_BUILD_GC_VERIFY=1`
2022-09-01 16:15:00 +08:00
Qiang
18774805cc
Add more checks for Fast JIT ( #1433 )
...
Add more checks for Fast JIT to fix the issues reported by instrument test:
- add check for the jit_value before pushing it into the stack
- add check at the end of form_and_translate_func
- add checks after each jit pass
2022-09-01 15:31:00 +08:00
Huang Qi
c64186b704
Fix potential warning of printf in main.c of posix and windows ( #1440 )
2022-09-01 14:11:00 +08:00
YAMAMOTO Takashi
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
Wenyong Huang
22c235b5ec
Fix multi-module and some other issues ( #1435 )
...
Fix multi-module issue:
don't call the sub module's function with "$sub_module_name$func_name"
Fix the aot_call_function free argv1 issue
Modify some API comments in wasm_export.h
Fix the wamrc help info
2022-08-31 17:38:38 +08:00
YAMAMOTO Takashi
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
Huang Qi
77c516ac80
Add a new API to get free memory in memory pool ( #1430 )
2022-08-31 16:39:25 +08:00
Xu Jun
e0c2acd178
add language bindings in README ( #1434 )
...
* add language bindings in README
* minor update
2022-08-30 22:05:54 +08:00
YAMAMOTO Takashi
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
6b073af3b0
debug-engine: Reduce the default MAX_PACKET_SIZE ( #1425 )
2022-08-30 17:00:32 +08:00
YAMAMOTO Takashi
fba12e9969
debug-engine: constify several global variables ( #1427 )
2022-08-30 15:43:47 +08:00
liang.he
29dee732e9
Fix typo in simd_conversions.c ( #1428 )
...
Change "==" to "=" when setting trunc_type[] array elements.
2022-08-29 18:01:19 +08:00
YAMAMOTO Takashi
1985a251cd
debug-engine: Use default stack size for control thread ( #1424 )
2022-08-26 21:13:30 +08:00
YAMAMOTO Takashi
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
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
ee98b583d5
debug-engine: Fix process_port handling ( #1415 )
...
process_port=1 means "use port 1"
2022-08-25 20:03:44 +08:00