bytecodealliance / bytecodealliance/regalloc2

Make regalloc2 panic-clean: always return errors when impossible constraints occur

オープン
#2 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
265
フォーク
53
PR マージ指標
30日以内にマージされた PR はありません

説明

Right now, the allocator can panic if the client provides impossible constraints, such as requiring two different operands to be placed in the same `PReg`.

While this represents a programming error in the client and *shouldn't* arise from an invalid input program, it is always better to bubble up errors; we should reserve `panic!()` and `assert!()` for conditions that can only be violated due to errors in regalloc2 itself.

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

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず、allocator が不可能な制約をどのように処理しているか、特に 2 つのオペランドが同じ PReg を共有する必要がある場合を追跡し、関係する panic!() または assert!() のパスを特定します。allocator の公開されているエラー返却パスをたどり、これらのケースが返されたエラーになるようにしてから、競合する PReg 制約のカバレッジを追加し、allocation がパニックしなくなったことを確認します。

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

評価

技術スタック
rust
領域
compilers
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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