bytecodealliance / bytecodealliance/regalloc2
Make regalloc2 panic-clean: always return errors when impossible constraints occur
未關閉
- 主要語言
- 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 對不可能約束的處理,尤其是在要求兩個運算元共用同一個 PReg 時,並找出涉及的 panic!() 或 assert!() 路徑。沿著 allocator 的公開錯誤回傳路徑處理,讓這些情況成為回傳的錯誤,接著為衝突的 PReg 約束新增覆蓋,並確認 allocation 不再發生 panic。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- rust
- 領域
- compilers
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100