Cranelift: inlining `interrupt_poll` into a non-`tail` caller fails verification

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
40/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
compilers

調査の方向性

Start by running the attached inline.clif reproduction with clif-util test inline to see the verifier error after inlining. The payload names no source files, so the first step is locating where the interrupt_poll requires-tail check lives in the verifier and where inlining transfers calling conventions. Done means the inlined case either verifies or is rejected with a clear reason, and the reproduction passes its test.

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

説明

bug cranelift

This input:

test inline
target x86_64

function %poll_callee(i64, i64, i64) -> i64 tail {
block0(v0: i64, v1: i64, v2: i64):
    v4 = interrupt_poll v1, v2, user3
    return v4
}

function %poll_caller(i64, i64, i64) -> i64 system_v {
    fn0 = %poll_callee(i64, i64, i64) -> i64 tail
block0(v0: i64, v1: i64, v2: i64):
    v4 = call fn0(v0, v1, v2)
    return v4
}

fails with:

$ clif-util test inline.clif
FAIL inline.clif: inline

Caused by:
    0: CLIF verification error after inlining
    ...
       ; error: inst2 (v6 = interrupt_poll.i64 v1, v2, user3): `interrupt_poll` requires the `tail` calling convention
主要言語
Rust
スター
18.9k
フォーク
2k
平均マージ
1日 6時間
マージ済み PR(30日)
238

環境構築

はじめの一歩

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

bytecodealliance/wasmtime のほかの issue

bytecodealliance/wasmtime の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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