Skip to content

lua: drop the reference to the lua thread after starting it - #23039

Merged
TurboGit merged 1 commit into
darktable-org:masterfrom
da-phil:pl/fix_leak_lua_thread_handle
Nov 8, 2026
Merged

TurboGit merged 1 commit into
darktable-org:masterfrom
da-phil:pl/fix_leak_lua_thread_handle

Conversation

@da-phil

@da-phil da-phil commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Nothing ever joins the lua thread, so the GThread that g_thread_new() returns was simply lost. Unref it right away; the thread holds its own reference while it runs.

This issue was found during a complete run of the integration test suite with ASan+LeakSan turned on, see #22225.

Checklist

  • I have read CONTRIBUTING.md and the coding style.
  • I have not merged master into the topic branch.
  • The pull request is one logical change, and every commit compiles on its own. You may use git rebase --exec 'cmake --build build' master to check this.
  • I ran the relevant tests: unit tests, src/tests/integration/ where the pixelpipe is touched, or darktable-cli as a headless smoke test.
  • New user-visible strings use _(), new preferences are registered in data/darktableconfig.xml.in.
  • A RELEASE_NOTES.md entry was added (only needed if fixing an issue in a release). Do not reference GitHub issues.

AI assistance

Written with the help of Claude Code.

Nothing ever joins the lua thread, so the GThread that g_thread_new()
returns was simply lost. Unref it right away; the thread holds its own
reference while it runs.
@TurboGit TurboGit added bugfix pull request fixing a bug scope: codebase making darktable source code easier to manage ai:generated labels Nov 8, 2026
@TurboGit TurboGit added this to the 5.8 milestone Nov 8, 2026

@TurboGit TurboGit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@TurboGit
TurboGit merged commit 4ba81d1 into darktable-org:master Nov 8, 2026
7 checks passed
@da-phil
da-phil deleted the pl/fix_leak_lua_thread_handle branch November 8, 2026 14:06
@zisoft zisoft mentioned this pull request Dec 2, 2026
4 of 6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai:generated bugfix pull request fixing a bug scope: codebase making darktable source code easier to manage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants