Amalgamation compiles with warnings at -O0 (-Wreturn-type) and -O1 (-Wmaybe-uninitialized)
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- build-system
Direzione di ricerca
Inizia con la build di amalgamation: esegui make amalgamation, poi compila build/eigenscript_all.c con gcc -Wall -Wextra -O0 -c e -O1 per riprodurre gli avvisi. L'avviso -Wreturn-type punta a builtin_tensor_gather, che termina con ARG_GUARD(1, ...); aggiungi un return esplicito dopo il raise. Gli avvisi -Wmaybe-uninitialized riguardano _ad/_bd in vm_run_ex e l'indice i in vm_index_resolve; inizializzali nel punto in cui sono dichiarati. È completato quando entrambe le build non stampano righe warning: e make embed-smoke lo verifica.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C
- Stelle
- 3
- Fork
- 7
- Merge medio
- 8h 43m
- PR unite (30g)
- 253
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di InauguralSystems/EigenScript
-
area:gates bug good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
InauguralSystems/EigenScript#1782 ·
I maintainer di solito rispondono entro 1 giorno
-
eigenscript.h declares 8 observer functions that no longer existForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaarea:observer enhancement found-by:cold-read good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
InauguralSystems/EigenScript#1781 ·
I maintainer di solito rispondono entro 1 giorno
-
UB: (int) cast of a user double outside int range in dispatch / vm_index_is_int / flat_index_atApertaarea:runtime-vm
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
InauguralSystems/EigenScript#1748 ·
I maintainer di solito rispondono entro 1 giorno
-
scan_int_tokens line/col fields are untestedForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaarea:stdlib found-by:critic kind:gate-defect
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
InauguralSystems/EigenScript#1693 ·
I maintainer di solito rispondono entro 1 giorno
-
area:gfx bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
InauguralSystems/EigenScript#1684 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di InauguralSystems/EigenScript
Issue simili
-
[Issue]: hipsparselt.h C API as shipped now requires C23 -- ONLY because of missing include or guardAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ROCm/rocm-libraries#13736 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
`inverse()` of a controlled `CUGate` drops the phase parameter γForse già presa @rupasri118 l’ha presa oggi. Apertabug mod: circuit
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Qiskit/qiskit#17223 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
PackageKit/PackageKit#1026 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
OpenPrinting/libcupsfilters#284 ·
I maintainer di solito rispondono entro 1 giorno