@@ -55,11 +55,11 @@ static inline void sanitizer_finish_switch_fiber(void) {}
5555#endif
5656
5757#if defined(_COMPILER_TSAN_ENABLED_ )
58- static inline void tsan_destroy_ctx (jl_ptls_t ptls , void * * state ) {
59- if (state != & ptls -> root_task -> tsan_state ) {
60- __tsan_destroy_fiber (* state );
58+ static inline void tsan_destroy_ctx (jl_ptls_t ptls , void * state ) {
59+ if (state != & ptls -> root_task -> state ) {
60+ __tsan_destroy_fiber (ctx -> state );
6161 }
62- * state = NULL ;
62+ ctx -> state = NULL ;
6363}
6464static inline void tsan_switch_to_ctx (void * state ) {
6565 __tsan_switch_to_fiber (state , 0 );
@@ -336,7 +336,7 @@ static void ctx_switch(jl_task_t *lastt)
336336 assert (ptls -> locks .len == 0 );
337337
338338#ifdef _COMPILER_TSAN_ENABLED_
339- if (lastt -> tsan_state != __tsan_get_current_fiber ()) {
339+ if (lastt -> ctx . tsan_state != __tsan_get_current_fiber ()) {
340340 // Something went really wrong - don't even assume that we can
341341 // use assert/abort which involve lots of signal handling that
342342 // looks at the tsan state.
@@ -402,7 +402,7 @@ static void ctx_switch(jl_task_t *lastt)
402402 jl_set_pgcstack (& t -> gcstack );
403403
404404#if defined(_COMPILER_TSAN_ENABLED_ )
405- tsan_switch_to_ctx (t -> tsan_state );
405+ tsan_switch_to_ctx (& t -> tsan_state );
406406 if (killed )
407407 tsan_destroy_ctx (ptls , & lastt -> tsan_state );
408408#endif
0 commit comments