audio_play and audio_stream_push accept a wrong-typed sample element when no audio device is open
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 43/100
Direzione di ricerca
Start with the audio builtins and their neighboring checks, then inspect tools/strict_differential.sh and the docs/BUILTINS.md rows named in the issue. Reproduce the wrong-typed sample behavior with and without an audio device, and measure the stated headless cost for a per-frame audio consumer. Done means both builtins behave as specified, the differential probe runs without opening a device and is examined on macOS, and the documentation matches a run.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
On phase2-numbers (and on the branch of #2442, same source here), two audio builtins look at the sample list's ELEMENTS only after they have checked that a device is open. On a machine with no audio device, which is every CI runner without SDL and every headless run, a wrong-typed sample element is accepted in every mode.
$ printf 'print of (audio_play of [0.1, "x", 0.2])\n' > a1.eigs
$ SDL_AUDIODRIVER=nosuchdriver eigenscript a1.eigs # 0
$ EIGS_STRICT=1 SDL_AUDIODRIVER=nosuchdriver eigenscript a1.eigs # 0
$ printf 'print of (audio_stream_push of [0.1, "x", 0.2])\n' > a3.eigs
$ EIGS_STRICT=1 SDL_AUDIODRIVER=nosuchdriver eigenscript a3.eigs # false
With a device open (SDL_AUDIODRIVER=dummy, after audio_open of [44100, 1]) the first one raises audio samples: element 1 is str, expected a number, as it should.
The neighbours already do it the other way round. The whole-argument check of both builtins was moved above the device check in #1007 (audio_play of 42 raises with no device), and audio_play_loop checks its elements above the device check: audio_play_loop of [[0.1, "x", 0.2], 1] raises with no device. So the same mistake is loud in one builtin and silent in the two beside it, and which one a caller gets depends on the machine.
Found through a probe of the strict differential (tools/strict_differential.sh) that needs an open device to reach this guard: it cannot run on the macOS runners. #2442 lists that probe as not examined there; this issue is the fault behind it.
Done when
-
audio_playandaudio_stream_pushrefuse a wrong-typed sample element whether or not a device is open, with the message they give today when one is open.EIGS_STRICT=0keeps today's quiet answer. - The cost on a machine with no device is stated: a check of the element types without converting the samples, or the conversion with its measured cost on a headless run of a consumer that plays audio every frame.
- The differential's probe for this guard no longer opens a device, and is examined on the macOS runners.
-
docs/BUILTINS.mdrows for the two builtins say what a wrong-typed element does with and without a device, and the sentence is true by a run.
— Claude DevBox
- Lingua principale
- C
- Stelle
- 3
- Fork
- 7
- Merge medio
- 3h 28m
- PR unite (30g)
- 270
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 kind:gate-defect
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
InauguralSystems/EigenScript#2476 ·
I maintainer di solito rispondono entro 1 giorno
-
area:gates needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
InauguralSystems/EigenScript#2462 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
The hosted-RNG check refuses a clean tree that has a tracked file with a double quote in its nameApertaarea:gates kind:gate-defect needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
InauguralSystems/EigenScript#2461 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area:gates kind:gate-defect needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
InauguralSystems/EigenScript#2458 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
`http_post`: `headers` text with something after its JSON value now means no headers, without a wordApertaarea:http kind:silent-wrong
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
InauguralSystems/EigenScript#2394 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di InauguralSystems/EigenScript
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
flipperdevices/flipperzero-firmware#4520 ·
I maintainer di solito rispondono entro 1 giorno
-
area/build-framework kind/enhancement priority/low
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
yugabyte/yugabyte-db#38826 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
meshcore-dev/MeshCore#3891 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug grammar sev-3
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
BUG/MEDIUM: regex: worker SIGSEGV when a regex is applied to an empty body on libc-regex buildsApertastatus: needs-triage type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100