File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -309,6 +309,8 @@ JL_DLLEXPORT uint64_t jl_get_ptls_rng(void) JL_NOTSAFEPOINT
309
309
return jl_current_task -> ptls -> rngseed ;
310
310
}
311
311
312
+ typedef void (* unw_tls_ensure_func )(void ) JL_NOTSAFEPOINT ;
313
+
312
314
// get thread local rng
313
315
JL_DLLEXPORT void jl_set_ptls_rng (uint64_t new_seed ) JL_NOTSAFEPOINT
314
316
{
@@ -394,7 +396,10 @@ jl_ptls_t jl_init_threadtls(int16_t tid)
394
396
#if !defined(_OS_WINDOWS_ ) && !defined(JL_DISABLE_LIBUNWIND ) && !defined(LLVMLIBUNWIND )
395
397
// ensures libunwind TLS space for this thread is allocated eagerly
396
398
// to make unwinding async-signal-safe even when using thread local caches.
397
- unw_ensure_tls ();
399
+ unw_tls_ensure_func jl_unw_ensure_tls = NULL ;
400
+ jl_dlsym (jl_exe_handle , "unw_ensure_tls" , (void * * )& jl_unw_ensure_tls , 0 );
401
+ if (jl_unw_ensure_tls )
402
+ jl_unw_ensure_tls ();
398
403
#endif
399
404
400
405
return ptls ;
You can’t perform that action at this time.
0 commit comments