Skip to content

Commit e123662

Browse files
authored
Use emscripten_malloc_wasm_worker in wait_async test (#20090)
Automatically allocating the buffer will correctly account for the TLS size. Previously the assertion that sufficient space was being allocated was failing due to the TLS size under LSan: https://logs.chromium.org/logs/emscripten-releases/buildbucket/cr-buildbucket/8772403134338302337/+/u/Emscripten_testsuite__LSan_/stdout
1 parent 361dcce commit e123662

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/wasm_worker/wait_async.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ void worker_main()
1717
emscripten_wasm_notify((int32_t*)&addr, 1);
1818
}
1919

20-
char stack[1024];
2120

2221
int numCalled = 0;
2322

@@ -55,7 +54,7 @@ void asyncWaitFinishedShouldBeOk(int32_t *ptr, uint32_t val, ATOMICS_WAIT_RESULT
5554
int main()
5655
{
5756
emscripten_console_log("main: creating worker");
58-
emscripten_wasm_worker_t worker = emscripten_create_wasm_worker(stack, sizeof(stack));
57+
emscripten_wasm_worker_t worker = emscripten_malloc_wasm_worker(1024);
5958
emscripten_console_log("main: posting function");
6059
emscripten_wasm_worker_post_function_v(worker, worker_main);
6160

0 commit comments

Comments
 (0)