Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[spectec] Wasm 1.0: CVTOP typing accepts illegal conversion/operator combinations

Abierto
#2,302 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
66/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
wasm
Área
compilers

Línea de trabajo

Start with the CVTOP typing rules in specification/wasm-1.0/6-typing.spectec and the syntax rule in specification/wasm-1.0/1-syntax.spectec. Compare the accepted combinations with the instruction forms listed in the issue's WebAssembly 1.0 PDF excerpt. Done means the rules reject illegal conversion and reinterpret combinations while accepting the listed legal forms; the issue does not name a test file.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

The Wasm 1.0 SpecTec conversion typing rules accept arbitrary combinations of source type, destination type, and conversion operator.

In specification/wasm-1.0/6-typing.spectec:

;; TODO: move side conditions to syntax
rule Instr_ok/cvtop-reinterpret:
  C |- CVTOP nt_1 nt_2 REINTERPRET : nt_2 -> nt_1
  -- if $size(nt_1) = $size(nt_2)

rule Instr_ok/cvtop-convert:
  C |- CVTOP nt_1 nt_2 cvtop : nt_2 -> nt_1

The second rule admits every cvtop, including REINTERPRET, so it also bypasses the first rule’s check.

The syntax rule only requires distinct source and destination types:

| CVTOP valtype_1 valtype_2 cvtop
    hint(show %1.%3#_#%2)
  -- if valtype_1 =/= valtype_2

The PDF (2.4.1) restricts those combinations through syntax:

nn, mm ::= 32 | 64
sx     ::= u | s

instr ::= ...
        | i32.wrap_i64
        | i64.extend_i32_sx
        | inn.trunc_fmm_sx
        | f32.demote_f64
        | f64.promote_f32
        | fnn.convert_imm_sx
        | inn.reinterpret_fnn
        | fnn.reinterpret_inn
Lenguaje dominante
WebAssembly
Estrellas
3.5k
Forks
540
Merge medio
23 h 36 min
PR fusionados (30 d)
26

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de WebAssembly/spec

Todos los issues de WebAssembly/spec

Issues similares

Más issues de Compilers

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.