wasm-micro-runtime/core/iwasm/libraries/lib-wasi-threads
Wenyong Huang c39214e8a5
Fix potential recursive lock in pthread_create_wrapper (#2980)
Potential recursive lock occurs in:
```
pthread_create_wrapper   (acquire exec_env->wait_lock)
  => wasm_cluster_create_thread
    => allocate_aux_stack
      => wasm_runtime_module_malloc_internal
        => wasm_call_function
          => wasm_exec_env_set_thread_info (acquire exec_env->wait_lock again)
```
Allocate aux stack before calling wasm_cluster_create_thread to resolve it.

Reported in https://github.com/bytecodealliance/wasm-micro-runtime/pull/2977.
2024-01-08 09:43:31 +08:00
..
stress-test Refactor stress tests to make them runnable in reactor mode (#2614) 2023-10-04 08:10:10 +08:00
test Revert "Return error when exception was raised after main thread finishes" (#2524) 2023-09-04 18:01:09 +08:00
unit-test Add unit tests for the tid allocator (#2519) 2023-09-04 13:21:10 +08:00
lib_wasi_threads_wrapper.c Fix potential recursive lock in pthread_create_wrapper (#2980) 2024-01-08 09:43:31 +08:00
lib_wasi_threads.cmake Reserve TID values for WASI threads (#1862) 2023-01-06 10:28:25 +08:00
tid_allocator.c Fix issues reported by Coverity and clear windows warnings (#2467) 2023-08-17 10:54:02 +08:00
tid_allocator.h Add unit tests for the tid allocator (#2519) 2023-09-04 13:21:10 +08:00