Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#675 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
67/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
julia
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Julia
スター
234
フォーク
77
平均マージ
1日 5時間
マージ済み PR(30日)
10

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SciML/RecursiveArrayTools.jl のほかの issue

SciML/RecursiveArrayTools.jl の issue をすべて見る

似ている issue

Julia の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。