debug.traceback inside a __close run by coroutine.close lists the suspended body's frames (ref: only the __close frame)
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
- 45/100
Direzione di ricerca
Start with the tb3 repro under bin/eigenlua and compare it with the reference output. The frame-hiding logic is in lr_d_frame (src/runtime.eigs around lines 3041-3046), which checks r.coclose set by lr_co_close (src/rt_coroutine.eigs, lines 224-229 and 245-264). lr_d_traceback (src/runtime.eigs around line 3180) walks lr_d_framet directly and does not check coclose. Done means tb1, tb2 and tb3 match the reference byte for byte, plus a Tier D row that passes tools/grade.sh.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
debug.traceback called inside a __close that coroutine.close runs on a suspended coroutine lists the suspended body's frames ([C]: in function 'coroutine.yield' and every Lua frame under it). Lua 5.4.9 lists only the __close frame: lua_closethread calls the pending closes without leaving the body's frames on the coroutine stack.
This is pre-existing. It shows on origin/main a302c4e with no close error at all, and it is not caused by the #73 fix (it was found by the blind critic of that fix, hq#58 Wave 2).
Minimal repro (tb3)
local function F(f) return setmetatable({}, {__close = f}) end
local co = coroutine.create(function()
local a <close> = F(function(_, e) print("a", e); print((debug.traceback("tb", 1):gsub("\t", " "))) end)
coroutine.yield()
end)
coroutine.resume(co)
print(coroutine.close(co))
Reference (.ref/bin/lua, 5.4.9), rc=0:
a nil
tb
stack traceback:
tb3.lua:3: in function <tb3.lua:3>
true
EigenLua on main a302c4e (EigenScript v0.48.0), rc=0:
a nil
tb
stack traceback:
tb3.lua:3: in function <tb3.lua:3>
[C]: in function 'coroutine.yield'
tb3.lua:4: in function <tb3.lua:2>
true
Two variants show the same extra frames:
- tb2: as tb3, plus a second
local b <close> = F(function(_, e) end)and the yield inside a nestedlocal function deep() coroutine.yield() end; deep(). Main prints the__closeframe plus[C]: in function 'coroutine.yield',deep's frame and the body's frame; the reference prints only the__closeframe. - tb1: as tb2, but
b's__closeraiseserror("eb", 0). On mainanever ran (that was #73). With the #73 fixaruns and printsa eband then the same extra frames; the reference prints only the__closeframe andfalse eb.
Cause
lr_d_frame (src/runtime.eigs:3041-3046 on a302c4e) hides the closed coroutine's frames while r.coclose is set (lr_co_close, src/rt_coroutine.eigs:224-229 and 245-264), so debug.getinfo already agrees with the reference. lr_d_traceback (src/runtime.eigs:3180) walks lr_d_framet directly and never consults coclose, so the walker shows the frames that getinfo hides.
Not #16 (that was debug.traceback(thread, ...) walking the caller's stack).
Done when
- tb1, tb2 and tb3 above print the reference's output byte for byte under
bin/eigenlua(rc 0). - A new Tier D row (for example
corpus/D/co_close_traceback.lua) covering all three MATCHes undertools/grade.sh --candidate bin/eigenlua --tier D, with no new DIVERGE elsewhere. -
debug.tracebackwith an explicit level (0, 1, 2) inside such a__close, anddebug.traceback(co)called on the closing coroutine from inside its own__close, also match the reference (in the same row).
Generated by Claude Code
- Lingua principale
- Lua
- Stelle
- 0
- Fork
- 0
- Merge medio
- 43m
- PR unite (30g)
- 10
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun 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/EigenLua
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 8/100
InauguralSystems/EigenLua#78 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
selftest: count-unspec-canary is seed-dependent and goes red ~0.24% of selftests on a correct treeAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
InauguralSystems/EigenLua#72 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
InauguralSystems/EigenLua#63 ·
I maintainer di solito rispondono entro 1 giorno
-
1/0 and 0/0 abort the program with 'EigenScript value error: division by zero' (ref: inf / nan)Apertabug eigenscript-gap
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
InauguralSystems/EigenLua#50 ·
I maintainer di solito rispondono entro 1 giorno
-
bug eigenscript-gap
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
InauguralSystems/EigenLua#49 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di InauguralSystems/EigenLua
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
silverbulletmd/silverbullet#2254 ·
I maintainer di solito rispondono entro 1 giorno
-
bug discord triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
severity: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
luainkernel/lunatik#2699 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
esmuellert/codediff.nvim#594 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100