Description
If the runtime errors out early on in the bringup process, we can end up attempting to construct a backtrace and failing due to data structures not having been initialized yet. A historical example (which I am about to replace with jl_printf()
and exit()
):
Line 823 in ef7498d
Because jl_errorf
unconditionally subs off to jl_throw
, we end up attempting to construct a backtrace. jl_error
, in contrast, contains a guarding if
statement, however it too fails in this case, as we are far enough to have initialized jl_errorexception_type
as a tag from the system image, but not far enough yet to have fully initialized LLVM.
We should have some way of denoting to the rest of the runtime that LLVM is initialized. Jeff recommended that we:
Maybe we should have
jl_init_llvm
handle filling in the libjulia-codegen function pointers, so the system just behaves as if codegen is not available before it's initialized?