-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
sizeof
returns erroneous results for Union arrays
#23321
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
Comments
Caused by #22441 ? |
Likely, I think |
Yeah, there's a few places I need to update |
This one looks like codegen.cpp:2726. That assumes an array element type stored unboxed is a |
Ensure sizeof returns correctly for isbits Union arrays. Fixes #23321
since we're defining |
Can this be closed? #38126 julia> sizeof(Vector{Union{Tuple{UInt8,UInt16}}}(undef,8))
32
julia> sizeof(Vector{Tuple{Union{UInt8,UInt16}}}(undef,4))
32 |
|
Based on multiple Julia sessions, the number appears to be some random integer multiplied by the length of the array. A fresh Julia session is more likely to result in 0 so it seems like it's probably accessing the wrong memory somewhere.
The text was updated successfully, but these errors were encountered: