Zero-length stream copies within one component instance trap for non-numeric payloads
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 領域
- compilers
調査の方向性
Start with the linked canonical ABI definition and compare its non-numeric payload trap condition with the zero-length stream read in the WAST example. Reproduce the case with Wasmtime and determine whether the implementation or the specification needs an update; done means the behavior and expected test result are resolved.
索引モデルが issue の本文から書いたものです。
説明
This test:
;; With a write pending on a `stream<string>`, a zero-length read from the
;; same component instance copies nothing and returns COMPLETED(0).
(component
(core module $libc
(memory (export "memory") 1)
(func (export "realloc") (param i32 i32 i32 i32) (result i32) unreachable))
(core instance $libc (instantiate $libc))
(type $stream (stream string))
(core func $stream.new (canon stream.new $stream))
(core func $stream.read (canon stream.read $stream async
(memory (core memory $libc "memory")) (realloc (core func $libc "realloc"))))
(core func $stream.write (canon stream.write $stream async
(memory (core memory $libc "memory"))))
(core module $m
(import "" "stream.new" (func $stream.new (result i64)))
(import "" "stream.read" (func $stream.read (param i32 i32 i32) (result i32)))
(import "" "stream.write" (func $stream.write (param i32 i32 i32) (result i32)))
(func (export "run") (result i32)
(local $pair i64)
(local.set $pair (call $stream.new))
(if (i32.ne (i32.const -1) ;; BLOCKED
(call $stream.write
(i32.wrap_i64 (i64.shr_u (local.get $pair) (i64.const 32)))
(i32.const 0) (i32.const 1)))
(then unreachable))
(call $stream.read (i32.wrap_i64 (local.get $pair)) (i32.const 0) (i32.const 0)))
)
(core instance $i (instantiate $m (with "" (instance
(export "stream.new" (func $stream.new))
(export "stream.read" (func $stream.read))
(export "stream.write" (func $stream.write))))))
(func (export "run") async (result u32) (canon lift (core func $i "run")))
)
(assert_return (invoke "run") (u32.const 0)) ;; COMPLETED(0)
fails in Wasmtime with:
$ wasmtime wast foo.wast
Error: failed to run script file 'foo.wast'
Caused by:
0: failed directive on foo.wast:39
1: error while executing at wasm backtrace:
0: 0x282 - wasm-function[3]
at foo.wast:29:8
2: cannot read from and write to intra-component future/stream with non-numeric payload
but the spec indicates that this test should pass right now as the trap is gated on non-zero-length buffers.
I wanted to flag this as a possible update to the specification (similar to https://github.com/WebAssembly/component-model/issues/750 perhaps) where subjectively I'd expect this to unconditionally fail regardless of the lengths in play, but I may also be showing my biases from #750 too.
- 主要言語
- WebAssembly
- スター
- 1.4k
- フォーク
- 132
- 平均マージ
- 4日 14時間
- マージ済み PR(30日)
- 12
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
WebAssembly/component-model のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
WebAssembly/component-model#609 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 4 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
WebAssembly/component-model#752 · コメント 13 件 · リアクション 1 件 ·
メンテナーはふだん 4 日以内に返信
-
Does `task.return`'s memory strictly match the canon-lifted function, or only match when present?オープン
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
WebAssembly/component-model#749 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
WebAssembly/component-model#743 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
WebAssembly/component-model#742 · コメント 1 件 · リアクション 3 件 ·
メンテナーはふだん 4 日以内に返信
WebAssembly/component-model の issue をすべて見る
似ている issue
-
A match arm above the largest i64 is compared as 0対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
paradigmxyz/solar#2436 ·
メンテナーはふだん 1 日以内に返信
-
bug bulk-filed needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 2 日以内に返信
-
area:codegen backend:slang bug direction:output
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 87/100
gleam-lang/gleam#6491 ·
メンテナーはふだん 1 日以内に返信