`wasmtime wast` ignores `-W max-memory-size` and other store limits
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 75/100
調査の方向性
Read src/commands/wast.rs and trace how each store is configured through CommonOptions::configure_store; compare it with RunCommon::store_limits and the wasmtime run behavior described in the issue. Check existing WAST tests for store limits and add coverage for memory and table limits. Done when wasmtime wast applies the configured limits or clearly rejects unsupported limit options, without silently allowing growth.
索引モデルが issue の本文から書いたものです。
説明
Test Case
limit.wast:
(module
(memory 1)
(func (export "grow") (param i32) (result i32) (memory.grow (local.get 0))))
(assert_return (invoke "grow" (i32.const 10)) (i32.const -1))
Steps to Reproduce
wasmtime wast -W max-memory-size=65536 limit.wast- For comparison, the same module (the first three lines saved as
limit.wat):wasmtime run -W max-memory-size=65536 --invoke grow limit.wat 10
Expected Results
The script passes: growing to 11 pages exceeds the 64 KiB limit, so memory.grow returns -1, as it does under wasmtime run, which prints -1.
Actual Results
result 0 didn't match
expected -1 / 0x00000000ffffffff
actual 1 / 0x0000000000000001
The limit is silently ignored. -W max-table-elements behaves the same way (a table.grow past the limit succeeds under wasmtime wast and returns -1 under wasmtime run). -W fuel is applied.
Versions and Environment
Wasmtime version or commit: 50.0.1; the same code is on main (88b8d15bf0b2)
Operating system: Linux
Architecture: x86_64
Extra Info
src/commands/wast.rs configures each store with CommonOptions::configure_store, which does not install the StoreLimits that RunCommon::store_limits builds from max-memory-size, max-table-elements, max-instances and the rest. Applying those limits in wast, or rejecting the options there, would avoid the silent difference.
- 主要言語
- Rust
- スター
- 18.9k
- フォーク
- 2k
- 平均マージ
- 1日 6時間
- マージ済み PR(30日)
- 238
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bytecodealliance/wasmtime のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
bytecodealliance/wasmtime#15536 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
bytecodealliance/wasmtime#15455 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
wasi-preview1-component-adapter: fd_write does not invalidate cached InputStream, causing stale reads対応中かも @dpfens が 13 日前に担当しました。 オープンwasi
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bytecodealliance/wasmtime#15296 ·
メンテナーはふだん 1 日以内に返信
-
bug wasm-proposal:exceptions wasmtime:debugging
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
bytecodealliance/wasmtime#14102 ·
メンテナーはふだん 1 日以内に返信
-
wasm-proposal:gc
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
bytecodealliance/wasmtime#13808 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
bytecodealliance/wasmtime の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
area: plugins bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
clipy-recorder/clipy#1039 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
valkey-io/valkey-glide#7975 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
gofractally/psibase#2379 ·
メンテナーはふだん 3 日以内に返信
-
Qwen stream parser: a chunk with "error": null is treated as a stream error対応中かも @Beehtrix が今日担当しました。 オープンarea:models bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
brekkylab/ailoy#681 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信