Audit append calls that use shared/caller-supplied slices.

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
go
領域
testing

調査の方向性

Goコードベース全体を検索して、呼び出し元から提供されたスライスを扱う append 呼び出しを見つけ、各箇所を調査して呼び出し元の基盤配列とのエイリアシングの可能性を確認します。すべての該当箇所に対処するか安全であることを確認し、テストスイートがパスすれば監査は完了です。

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

説明

bug

This is about auditing the entire code base to ensure that no caller-supplied slices are being appended to.

This was a common source of bugs from me when I first started developing in Go. It is problematic because the caller may supply a slice that refers to a sub-section of an array that they are still using in full. If we append to that sub-slice it clobbers elements in the underlying array.

The solution is to first duplicate caller-supplied slices if we need to append. It's possible that there are no such occurrences in this repo.

主要言語
Go
スター
1
フォーク
1
平均マージ
18分
マージ済み PR(30日)
7

環境構築

はじめの一歩

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

dogmatiq/testkit のほかの issue

dogmatiq/testkit の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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