Skip to content

Reuse the admitted Lua state for synchronized callback cleanup - #97

Merged
ShadowNineX merged 1 commit into
mainfrom
codex/dispatch-original-state-release
Oct 19, 2026
Merged

ShadowNineX merged 1 commit into
mainfrom
codex/dispatch-original-state-release

Conversation

@ShadowNineX

Copy link
Copy Markdown
Collaborator

Synchronized dispatch cleanup reacquires the host's Lua-state provider even though the original operation and stack frame are still active. Release the callback on that original admitted state so cleanup keeps the same Lua universe and lifecycle lease through frame restoration.

Real Lua coroutine regressions cover successful work, a managed exception and an exact Lua error. They verify one provider acquisition, callback-registry cleanup and restored stack sentinels. The three new cases fail against the previous implementation; all six focused cases pass with the fix.

Validation: Release solution build passed with zero warnings or errors; all 136 hosting tests, 363 Lua tests and 746 engine NativeLua tests passed with zero failures or skips. Independent review found no remaining actionable issue in this patch. The separate intermittent native CE crash investigation remains open; these results establish the cleanup invariant without establishing that crash's cause.

@ShadowNineX
ShadowNineX requested a review from AriusII as a code owner October 19, 2026 16:12
@sonarqubecloud

Copy link
Copy Markdown

@ShadowNineX
ShadowNineX merged commit 4a3b2b7 into main Oct 19, 2026
20 checks passed
@ShadowNineX
ShadowNineX deleted the codex/dispatch-original-state-release branch October 19, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant