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

Đang mở
#15,278 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
40/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
compilers

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Rust
Star
18.9k
Fork
2k
Merge trung bình
1 ngày 6 giờ
Pull request đã merge (30 ngày)
238

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bytecodealliance/wasmtime

Tất cả issue của bytecodealliance/wasmtime

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.