File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
system/lib/libc/musl/src/thread Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 4
4
static int __pthread_detach (pthread_t t )
5
5
{
6
6
#ifdef __EMSCRIPTEN__ // XXX Emscripten return ESRCH when attempting to detach invalid threads
7
- if (!t || t -> self != t ) {
8
- return ESRCH ;
9
- }
7
+ if (!t || t -> self != t ) return ESRCH ;
10
8
#endif
11
9
/* If the cas fails, detach state is either already-detached
12
10
* or exiting/exited, and pthread_join will trap or cleanup. */
Original file line number Diff line number Diff line change @@ -7,12 +7,16 @@ static void dummy1(pthread_t t)
7
7
}
8
8
weak_alias (dummy1 , __tl_sync );
9
9
10
+ // XXX Emscripten ASan: build an uninstrumented version of pthread_join
11
+ #if defined(__EMSCRIPTEN__ ) && defined(__has_feature )
12
+ #if __has_feature (address_sanitizer )
13
+ __attribute__((no_sanitize ("address" )))
14
+ #endif
15
+ #endif
10
16
static int __pthread_timedjoin_np (pthread_t t , void * * res , const struct timespec * at )
11
17
{
12
18
#ifdef __EMSCRIPTEN__ // XXX Emscripten return ESRCH when attempting to join invalid threads (see test_pthread_join_6_2)
13
- if (!t || t -> self != t ) {
14
- return ESRCH ;
15
- }
19
+ if (!t || t -> self != t ) return ESRCH ;
16
20
#endif
17
21
18
22
int state , cs , r = 0 ;
You can’t perform that action at this time.
0 commit comments