-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorregression 1.12Regression in the 1.12 releaseRegression in the 1.12 releasesystem:32-bitAffects only 32-bit systemsAffects only 32-bit systems
Description
This code crashes the repl on Julia +1.12.0-beta4~x86, but not on 1.11 nor 64-bit 1.12.
struct PtrArray{T, N} <: DenseArray{T, N}
ptr::Ptr{T}
size::NTuple{N, Int}
end
Base.size(p::PtrArray) = p.size
Base.IndexStyle(::Type{<:PtrArray}) = IndexLinear()
function Base.getindex(p::PtrArray, i::Int)
@boundscheck checkbounds(p, i)
unsafe_load(p.ptr, i)
end
function Base.setindex!(p::PtrArray, v, i::Int)
@boundscheck checkbounds(p, i)
unsafe_store!(p.ptr, v, i)
p
end
function f(res)
sm2 = sum(res)
for (i,x) in enumerate(res)
val = div(UInt128(x) << 64, sm2) % UInt64
res[i] = val
end
end
backing = UInt64[10, 73]
GC.@preserve backing begin
res = PtrArray{UInt64, 1}(pointer(backing), (2,))
f(res)
end
JIT session error: Symbols not found: [ __udivti3 ]
This example is extracted from a real failure in AliasTables.jl
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorregression 1.12Regression in the 1.12 releaseRegression in the 1.12 releasesystem:32-bitAffects only 32-bit systemsAffects only 32-bit systems