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

[spectec] SpecTec interpreter: array.new_data and array.init_data fail on arrays of v128

オープン 初心者向け
#2,285 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

@rossberg がすでに取り組んでいます。

2026年10月21日 から。

  • #2293 @rossberg による — オープン

評価

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

調査の方向性

SpecTec インタープリターの inv_zbytes から始め、ベクトル値の処理を、すでに V128 を inv_vbytes に振り分ける inv_cbytes と比較してください。提供されたモジュールを使って spectec specification/wasm-3.0/*.spectec --interpreter を実行してください。array.new_data と array.init_data の両方が ArgMismatch を発生させずに期待されるレーン値を返せば完了です。

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

説明

(module
  (type $av (array (mut v128)))
  (data $d "\00\01\02\03\04\05\06\07\08\09\0a\0b\0c\0d\0e\0f")
  (func (export "new") (result i32)
    (i32x4.extract_lane 3 (array.get $av (array.new_data $av $d (i32.const 0) (i32.const 1)) (i32.const 0))))
  (func (export "init") (result i32)
    (local $x (ref $av))
    (local.set $x (array.new_default $av (i32.const 1)))
    (array.init_data $av $d (local.get $x) (i32.const 0) (i32.const 0) (i32.const 1))
    (i32x4.extract_lane 1 (array.get $av (local.get $x) (i32.const 0)))))
(assert_return (invoke "new") (i32.const 0x0f0e0d0c))
(assert_return (invoke "init") (i32.const 0x07060504))

The reference interpreter passes. spectec specification/wasm-3.0/*.spectec --interpreter fails both:

$ARRAY.NEW_DATA: Backend_interpreter.Exception.ArgMismatch("inv_nbytes: [V128, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]]")

array.new_data-num and array.init_data-num decode the segment with $zbytes_(zt, c). In the interpreter, inv_zbytes handles I8 and I16 and passes everything else to inv_nbytes, which has no V128 case. inv_cbytes already sends V128 to inv_vbytes; inv_zbytes needs the same case.

Tested at 340650f.

主要言語
WebAssembly
スター
3.5k
フォーク
540
平均マージ
1日 4時間
マージ済み PR(30日)
19

環境構築

はじめの一歩

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

WebAssembly/spec のほかの issue

WebAssembly/spec の issue をすべて見る

似ている issue

Testing & QA の issue をもっと見る

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

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