debug.traceback inside a __close run by coroutine.close lists the suspended body's frames (ref: only the __close frame)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Lua
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 43 min
- PR fusionados (30 d)
- 10
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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/EigenLua
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 8/100
InauguralSystems/EigenLua#78 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
selftest: count-unspec-canary is seed-dependent and goes red ~0.24% of selftests on a correct treeAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
InauguralSystems/EigenLua#72 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
InauguralSystems/EigenLua#63 ·
Los mantenedores suelen responder en 1 día
-
1/0 and 0/0 abort the program with 'EigenScript value error: division by zero' (ref: inf / nan)Abiertobug eigenscript-gap
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
InauguralSystems/EigenLua#50 ·
Los mantenedores suelen responder en 1 día
-
bug eigenscript-gap
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
InauguralSystems/EigenLua#49 ·
Los mantenedores suelen responder en 1 día
Todos los issues de InauguralSystems/EigenLua
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
silverbulletmd/silverbullet#2254 ·
Los mantenedores suelen responder en 1 día
-
bug discord triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
severity: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
luainkernel/lunatik#2699 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
esmuellert/codediff.nvim#594 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100