-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jl_error() and jl_errorf() unsafe to call if LLVM not fully initialized #45847
Labels
bug
Indicates an unexpected problem or unintended behavior
Comments
There's a couple options, the first thing is to just not call |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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()
andexit()
):julia/src/jitlayers.cpp
Line 823 in ef7498d
Because
jl_errorf
unconditionally subs off tojl_throw
, we end up attempting to construct a backtrace.jl_error
, in contrast, contains a guardingif
statement, however it too fails in this case, as we are far enough to have initializedjl_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:
The text was updated successfully, but these errors were encountered: