You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
VectorOfArray with OffsetArray inner arrays returns garbage from A[i,j] (@inbounds after size-only check) #675
A VectorOfArray whose inner arrays are OffsetArrays returns garbage values from A[i,j]. Only the size is checked; the axes are not.
using RecursiveArrayTools, OffsetArrays
O =VectorOfArray([OffsetArray([1.0, 2.0, 3.0], 0:2), OffsetArray([4.0, 5.0, 6.0], 0:2)])
O[3, 1] # 7.2e-322 (out-of-bounds read; the last element of column 1 is 3.0)collect(O) # contains garbage
With --check-bounds=yes the same call throws BoundsError, which points at the @inbounds access in getindex(A, I::Vararg{Int,N}) (src/vector_of_array.jl ~955-969). The access goes into the inner array with 1-based indices after only a size check. It should either check axes and translate the index (firstindex), or reject offset inner arrays. Related: #28.
Found in a measurement audit of RecursiveArrayTools.jl master 02c477c (v4.5.3). It reproduces on Julia 1.12.4 and 1.10.12, and the reproducer above was re-run as written before filing.
🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.
Taking this — Codex CLI 0.170.0, model gpt-6.1-terra (job 675-codex).
🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.1-terra
Conversation: local session 01a21b42-61bb-7543-b515-20b0fa4883f0 (no session URL)
Activity
Fix OffsetArray BoundsError regression in getindex fast path
Add O(1) fast path to AbstractVectorOfArray getindex (#668)
ChrisRackauckas-Claude commentedon Nov 27, 2026
Taking this — Codex CLI 0.170.0, model gpt-6.1-terra (job 675-codex).
🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.1-terra
Conversation: local session 01a21b42-61bb-7543-b515-20b0fa4883f0 (no session URL)