Skip to content

Commit 8ecf196

Browse files
gbaraldiKristofferC
authored andcommitted
Test: Expand verbose mode
(cherry picked from commit 95e132e)
1 parent 27507d6 commit 8ecf196

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/threading.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,8 @@ JL_DLLEXPORT uint64_t jl_get_ptls_rng(void) JL_NOTSAFEPOINT
309309
return jl_current_task->ptls->rngseed;
310310
}
311311

312+
typedef void (*unw_tls_ensure_func)(void) JL_NOTSAFEPOINT;
313+
312314
// get thread local rng
313315
JL_DLLEXPORT void jl_set_ptls_rng(uint64_t new_seed) JL_NOTSAFEPOINT
314316
{
@@ -394,7 +396,10 @@ jl_ptls_t jl_init_threadtls(int16_t tid)
394396
#if !defined(_OS_WINDOWS_) && !defined(JL_DISABLE_LIBUNWIND) && !defined(LLVMLIBUNWIND)
395397
// ensures libunwind TLS space for this thread is allocated eagerly
396398
// 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();
398403
#endif
399404

400405
return ptls;

0 commit comments

Comments
 (0)