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

atomic ops unsafe, but unclear why

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
ドキュメント
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
rust

調査の方向性

crates/spirv-std/src/arch/atomics.rs から始め、unsafe 関数と安全性のドキュメントに関する関連議論について issue #382 を読んでください。SPIR-V/Vulkan メモリモデルにおいて、アトミック操作が呼び出し側によって管理される不変条件を必要とするかどうかを判断してください。完了とは、関数ドキュメントで安全性要件を明確化するか、unsafe マーカーを変更すべきであることを確認することです。

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

説明

enhancement

this is basically a follow up to issue #382, where @nazar-pc said:

"""
Functions like workgroup_memory_barrier_with_group_sync() are unsafe, but it is not clear why (no "Safety" section in docs).

They should either not be unsafe or "Safety" section should be added to corresponding function docs explaining how to use them safely.
"""

Similar concern with the files in e.g. crates/spirv-std/src/arch/atomics.rs -- all of the atomic ops seem to be marked as unsafe. I don't understand the spir-v / Vulkan / whatevs memory model... like... at all... but I always thought atomic ops like these were specifically designed to provide a safe way to update memory that might be touched by multiple threads? If this is not the case, then as @nazar-pc suggested re barriers, a comment saying how to uphold any invariants required for safety would be a big help! Thanks!! :-)

主要言語
Rust
スター
3.4k
フォーク
126
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

Rust-GPU/rust-gpu のほかの issue

Rust-GPU/rust-gpu の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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