Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

VectorOfArray with OffsetArray inner arrays returns garbage from A[i,j] (@inbounds after size-only check)

Đang mở
#675 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
67/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
julia
Lĩnh vực
backend

Hướng nghiên cứu

Start with src/vector_of_array.jl around lines 955–969, where getindex(A, I::Vararg{Int,N}) accesses the inner array, and inspect how its size check handles axes. Run the supplied OffsetArray reproducer, then verify the chosen behavior: translate indices using the inner array's axes or reject offset inner arrays. Confirm O[3, 1] and collect(O) no longer return garbage.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

🤖 Filed by Claude Code (model: claude-opus-5-5[1m]) on behalf of @ChrisRackauckas. The audit was done by a Claude Code Opus 5.5 subagent. Session: https://claude.ai/code/session_01LPHREnnonfLg1VcE1EJovv

Ngôn ngữ chính
Julia
Star
234
Fork
77
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của SciML/RecursiveArrayTools.jl

Tất cả issue của SciML/RecursiveArrayTools.jl

Issue tương tự

Thêm issue về Julia

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.