@@ -55,11 +55,11 @@ static inline void sanitizer_finish_switch_fiber(void) {}
55
55
#endif
56
56
57
57
#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 );
61
61
}
62
- * state = NULL ;
62
+ ctx -> state = NULL ;
63
63
}
64
64
static inline void tsan_switch_to_ctx (void * state ) {
65
65
__tsan_switch_to_fiber (state , 0 );
@@ -336,7 +336,7 @@ static void ctx_switch(jl_task_t *lastt)
336
336
assert (ptls -> locks .len == 0 );
337
337
338
338
#ifdef _COMPILER_TSAN_ENABLED_
339
- if (lastt -> tsan_state != __tsan_get_current_fiber ()) {
339
+ if (lastt -> ctx . tsan_state != __tsan_get_current_fiber ()) {
340
340
// Something went really wrong - don't even assume that we can
341
341
// use assert/abort which involve lots of signal handling that
342
342
// looks at the tsan state.
@@ -402,7 +402,7 @@ static void ctx_switch(jl_task_t *lastt)
402
402
jl_set_pgcstack (& t -> gcstack );
403
403
404
404
#if defined(_COMPILER_TSAN_ENABLED_ )
405
- tsan_switch_to_ctx (t -> tsan_state );
405
+ tsan_switch_to_ctx (& t -> tsan_state );
406
406
if (killed )
407
407
tsan_destroy_ctx (ptls , & lastt -> tsan_state );
408
408
#endif
0 commit comments