Skip to content

TASK-189246 lock gc before traversing openupval#6

Open
balupillai wants to merge 2 commits intomainfrom
TASK-189246
Open

TASK-189246 lock gc before traversing openupval#6
balupillai wants to merge 2 commits intomainfrom
TASK-189246

Conversation

@balupillai
Copy link
Contributor

@balupillai balupillai commented Feb 4, 2026

Note

Medium Risk
Touches core GC/stop-the-world synchronization and upvalue lifecycle; small diff but incorrect blocking/unblocking or recursion balancing could introduce deadlocks or GC stalls under load.

Overview
Prevents a concurrency race between global GC tracing and mutation of a thread’s open-upvalue list by wrapping luaF_close and open-path luaF_freeupval unlinking with luaC_blockcollector/luaC_unblockcollector.

Adds per-thread recursion accounting to the global-trace mutator stop/start path (try_block_mutators/unblock_mutators) so nested collector-blocking operations remain balanced.

Written by Cursor Bugbot for commit a118619. This will update automatically on new commits. Configure here.

Cursor Bugbot reviewed your changes and found no issues for commit a118619

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

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