Zero-length stream copies within one component instance trap for non-numeric payloads
Les mainteneurs répondent en général sous 4 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Domaine
- compilers
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- WebAssembly
- Étoiles
- 1.4k
- Forks
- 132
- Merge moyen
- 4 j 14 h
- PR mergées (30 j)
- 12
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de WebAssembly/component-model
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
WebAssembly/component-model#609 · 2 commentaires · 1 réaction ·
Les mainteneurs répondent en général sous 4 jours
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
WebAssembly/component-model#752 · 13 commentaires · 1 réaction ·
Les mainteneurs répondent en général sous 4 jours
-
Does `task.return`'s memory strictly match the canon-lifted function, or only match when present?Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 18/100
WebAssembly/component-model#749 · 2 commentaires ·
Les mainteneurs répondent en général sous 4 jours
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
WebAssembly/component-model#743 · 1 commentaire ·
Les mainteneurs répondent en général sous 4 jours
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
WebAssembly/component-model#742 · 1 commentaire · 3 réactions ·
Les mainteneurs répondent en général sous 4 jours
Toutes les issues de WebAssembly/component-model
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 87/100
gleam-lang/gleam#6491 ·
Les mainteneurs répondent en général sous 1 jour
-
clang:frontend
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
llvm/llvm-project#238916 · 6 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
good first issue priority:low scope:syntax
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
Les mainteneurs répondent en général sous 1 jour
-
C ABI signature lowering drops explicit function alignmentPeut-être pris @cpunion l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
bug Fortran low priority OOP
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour