-
-
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
Backport fix for what may be a memory-alignment issue? #34231
Comments
#33706 perhaps? |
I'm not familiar with LLVM, so I'm not sure #33706 is exactly what we are looking for. julia/test/compiler/codegen.jl Lines 422 to 428 in 53ba0cc
Also, FWIW, the following is a minimal code without Images.jl. julia> Float64[ifelse(i > 1, 2//3, -1.0) for i=1:2] # v1.3.1 (or v1.3.0)
2-element Array{Float64,1}:
-1.0
0.6666666666666666 julia> Float64[ifelse(i > 1, 2//3, -1.0) for i=1:2] # v1.0.5 (the result depends on the uninitialized stack)
2-element Array{Float64,1}:
-1.0
0.9976410051612077 |
Array assignment isn't necessary to get strange behavior: julia> for i = 1:2 # julia1.2
display(ifelse(i > 1, 1//3, -1.0))
end
-1.0
1//140412727051408 |
You are right. I just thought it would be better not to depend on Images.jl, if someone runs the bisect. There are no further implications. 😄 |
The buggy display behavior seems to happen in Julia 1.0.5 as well |
I tried applying #33706 to |
It might be a good idea to resolve it as a part of #34011. |
Looks like it has been long enough that a backport is presumably no longer relevant. Can confirm we're still getting the correct behaviour nowadays on 1.8.3:
|
Does anyone happen to know which PR likely fixed this, and whether it's backportable? I can do a bisect if it would be helpful.
Buggy result (at least julia 1.0.5 and julia 1.2.0, maybe others):
Correct result (at least 1.3.1 and
master
, maybe others):xref JuliaImages/Images.jl#814
The text was updated successfully, but these errors were encountered: