Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[spectec] Wasm 1.0: CVTOP typing accepts illegal conversion/operator combinations

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

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

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

評価

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

調査の方向性

Start with the CVTOP typing rules in specification/wasm-1.0/6-typing.spectec and the syntax rule in specification/wasm-1.0/1-syntax.spectec. Compare the accepted combinations with the instruction forms listed in the issue's WebAssembly 1.0 PDF excerpt. Done means the rules reject illegal conversion and reinterpret combinations while accepting the listed legal forms; the issue does not name a test file.

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

説明

The Wasm 1.0 SpecTec conversion typing rules accept arbitrary combinations of source type, destination type, and conversion operator.

In specification/wasm-1.0/6-typing.spectec:

;; TODO: move side conditions to syntax
rule Instr_ok/cvtop-reinterpret:
  C |- CVTOP nt_1 nt_2 REINTERPRET : nt_2 -> nt_1
  -- if $size(nt_1) = $size(nt_2)

rule Instr_ok/cvtop-convert:
  C |- CVTOP nt_1 nt_2 cvtop : nt_2 -> nt_1

The second rule admits every cvtop, including REINTERPRET, so it also bypasses the first rule’s check.

The syntax rule only requires distinct source and destination types:

| CVTOP valtype_1 valtype_2 cvtop
    hint(show %1.%3#_#%2)
  -- if valtype_1 =/= valtype_2

The PDF (2.4.1) restricts those combinations through syntax:

nn, mm ::= 32 | 64
sx     ::= u | s

instr ::= ...
        | i32.wrap_i64
        | i64.extend_i32_sx
        | inn.trunc_fmm_sx
        | f32.demote_f64
        | f64.promote_f32
        | fnn.convert_imm_sx
        | inn.reinterpret_fnn
        | fnn.reinterpret_inn
主要言語
WebAssembly
スター
3.5k
フォーク
540
平均マージ
23時間 36分
マージ済み PR(30日)
26

環境構築

はじめの一歩

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

WebAssembly/spec のほかの issue

WebAssembly/spec の issue をすべて見る

似ている issue

Compilers の issue をもっと見る

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

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