Skip to content
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

Merged
merged 5 commits into from
Oct 3, 2022
Merged

remove svec(#null) from the language #46975

merged 5 commits into from
Oct 3, 2022

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Sep 29, 2022

This was not supported, and almost never used, so audit all places it could happen and avoid it at the source.

Fix #46784

This was not supported, and almost never used, so audit all places it
could happen and avoid it at the source.

Fix #46784
base/essentials.jl Outdated Show resolved Hide resolved
test/core.jl Outdated Show resolved Hide resolved
for (i = 0; i < sz; i++) {
assert(jl_is_unionall(ub));
// TODO: assert(env[i] != NULL);
if (env[i] == NULL)
Copy link
Member

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?

Copy link
Member Author

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]>
test/core.jl Outdated Show resolved Hide resolved
base/essentials.jl Outdated Show resolved Hide resolved
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
Copy link
Member Author

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?

@vtjnash vtjnash merged commit 33afb81 into master Oct 3, 2022
@vtjnash vtjnash deleted the jn/46784 branch October 3, 2022 19:10
vtjnash added a commit that referenced this pull request Dec 5, 2023
aviatesk pushed a commit that referenced this pull request Dec 6, 2023
aviatesk pushed a commit that referenced this pull request Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Core._apply segfaults on svec(#undef)
4 participants