Amalgamation compiles with warnings at -O0 (-Wreturn-type) and -O1 (-Wmaybe-uninitialized)
Los mantenedores suelen responder en 1 día
@facelessdevhack ya está trabajando en esto.
Desde el 15/10/2026.
- #1799 de @facelessdevhack — abierto
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- c
- Área
- build-system
Línea de trabajo
Empieza con la compilación de amalgamación: ejecuta make amalgamation, luego compila build/eigenscript_all.c con gcc -Wall -Wextra -O0 -c y -O1 para reproducir las advertencias. La advertencia -Wreturn-type apunta a builtin_tensor_gather, que termina en ARG_GUARD(1, ...); añade un return explícito después del raise. Las advertencias -Wmaybe-uninitialized afectan a _ad/_bd en vm_run_ex y al índice i en vm_index_resolve; inicialízalos donde se declaran. Se da por terminado cuando ambas compilaciones no muestran líneas con warning: y make embed-smoke lo protege.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Finding
The release build (make, -O2) is warning-free, but the shipped single-file amalgamation (make amalgamation, build/eigenscript_all.c, the "copy two files" embed path, #397) is not at the other usual optimisation levels. Measured on main 0740af03 with gcc -Wall -Wextra $(cat tools/werror_flags.txt) -c build/eigenscript_all.c:
-O0(the usual embedder debug build): 1 warning,builtin_tensor_gather:control reaches end of non-void function [-Wreturn-type]. The function ends inARG_GUARD(1, ...), whose constant condition-O0does not fold.-O1: 7 warnings, all-Wmaybe-uninitialized:- 5 x
_ad, reached throughnum_to_i64_exact, inlined intovm_run_ex. The bitwise arms read_adafterslot_as_double(_as, &_ad) & slot_as_double(_bs, &_bd), which sets it only on success. - 2 x
i, reached throughvm_index_resolve, inlined intojit_helper_index_set.
- 5 x
All are false positives by inspection, but an embedder compiling eigenscript_all.c with -Wall at -O0 or -O1 gets them. Found while building #1758's C slot test against the amalgamation, which now compiles with the release flags to avoid them.
Done when
- After
make amalgamation,gcc -Wall -Wextra $(cat tools/werror_flags.txt) -O0 -c build/eigenscript_all.cand the same with-O1print nowarning:line (paste both counts in the PR). -
builtin_tensor_gatherends in a statement the compiler can see returns at every level, for example the raise followed by an explicitreturn._ad/_bdand the indexiare initialised where they are declared. - A check keeps it that way. For example,
make embed-smokealso compiles the amalgamation at-O0 -Wall -Wextraand greps the output forwarning:. Planted fault: removing thereturnagain turns it red.
- Lenguaje dominante
- C
- Estrellas
- 3
- Forks
- 7
- Merge medio
- 8 h 43 min
- PR fusionados (30 d)
- 253
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una 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 InauguralSystems/EigenScript
-
area:gates bug good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
InauguralSystems/EigenScript#1782 ·
Los mantenedores suelen responder en 1 día
-
eigenscript.h declares 8 observer functions that no longer existPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoarea:observer enhancement found-by:cold-read good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
InauguralSystems/EigenScript#1781 ·
Los mantenedores suelen responder en 1 día
-
UB: (int) cast of a user double outside int range in dispatch / vm_index_is_int / flat_index_atAbiertoarea:runtime-vm
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
InauguralSystems/EigenScript#1748 ·
Los mantenedores suelen responder en 1 día
-
scan_int_tokens line/col fields are untestedPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoarea:stdlib found-by:critic kind:gate-defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
InauguralSystems/EigenScript#1693 ·
Los mantenedores suelen responder en 1 día
-
area:gfx bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
InauguralSystems/EigenScript#1684 ·
Los mantenedores suelen responder en 1 día
Todos los issues de InauguralSystems/EigenScript
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
FriendsofECCE/ECCE#336 · 1 comentario ·
-
mediatek/filogic: OpenFi 6C (openfi,6c): func key has wrong polarity, event class and key codeAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
immortalwrt/immortalwrt#2501 ·
-
Taisei fails to build on BSD because the bundled openlibm is compiled with `-D_ANSI_SOURCE`.Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
taisei-project/taisei#454 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100