Fixing unsafe read&write of g->data - #22365
Open
jenshannoschwalm wants to merge 1 commit into
Open
jenshannoschwalm wants to merge 1 commit into
jenshannoschwalm wants to merge 1 commit into
Conversation
jenshannoschwalm
force-pushed
the
highlights_gui_critical
branch
from
September 22, 2026 16:04
9ba66e6 to
7329973
Compare
jenshannoschwalm
marked this pull request as draft
September 23, 2026 03:55
A widget callback on the GTK main thread writes GUI state that controls a module's mask display — the toggle that makes the module show its internal mask instead of the image and in one case the mask channel. That toggle selects — and in process() / process_cl() reads - that same field on a pixelpipe worker thread. We must synchronize the two threads by guarding via dt_iop_gui_enter_critical_section(), fixes have been done for demosaic, highlights and toneequalizer. Note for devs: Since e417e94 iop_module->gui_lock is recursive!
jenshannoschwalm
force-pushed
the
highlights_gui_critical
branch
from
September 23, 2026 04:54
7329973 to
5e0875d
Compare
jenshannoschwalm
marked this pull request as ready for review
September 23, 2026 05:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes (1) use of dt_iop_gui_enter/leave_critical_section
As analysed in #22064
A widget callback on the GTK main thread writes GUI state that controls a module's mask display — the toggle that makes the module show its internal mask instead of the image and in one case the mask channel.
That toggle selects - and in
process()/process_cl()reads - that same field on a pixelpipe worker thread.We must synchronize the two threads by guarding via
dt_iop_gui_enter/leave_critical_section(), fixes have been done for demosaic, highlights and toneequalizer.Note for devs: Since e417e94 iop_module->gui_lock is recursive!
src/tests/integration/where the pixelpipe is touched, ordarktable-clias a headless smoke test._(), new preferences are registered indata/darktableconfig.xml.in.RELEASE_NOTES.mdis not required