Implement strict validation of thread IDs according to the specification (#2521)

This commit is contained in:
Marcin Kolny
2023-08-31 13:23:54 +01:00
committed by GitHub
parent 411b903cee
commit 53d7027de0
7 changed files with 11 additions and 13 deletions

View File

@ -7,6 +7,10 @@
#define STACK_SIZE 32 * 1024 // same as the main stack
/* See https://github.com/WebAssembly/wasi-threads#design-choice-thread-ids */
#define ASSERT_VALID_TID(TID) \
assert(TID >= 1 && TID <= 0x1FFFFFFF && "Invalid thread ID")
typedef struct {
void *stack;
} start_args_t;