Spec interpreter/implementation discrepancy - a local with an invalid type and 0 count
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- wasm
- 領域
- compilers
調査の方向性
Start with the linked code-section specification and the reference interpreter, then reproduce the behavior using foo.wasm and compare it with V8, SpiderMonkey, and Wasmtime. Determine whether a zero-count local's type should be validated or discarded, and document the agreed specification or implementation outcome.
索引モデルが issue の本文から書いたものです。
説明
My understanding of the definition of the code section in the online specification is that if an entry in locals has n=0 count that it's discarded and not represented in the AST of a module. This means that the corresponding local's type is parsed, but not validated. The reference interpreter implements this behavior and for this input:
(module binary
"\00asm\01\00\00\00"
"\01\04\01\60\00\00" ;; Type section: 1 type
"\03\02\01\00" ;; Function section: 1 function
"\0a\07" ;; code section, 7 bytes
"\01" ;; 1 function body
"\05" ;; body size, 5 bytes
"\01" ;; 1 locals entry
"\00" ;; count: 0
"\63\01" ;; type: (ref null 1) -- not a valid type index
"\0b" ;; end
)
the spec interpreter passes. This same module (foo.wasm) does not validate in V8, SpiderMonkey, or Wasmtime, however. These engines all validate the local's type and reject the module saying that it's out-of-bounds.
I wanted to raise this as an issue to see if others have thoughts about this. I don't have a preference for how exactly to go here myself.
- 主要言語
- WebAssembly
- スター
- 3.5k
- フォーク
- 539
- 平均マージ
- 10時間 24分
- マージ済み PR(30日)
- 11
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
WebAssembly/spec のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
WebAssembly/spec#2265 ·
メンテナーはふだん 1 日以内に返信
-
[js-api] A mutable global import allocates a const global before LinkError対応中かも @chicoxyzzy が 2 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
WebAssembly/spec#2253 ·
メンテナーはふだん 1 日以内に返信
-
[spectec] Wasm 1.0: `$instantiate` missing premises対応中かも @rossberg が 28 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
WebAssembly/spec#2245 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
WebAssembly/spec#2235 · コメント 9 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
WebAssembly/spec#2196 ·
メンテナーはふだん 1 日以内に返信
WebAssembly/spec の issue をすべて見る
似ている issue
-
Discover carries headerEdges that nothing reads since #1914 moved E0507/E0517 to the compiler graphオープンtech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
VX_PRINT_DROPS prints each drop point twice on the default code generator, the second time at line 0オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Bisect issue229646オープンbisect
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
dtcxzyw/llvm-bisect-service#418 · コメント 1 件 ·
-
area:prove bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Chelis-Lang/chelis#3317 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
leanprover/lean4#15529 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信