Spec interpreter/implementation discrepancy - a local with an invalid type and 0 count
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Stack tecnológico
- wasm
- Área
- compilers
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- WebAssembly
- Estrellas
- 3.5k
- Forks
- 539
- Merge medio
- 10 h 24 min
- PR fusionados (30 d)
- 11
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de WebAssembly/spec
-
Dificultad 4/5 3-5 días Aptitud para principiantes 54/100
WebAssembly/spec#2265 ·
Los mantenedores suelen responder en 1 día
-
[js-api] A mutable global import allocates a const global before LinkErrorPosiblemente ocupada @chicoxyzzy la tomó hace 2 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
WebAssembly/spec#2253 ·
Los mantenedores suelen responder en 1 día
-
[spectec] Wasm 1.0: `$instantiate` missing premisesPosiblemente ocupada @rossberg la tomó hace 28 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
WebAssembly/spec#2245 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
WebAssembly/spec#2235 · 9 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
WebAssembly/spec#2196 ·
Los mantenedores suelen responder en 1 día
Todos los issues de WebAssembly/spec
Issues similares
-
erdos-status-sync
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
google-deepmind/formal-conjectures#6920 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
objectionary/eo#9317 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
rubys/roundhouse#571 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
anthropics/buffa#639 ·
Los mantenedores suelen responder en 3 días
-
Module EQUIVALENCE into an array with a non-default lower bound ignores the bound (wrong element)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día