Does our union value model correctly account for `bool` in repr(C) unions?

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
15/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
活発
技術スタック
rust
領域
documentation

調査の方向性

This is an open question about the guidelines' value model, not a scoped change: the issue asks @chorman0773 for a concrete example before anything can be decided. Start by reading the chapters on unions and validity in the unsafe-code-guidelines book to see what the current model says about the byte holding a bool, and follow the thread for the example. Done means the discussion reaches a decision on whether the model or its wording changes.

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

説明

@chorman0773 mentioned in a meeting today that our value model for repr(C) unions may be wrong: when passed over an ABI boundary, only the actual bit of the bool may be preserved, when our value model says that the entire byte holding the bool should be preserved.

@chorman0773 do you have an example of this being a problem in practice?

主要言語
言語のデータがありません
スター
760
フォーク
68
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

rust-lang/unsafe-code-guidelines のほかの issue

rust-lang/unsafe-code-guidelines の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

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

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