wasm-micro-runtime/core/iwasm/common
teamchong 628d4110a4 fix: clear exec_env_tls when destroying exec_env
When an exec_env is destroyed, check if it matches the current thread's
exec_env_tls and clear it to avoid dangling pointer issues.

Without this fix, in daemon-style execution where the same thread runs
multiple WASM modules sequentially (like Cloudflare Workers), the
exec_env_tls can point to freed memory after an exec_env is destroyed,
causing crashes on subsequent executions when the signal handler tries
to access it.

This is critical for AOT mode with hardware bounds checking enabled,
where signal handlers rely on exec_env_tls to handle SIGSEGV properly.
2025-12-29 13:13:12 -05:00
..
arch refactor: Improve debug experience with CFI directives and proper label naming in Thumb invokeNative (#4719) 2025-11-24 19:19:18 +08:00
gc Collective fix for typos and minor bugs (#4369) 2025-06-17 09:26:00 +08:00
iwasm_common.cmake Implement invokeNative asm code for armasm64 assembler on ARM64 Windows (#4636) 2025-10-09 12:09:00 +08:00
SConscript Refactor SConscript and add file checks in iwasm.c (#3945) 2024-12-06 14:54:37 +08:00
wasm_application.c Merge dev/zephyr_file_socket into main (#4347) 2025-08-25 16:55:23 +08:00
wasm_blocking_op.c Implement async termination of blocking thread (#2516) 2023-09-20 18:11:52 +08:00
wasm_c_api_internal.h Fix some spelling issues (#3385) 2024-05-06 07:56:48 +08:00
wasm_c_api.c fix: correct typos and improve comments across multiple files by codespell (#4116) 2025-03-07 08:21:54 +08:00
wasm_exec_env.c fix: clear exec_env_tls when destroying exec_env 2025-12-29 13:13:12 -05:00
wasm_exec_env.h feat: Add instruction metering for interpreter (#4122) 2025-05-26 16:16:42 +08:00
wasm_loader_common.c add validation for struct field type (#4536) 2025-08-11 15:07:15 +08:00
wasm_loader_common.h add validation for struct field type (#4536) 2025-08-11 15:07:15 +08:00
wasm_memory.c Add a runtime API for reset shared heap(chain) (#4740) 2025-12-15 09:56:55 +08:00
wasm_memory.h Add a runtime API for reset shared heap(chain) (#4740) 2025-12-15 09:56:55 +08:00
wasm_native.c Fix an undefined reference problem (#4612) 2025-09-11 06:32:15 +08:00
wasm_native.h Appease GCC strict prototypes warning (#3775) 2024-09-10 09:42:23 +08:00
wasm_runtime_common.c Ensure --addr-pool mask accepts numbers only (#4619) 2025-12-22 07:55:42 +08:00
wasm_runtime_common.h add a set of apis to configure wasi via InstantiationArgs2 (#4707) 2025-11-24 19:20:21 +08:00
wasm_shared_memory.c fix bug and add unit test case for runtime api when shared heap is enabled (#4695) 2025-11-11 16:22:45 +08:00
wasm_shared_memory.h Appease GCC strict prototypes warning (#3775) 2024-09-10 09:42:23 +08:00
wasm_suspend_flags.h Do not inherit WASM_SUSPEND_FLAG_BLOCKING from the parent thread (#3051) 2024-01-19 09:55:01 +08:00