-
-
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
remove svec(#null) from the language #46975
Conversation
This was not supported, and almost never used, so audit all places it could happen and avoid it at the source. Fix #46784
for (i = 0; i < sz; i++) { | ||
assert(jl_is_unionall(ub)); | ||
// TODO: assert(env[i] != NULL); | ||
if (env[i] == NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to put this before/during assigning to the svec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uncertain, since if this ever happens, it is because intersection/subtyping made a mistake. This is just there to avoid that mistake causing Julia to crash.
Co-authored-by: Keno Fischer <[email protected]>
return ccall(:jl_svec_len, Int, (Any,), v) | ||
t = @_gc_preserve_begin v | ||
len = unsafe_load(Ptr{Int}(pointer_from_objref(v))) | ||
@_gc_preserve_end t |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Keno is our inlining smart enough to insert this _gc_preserve_end
automatically when required?
This was not supported, and almost never used, so audit all places it could happen and avoid it at the source.
Fix #46784