Skip to content

Commit

Permalink
threads: during abrupt thread-exit, cleanup anyways (#48223)
Browse files Browse the repository at this point in the history
Closes #47590 (pthread_cancel still forbidden though, since async mode
will corrupt or deadlock the process, and synchronously tested with
cancelation disabled whenever this is a lock is just a slow
implementation of a boolean)

Refs #47201 (only deals with thread exit, not other case where this is
an issue, like cfunction exit and gc-safe-leave)

May help #46537, by blocking jl_wake_libuv before uv_library_shutdown,
and other tweaks to GC mode. For example, avoiding:

[4011824] signal (6.-6): Aborted
gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
uv__async_send at /workspace/srcdir/libuv/src/unix/async.c:198
uv_async_send at /workspace/srcdir/libuv/src/unix/async.c:73
jl_wake_libuv at /data/vtjnash/julia1/src/jl_uv.c:44 [inlined]
JL_UV_LOCK at /data/vtjnash/julia1/src/jl_uv.c:64 [inlined]
ijl_iolock_begin at /data/vtjnash/julia1/src/jl_uv.c:72
iolock_begin at ./libuv.jl:48 [inlined]
_trywait at ./asyncevent.jl:140
wait at ./asyncevent.jl:155 [inlined]
profile_printing_listener at /data/vtjnash/julia1/usr/share/julia/stdlib/v1.10/Profile/src/Profile.jl:39
jfptr_YY.3_58617 at /data/vtjnash/julia1/usr/lib/julia/sys.so (unknown line)
_jl_invoke at /data/vtjnash/julia1/src/gf.c:2665 [inlined]
ijl_apply_generic at /data/vtjnash/julia1/src/gf.c:2866
jl_apply at /data/vtjnash/julia1/src/julia.h:1870 [inlined]
start_task at /data/vtjnash/julia1/src/task.c:1093
Aborted

Fixes #37400
  • Loading branch information
vtjnash authored Jan 14, 2023
1 parent faa37a6 commit 428d242
Show file tree
Hide file tree
Showing 18 changed files with 142 additions and 84 deletions.
20 changes: 13 additions & 7 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,11 @@ $(BUILDDIR)/julia_flisp.boot: $(addprefix $(SRCDIR)/,jlfrontend.scm flisp/aliase

# additional dependency links
$(BUILDDIR)/codegen-stubs.o $(BUILDDIR)/codegen-stubs.dbg.obj: $(SRCDIR)/intrinsics.h
$(BUILDDIR)/aotcompile.o $(BUILDDIR)/aotcompile.dbg.obj: $(SRCDIR)/jitlayers.h $(SRCDIR)/llvm-codegen-shared.h $(SRCDIR)/debug-registry.h
$(BUILDDIR)/aotcompile.o $(BUILDDIR)/aotcompile.dbg.obj: $(SRCDIR)/jitlayers.h $(SRCDIR)/llvm-codegen-shared.h
$(BUILDDIR)/ast.o $(BUILDDIR)/ast.dbg.obj: $(BUILDDIR)/julia_flisp.boot.inc $(SRCDIR)/flisp/*.h
$(BUILDDIR)/builtins.o $(BUILDDIR)/builtins.dbg.obj: $(SRCDIR)/iddict.c $(SRCDIR)/builtin_proto.h
$(BUILDDIR)/codegen.o $(BUILDDIR)/codegen.dbg.obj: $(addprefix $(SRCDIR)/,\
intrinsics.cpp jitlayers.h debug-registry.h intrinsics.h llvm-codegen-shared.h cgutils.cpp ccall.cpp abi_*.cpp processor.h builtin_proto.h)
intrinsics.cpp jitlayers.h intrinsics.h llvm-codegen-shared.h cgutils.cpp ccall.cpp abi_*.cpp processor.h builtin_proto.h)
$(BUILDDIR)/datatype.o $(BUILDDIR)/datatype.dbg.obj: $(SRCDIR)/support/htable.h $(SRCDIR)/support/htable.inc
$(BUILDDIR)/debuginfo.o $(BUILDDIR)/debuginfo.dbg.obj: $(addprefix $(SRCDIR)/,debuginfo.h processor.h jitlayers.h debug-registry.h)
$(BUILDDIR)/disasm.o $(BUILDDIR)/disasm.dbg.obj: $(SRCDIR)/debuginfo.h $(SRCDIR)/processor.h
Expand All @@ -301,13 +301,13 @@ $(BUILDDIR)/gc-heap-snapshot.o $(BUILDDIR)/gc-heap-snapshot.dbg.obj: $(SRCDIR)/g
$(BUILDDIR)/gc-alloc-profiler.o $(BUILDDIR)/gc-alloc-profiler.dbg.obj: $(SRCDIR)/gc.h $(SRCDIR)/gc-alloc-profiler.h
$(BUILDDIR)/init.o $(BUILDDIR)/init.dbg.obj: $(SRCDIR)/builtin_proto.h
$(BUILDDIR)/interpreter.o $(BUILDDIR)/interpreter.dbg.obj: $(SRCDIR)/builtin_proto.h
$(BUILDDIR)/jitlayers.o $(BUILDDIR)/jitlayers.dbg.obj: $(SRCDIR)/jitlayers.h $(SRCDIR)/llvm-codegen-shared.h $(SRCDIR)/debug-registry.h
$(BUILDDIR)/jitlayers.o $(BUILDDIR)/jitlayers.dbg.obj: $(SRCDIR)/jitlayers.h $(SRCDIR)/llvm-codegen-shared.h
$(BUILDDIR)/jltypes.o $(BUILDDIR)/jltypes.dbg.obj: $(SRCDIR)/builtin_proto.h
$(build_shlibdir)/libllvmcalltest.$(SHLIB_EXT): $(SRCDIR)/llvm-codegen-shared.h $(BUILDDIR)/julia_version.h
$(BUILDDIR)/llvm-alloc-helpers.o $(BUILDDIR)/llvm-alloc-helpers.dbg.obj: $(SRCDIR)/llvm-codegen-shared.h $(SRCDIR)/llvm-pass-helpers.h $(SRCDIR)/llvm-alloc-helpers.h
$(BUILDDIR)/llvm-alloc-opt.o $(BUILDDIR)/llvm-alloc-opt.dbg.obj: $(SRCDIR)/llvm-codegen-shared.h $(SRCDIR)/llvm-pass-helpers.h $(SRCDIR)/llvm-alloc-helpers.h
$(BUILDDIR)/llvm-cpufeatures.o $(BUILDDIR)/llvm-cpufeatures.dbg.obj: $(SRCDIR)/jitlayers.h $(SRCDIR)/debug-registry.h
$(BUILDDIR)/llvm-demote-float16.o $(BUILDDIR)/llvm-demote-float16.dbg.obj: $(SRCDIR)/jitlayers.h $(SRCDIR)/debug-registry.h
$(BUILDDIR)/llvm-cpufeatures.o $(BUILDDIR)/llvm-cpufeatures.dbg.obj: $(SRCDIR)/jitlayers.h
$(BUILDDIR)/llvm-demote-float16.o $(BUILDDIR)/llvm-demote-float16.dbg.obj: $(SRCDIR)/jitlayers.h
$(BUILDDIR)/llvm-final-gc-lowering.o $(BUILDDIR)/llvm-final-gc-lowering.dbg.obj: $(SRCDIR)/llvm-pass-helpers.h $(SRCDIR)/llvm-codegen-shared.h
$(BUILDDIR)/llvm-gc-invariant-verifier.o $(BUILDDIR)/llvm-gc-invariant-verifier.dbg.obj: $(SRCDIR)/llvm-codegen-shared.h
$(BUILDDIR)/llvm-julia-licm.o $(BUILDDIR)/llvm-julia-licm.dbg.obj: $(SRCDIR)/llvm-codegen-shared.h $(SRCDIR)/llvm-alloc-helpers.h $(SRCDIR)/llvm-pass-helpers.h
Expand All @@ -323,7 +323,7 @@ $(BUILDDIR)/signal-handling.o $(BUILDDIR)/signal-handling.dbg.obj: $(addprefix $
$(BUILDDIR)/staticdata.o $(BUILDDIR)/staticdata.dbg.obj: $(SRCDIR)/staticdata_utils.c $(SRCDIR)/precompile_utils.c $(SRCDIR)/processor.h $(SRCDIR)/builtin_proto.h
$(BUILDDIR)/toplevel.o $(BUILDDIR)/toplevel.dbg.obj: $(SRCDIR)/builtin_proto.h
$(BUILDDIR)/ircode.o $(BUILDDIR)/ircode.dbg.obj: $(SRCDIR)/serialize.h
$(BUILDDIR)/pipeline.o $(BUILDDIR)/pipeline.dbg.obj: $(SRCDIR)/passes.h $(SRCDIR)/jitlayers.h $(SRCDIR)/debug-registry.h
$(BUILDDIR)/pipeline.o $(BUILDDIR)/pipeline.dbg.obj: $(SRCDIR)/passes.h $(SRCDIR)/jitlayers.h

$(addprefix $(BUILDDIR)/,threading.o threading.dbg.obj gc.o gc.dbg.obj init.c init.dbg.obj task.o task.dbg.obj): $(addprefix $(SRCDIR)/,threading.h)
$(addprefix $(BUILDDIR)/,APInt-C.o APInt-C.dbg.obj runtime_intrinsics.o runtime_intrinsics.dbg.obj): $(SRCDIR)/APInt-C.h
Expand Down Expand Up @@ -437,8 +437,14 @@ $(build_shlibdir)/lib%Plugin.$(SHLIB_EXT): $(SRCDIR)/clangsa/%.cpp $(LLVM_CONFIG
# before attempting this static analysis, so that all necessary headers
# and dependencies are properly installed:
# make -C src install-analysis-deps
ANALYSIS_DEPS := llvm clang llvm-tools libuv utf8proc
ifeq ($(OS),Darwin)
ANALYSIS_DEPS += llvmunwind
else ifneq ($(OS),WINNT)
ANALYSIS_DEPS += unwind
endif
install-analysis-deps:
$(MAKE) -C $(JULIAHOME)/deps install-llvm install-clang install-llvm-tools install-libuv install-utf8proc install-unwind
$(MAKE) -C $(JULIAHOME)/deps $(addprefix install-,$(ANALYSIS_DEPS))

analyzegc-deps-check: $(BUILDDIR)/julia_version.h $(BUILDDIR)/julia_flisp.boot.inc $(BUILDDIR)/jl_internal_funcs.inc
ifeq ($(USE_BINARYBUILDER_LLVM),0)
Expand Down
2 changes: 1 addition & 1 deletion src/codegen-stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ JL_DLLEXPORT int jl_compile_extern_c_fallback(LLVMOrcThreadSafeModuleRef llvmmod
return 0;
}

JL_DLLEXPORT void jl_teardown_codegen_fallback(void)
JL_DLLEXPORT void jl_teardown_codegen_fallback(void) JL_NOTSAFEPOINT
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8874,7 +8874,7 @@ extern "C" JL_DLLEXPORT void jl_init_codegen_impl(void)
init_jit_functions();
}

extern "C" JL_DLLEXPORT void jl_teardown_codegen_impl()
extern "C" JL_DLLEXPORT void jl_teardown_codegen_impl() JL_NOTSAFEPOINT
{
// output LLVM timings and statistics
reportAndResetTimings();
Expand Down
2 changes: 0 additions & 2 deletions src/debug-registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#include <llvm/IR/DataLayout.h>

#include "julia.h"
#include "julia_internal.h"
#include "processor.h"

#include <map>
#include <mutex>
Expand Down
4 changes: 3 additions & 1 deletion src/debuginfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ using namespace llvm;
#include <set>
#include <mutex>
#include "julia_assert.h"
#include "debug-registry.h"

static JITDebugInfoRegistry DebugRegistry;

static JITDebugInfoRegistry &getJITDebugRegistry() JL_NOTSAFEPOINT {
return jl_ExecutionEngine->getDebugInfoRegistry();
return DebugRegistry;
}

struct debug_link_info {
Expand Down
19 changes: 13 additions & 6 deletions src/dlload.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ const char *jl_crtdll_name = CRTDLL_BASENAME ".dll";

#define PATHBUF 4096

#define JL_RTLD(flags, FLAG) (flags & JL_RTLD_ ## FLAG ? RTLD_ ## FLAG : 0)

#ifdef _OS_WINDOWS_
void win32_formatmessage(DWORD code, char *reason, int len) JL_NOTSAFEPOINT
{
Expand Down Expand Up @@ -160,12 +158,21 @@ JL_DLLEXPORT void *jl_dlopen(const char *filename, unsigned flags) JL_NOTSAFEPOI
if (!len) return NULL;
WCHAR *wfilename = (WCHAR*)alloca(len * sizeof(WCHAR));
if (!MultiByteToWideChar(CP_UTF8, 0, filename, -1, wfilename, len)) return NULL;
HANDLE lib = LoadLibraryExW(wfilename, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
if (lib)
needsSymRefreshModuleList = 1;
HANDLE lib;
if (flags & JL_RTLD_NOLOAD) {
lib = GetModuleHandleW(wfilename);
}
else {
lib = LoadLibraryExW(wfilename, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
if (lib)
needsSymRefreshModuleList = 1;
}
return lib;
}
#else

#define JL_RTLD(flags, FLAG) (flags & JL_RTLD_ ## FLAG ? RTLD_ ## FLAG : 0)

JL_DLLEXPORT JL_NO_SANITIZE void *jl_dlopen(const char *filename, unsigned flags) JL_NOTSAFEPOINT
{
/* The sanitizers break RUNPATH use in dlopen for annoying reasons that are
Expand All @@ -186,7 +193,7 @@ JL_DLLEXPORT JL_NO_SANITIZE void *jl_dlopen(const char *filename, unsigned flags
dlclose(libdl_handle);
assert(dlopen);
}
// The real interceptors check the validty of the string here, but let's
// The real interceptors check the validity of the string here, but let's
// just skip that for the time being.
#endif
void *hnd = dlopen(filename,
Expand Down
2 changes: 1 addition & 1 deletion src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static _Atomic(int) support_conservative_marking = 0;
* threads that enters `jl_gc_collect()` at the same time (or later calling
* from unmanaged code) will wait in `jl_gc_collect()` until the GC is finished.
*
* Before starting the mark phase the GC thread calls `jl_safepoint_gc_start()`
* Before starting the mark phase the GC thread calls `jl_safepoint_start_gc()`
* and `jl_gc_wait_for_the_world()`
* to make sure all the thread are in a safe state for the GC. The function
* activates the safepoint and wait for all the threads to get ready for the
Expand Down
6 changes: 4 additions & 2 deletions src/gf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2320,21 +2320,23 @@ jl_value_t *jl_fptr_const_return(jl_value_t *f, jl_value_t **args, uint32_t narg

jl_value_t *jl_fptr_args(jl_value_t *f, jl_value_t **args, uint32_t nargs, jl_code_instance_t *m)
{
jl_fptr_args_t invoke = jl_atomic_load_relaxed(&m->specptr.fptr1);
while (1) {
jl_fptr_args_t invoke = jl_atomic_load_relaxed(&m->specptr.fptr1);
if (invoke)
return invoke(f, args, nargs);
invoke = jl_atomic_load_acquire(&m->specptr.fptr1); // require forward progress with acquire annotation
}
}

jl_value_t *jl_fptr_sparam(jl_value_t *f, jl_value_t **args, uint32_t nargs, jl_code_instance_t *m)
{
jl_svec_t *sparams = m->def->sparam_vals;
assert(sparams != jl_emptysvec);
jl_fptr_sparam_t invoke = jl_atomic_load_relaxed(&m->specptr.fptr3);
while (1) {
jl_fptr_sparam_t invoke = jl_atomic_load_relaxed(&m->specptr.fptr3);
if (invoke)
return invoke(f, args, nargs, sparams);
invoke = jl_atomic_load_acquire(&m->specptr.fptr3); // require forward progress with acquire annotation
}
}

Expand Down
82 changes: 50 additions & 32 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ static void jl_close_item_atexit(uv_handle_t *handle)

// This prevents `ct` from returning via error handlers or other unintentional
// means by destroying some old state before we start destroying that state in atexit hooks.
void jl_task_frame_noreturn(jl_task_t *ct);
void jl_task_frame_noreturn(jl_task_t *ct) JL_NOTSAFEPOINT;

// cause this process to exit with WEXITSTATUS(signo), after waiting to finish all julia, C, and C++ cleanup
JL_DLLEXPORT void jl_exit(int exitcode)
Expand Down Expand Up @@ -246,26 +246,26 @@ JL_DLLEXPORT void jl_atexit_hook(int exitcode) JL_NOTSAFEPOINT_ENTER

jl_task_t *ct = jl_get_current_task();

// we are about to start tearing everything down, so lets try not to get
// upset by the local mess of things when we run the user's _atexit hooks
if (ct)
if (ct) {
if (exitcode == 0)
jl_write_compiler_output();
// we are about to start tearing everything down, so lets try not to get
// upset by the local mess of things when we run the user's _atexit hooks
// this also forces us into a GC-unsafe region without a safepoint
jl_task_frame_noreturn(ct);
}

if (ct == NULL && jl_base_module)
ct = container_of(jl_adopt_thread(), jl_task_t, gcstack);
else if (ct != NULL)
jl_gc_safepoint_(ct->ptls);

if (exitcode == 0)
jl_write_compiler_output();
jl_print_gc_stats(JL_STDERR);
if (jl_options.code_coverage)
jl_write_coverage_data(jl_options.output_code_coverage);
if (jl_options.malloc_log)
jl_write_malloc_log();

int8_t old_state;
if (ct)
old_state = jl_gc_unsafe_enter(ct->ptls);

if (jl_base_module) {
jl_value_t *f = jl_get_global(jl_base_module, jl_symbol("_atexit"));
if (f != NULL) {
Expand Down Expand Up @@ -334,19 +334,25 @@ JL_DLLEXPORT void jl_atexit_hook(int exitcode) JL_NOTSAFEPOINT_ENTER
// force libuv to spin until everything has finished closing
loop->stop_flag = 0;
while (uv_run(loop, UV_RUN_DEFAULT)) { }
JL_UV_UNLOCK();
jl_wake_libuv(); // set the async pending flag, so that future calls are immediate no-ops on other threads
// we would like to guarantee this, but cannot currently, so there is still a small race window
// that needs to be fixed in libuv
}
if (ct)
(void)jl_gc_safe_enter(ct->ptls); // park in gc-safe
if (loop != NULL) {
// TODO: consider uv_loop_close(loop) here, before shutdown?
uv_library_shutdown();
// no JL_UV_UNLOCK(), since it is now torn down
}

// TODO: Destroy threads
// TODO: Destroy threads?

jl_destroy_timing();
jl_destroy_timing(); // cleans up the current timing_stack for noreturn
#ifdef ENABLE_TIMINGS
jl_print_timings();
#endif

jl_teardown_codegen();
if (ct)
jl_gc_unsafe_leave(ct->ptls, old_state);
jl_teardown_codegen(); // prints stats
}

JL_DLLEXPORT void jl_postoutput_hook(void)
Expand Down Expand Up @@ -713,13 +719,32 @@ JL_DLLEXPORT int jl_default_debug_info_kind;

JL_DLLEXPORT void julia_init(JL_IMAGE_SEARCH rel)
{
jl_default_debug_info_kind = 0;

// initialize many things, in no particular order
// but generally running from simple platform things to optional
// configuration features
jl_init_timing();
// Make sure we finalize the tls callback before starting any threads.
(void)jl_get_pgcstack();
jl_safepoint_init();

// initialize backtraces
jl_init_profile_lock();
#ifdef _OS_WINDOWS_
uv_mutex_init(&jl_in_stackwalk);
SymSetOptions(SYMOPT_UNDNAME | SYMOPT_DEFERRED_LOADS | SYMOPT_LOAD_LINES | SYMOPT_IGNORE_CVREC);
if (!SymInitialize(GetCurrentProcess(), "", 1)) {
jl_safe_printf("WARNING: failed to initialize stack walk info\n");
}
needsSymRefreshModuleList = 0;
#else
// nongnu libunwind initialization is only threadsafe on architecture where the
// author could access TSAN, per https://github.com/libunwind/libunwind/pull/109
// so we need to do this once early (before threads)
rec_backtrace(NULL, 0, 0);
#endif

libsupport_init();
jl_safepoint_init();
jl_page_size = jl_getpagesize();
htable_new(&jl_current_modules, 0);
JL_MUTEX_INIT(&jl_modules_mutex);
jl_precompile_toplevel_module = NULL;
Expand All @@ -732,7 +757,6 @@ JL_DLLEXPORT void julia_init(JL_IMAGE_SEARCH rel)
restore_signals();
jl_init_intrinsic_properties();

jl_page_size = jl_getpagesize();
jl_prep_sanitizers();
void *stack_lo, *stack_hi;
jl_init_stack_limits(1, &stack_lo, &stack_hi);
Expand All @@ -746,17 +770,12 @@ JL_DLLEXPORT void julia_init(JL_IMAGE_SEARCH rel)
(HMODULE*)&jl_libjulia_handle)) {
jl_error("could not load base module");
}
jl_ntdll_handle = jl_dlopen("ntdll.dll", 0); // bypass julia's pathchecking for system dlls
jl_kernel32_handle = jl_dlopen("kernel32.dll", 0);
jl_crtdll_handle = jl_dlopen(jl_crtdll_name, 0);
jl_winsock_handle = jl_dlopen("ws2_32.dll", 0);
uv_mutex_init(&jl_in_stackwalk);
SymSetOptions(SYMOPT_UNDNAME | SYMOPT_DEFERRED_LOADS | SYMOPT_LOAD_LINES | SYMOPT_IGNORE_CVREC);
if (!SymInitialize(GetCurrentProcess(), "", 1)) {
jl_printf(JL_STDERR, "WARNING: failed to initialize stack walk info\n");
}
jl_ntdll_handle = jl_dlopen("ntdll.dll", JL_RTLD_NOLOAD); // bypass julia's pathchecking for system dlls
jl_kernel32_handle = jl_dlopen("kernel32.dll", JL_RTLD_NOLOAD);
jl_crtdll_handle = jl_dlopen(jl_crtdll_name, JL_RTLD_NOLOAD);
jl_winsock_handle = jl_dlopen("ws2_32.dll", JL_RTLD_NOLOAD);
HMODULE jl_dbghelp = (HMODULE) jl_dlopen("dbghelp.dll", JL_RTLD_NOLOAD);
needsSymRefreshModuleList = 0;
HMODULE jl_dbghelp = (HMODULE) jl_dlopen("dbghelp.dll", 0);
if (jl_dbghelp)
jl_dlsym(jl_dbghelp, "SymRefreshModuleList", (void **)&hSymRefreshModuleList, 1);
#else
Expand All @@ -774,7 +793,6 @@ JL_DLLEXPORT void julia_init(JL_IMAGE_SEARCH rel)
}

jl_init_rand();
jl_init_profile_lock();
jl_init_runtime_ccall();
jl_init_tasks();
jl_init_threading();
Expand Down
9 changes: 2 additions & 7 deletions src/jitlayers.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

#include <llvm/Target/TargetMachine.h>
#include "julia_assert.h"
#include "debug-registry.h"
#include "julia.h"
#include "julia_internal.h"
#include "platform.h"

#include <stack>
Expand Down Expand Up @@ -487,10 +488,6 @@ class JuliaOJIT {

size_t getTotalBytes() const JL_NOTSAFEPOINT;

JITDebugInfoRegistry &getDebugInfoRegistry() JL_NOTSAFEPOINT {
return DebugRegistry;
}

jl_locked_stream &get_dump_emitted_mi_name_stream() JL_NOTSAFEPOINT {
return dump_emitted_mi_name_stream;
}
Expand All @@ -512,8 +509,6 @@ class JuliaOJIT {
orc::JITDylib &GlobalJD;
orc::JITDylib &JD;

JITDebugInfoRegistry DebugRegistry;

//Map and inc are guarded by RLST_mutex
std::mutex RLST_mutex{};
int RLST_inc = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -2065,7 +2065,7 @@ typedef int jl_uv_os_fd_t;

JL_DLLEXPORT int jl_process_events(void);

JL_DLLEXPORT struct uv_loop_s *jl_global_event_loop(void);
JL_DLLEXPORT struct uv_loop_s *jl_global_event_loop(void) JL_NOTSAFEPOINT;

JL_DLLEXPORT void jl_close_uv(struct uv_handle_s *handle);

Expand Down
4 changes: 2 additions & 2 deletions src/julia_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ void jl_init_thread_heap(jl_ptls_t ptls) JL_NOTSAFEPOINT;
void jl_init_int32_int64_cache(void);
JL_DLLEXPORT void jl_init_options(void);

void jl_teardown_codegen(void);
void jl_teardown_codegen(void) JL_NOTSAFEPOINT;

void jl_set_base_ctx(char *__stk);

Expand Down Expand Up @@ -920,7 +920,7 @@ void jl_safepoint_defer_sigint(void);
// Return `1` if the sigint should be delivered and `0` if there's no sigint
// to be delivered.
int jl_safepoint_consume_sigint(void);
void jl_wake_libuv(void);
void jl_wake_libuv(void) JL_NOTSAFEPOINT;

void jl_set_pgcstack(jl_gcframe_t **) JL_NOTSAFEPOINT;
#if defined(_OS_DARWIN_)
Expand Down
Loading

0 comments on commit 428d242

Please sign in to comment.