YAMAMOTO Takashi

Results 652 comments of YAMAMOTO Takashi

> i feel [espressif/llvm-project#112](https://github.com/espressif/llvm-project/issues/112) is a show blocker. what do you think? for now i gave up and submit an alternative with llvm 18: https://github.com/bytecodealliance/wasm-micro-runtime/pull/4259

> Should we close it or leave it open? leave it for a whlie. let's see how long https://github.com/espressif/llvm-project/issues/112 takes.

> why 19, not 20? because, as of writing this, 19 is the latest released version for the xtensa fork of llvm: https://github.com/espressif/llvm-project while we can use different versions for...

a simple workaround for those who don't really need expression evaluation: ``` diff --git a/core/iwasm/libraries/debug-engine/debug_engine.c b/core/iwasm/libraries/debug-engine/debug_engine.c index 0ffc78ad..1b81a41c 100644 --- a/core/iwasm/libraries/debug-engine/debug_engine.c +++ b/core/iwasm/libraries/debug-engine/debug_engine.c @@ -408,6 +408,8 @@ wasm_debug_instance_create(WASMCluster *cluster, int32...

> > it isn't safe because the in-module heap might have not been initialized properly yet. > > like calling `wasm_runtime_start_debug_instance_with_port()` before `wasm_runtime_instantiate()`? no. eg. call `wasm_runtime_start_debug_instance_with_port()` before `wasm_application_execute_main()`.

> not entirely clear on this. Could you provide us with more details? As we understand it, after `wasm_runtime_instantiate()`, the linear memory, including the heap area, has been initialized, and...

malloc/free are not expected to be usable before _start. well, of course, it's possible to implement malloc as it can be used before _start. however, we should not assume such...

> then, maybe we should patch > > https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/core/iwasm/interpreter/wasm_runtime.c#L1597C1-L1602C7 > > ) { > call_ctors_func = > lookup_post_instantiate_func(module_inst, "__wasm_call_ctors"); > } > > call `_start` instead of `__wasm_call_ctors` __wasm_call_ctors export...

> if _in-module heap preparation_ is about below in [`_start()`](https://github.com/WebAssembly/wasi-libc/blob/e9524a0980b9bb6bb92e87a41ed1055bdda5bb86/libc-bottom-half/crt/crt1-command.c#L11) , > > // in void _start(void) > #ifdef _REENTRANT > __wasi_init_tp(); > #endif > > // The linker synthesizes...

> > they can be called during the execution of _start. (eg. host functions called by _start, like wasi, can call them back) > > May I ask how? wasip1...