Skip to content

Commit eec72cf

Browse files
authored
__pthread_create_js: Only conditionally mark as "noleakcheck" (#18636)
When offscreen canvas is not enabled this function does not allocate.
1 parent 7a0a060 commit eec72cf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/library_pthread.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,7 @@ var LibraryPThread = {
679679
return ___pthread_create_js(pthread_ptr, attr, startRoutine, arg);
680680
},
681681

682+
#if OFFSCREENCANVAS_SUPPORT
682683
// ASan wraps the emscripten_builtin_pthread_create call in
683684
// __lsan::ScopedInterceptorDisabler. Unfortunately, that only disables it on
684685
// the thread that made the call. __pthread_create_js gets proxied to the
@@ -687,6 +688,7 @@ var LibraryPThread = {
687688
// pthread's internal allocations as leaks. If/when we remove all the
688689
// allocations from __pthread_create_js we could also remove this.
689690
__pthread_create_js__noleakcheck: true,
691+
#endif
690692
__pthread_create_js__sig: 'iiiii',
691693
__pthread_create_js__deps: ['$spawnThread', 'pthread_self', '$pthreadCreateProxied',
692694
#if OFFSCREENCANVAS_SUPPORT

0 commit comments

Comments
 (0)