Skip to content


Subversion checkout URL

You can clone with
Download ZIP
darktable main repository
C C++ CMake JavaScript Shell Lua Other
Branch: master

Modulelist lib: fix multi-instance-related crash. Fixes #10438

Modulelist should not be filled from iop instance list,
but from global iop list, that contains only one instance
of each iop, and where each item is valid until DT shutdowns.

Also, iop state (dt_iop_module_state_t) is per-module and not
per-instance, so move some code around to fix that.

Fixes following AdressSanitizer error:
==25777==ERROR: AddressSanitizer: heap-use-after-free on address 0x6190048dddb0 at pc 0x7f3595bcb351 bp 0x7ffe062883f0 sp 0x7ffe062883e8
READ of size 4 at 0x6190048dddb0 thread T0
    0 0x7f3595bcb350 in favorite_renderer_function /home/lebedevri/darktable/src/libs/modulelist.c:127
    1 0x7f35b7264bfa  (/usr/lib/x86_64-linux-gnu/
    2 0x7f35b55691df in g_hash_table_foreach (/lib/x86_64-linux-gnu/
    142 0x7f35b557a241 in g_main_loop_run (/lib/x86_64-linux-gnu/
    143 0x7f35b7346f54 in gtk_main (/usr/lib/x86_64-linux-gnu/
    144 0x7f35b7d2c572 in dt_gui_gtk_run /home/lebedevri/darktable/src/gui/gtk.c:964
    145 0x400cf3 in main /home/lebedevri/darktable/src/main.c:25
    146 0x7f35b02e9b44 in __libc_start_main (/lib/x86_64-linux-gnu/
    147 0x400bd8  (/usr/local/bin/darktable+0x400bd8)

0x6190048dddb0 is located 304 bytes inside of 904-byte region [0x6190048ddc80,0x6190048de008)
freed by thread T0 here:
    0 0x7f35b803c0da in free (/usr/lib/x86_64-linux-gnu/
    1 0x7f3592f6378d in dt_dev_change_image /home/lebedevri/darktable/src/views/darkroom.c:580
    2 0x7f3592f64b2d in dt_dev_jump_image /home/lebedevri/darktable/src/views/darkroom.c:743
    3 0x7f3592f64bca in skip_f_key_accel_callback /home/lebedevri/darktable/src/views/darkroom.c:834
    4 0x7f35b7349a1a  (/usr/lib/x86_64-linux-gnu/

previously allocated by thread T0 here:
    0 0x7f35b803c4e1 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/
    1 0x7f35b7c42cd3 in dt_iop_load_modules /home/lebedevri/darktable/src/develop/imageop.c:1280
    2 0x7f35b7c262c9 in dt_dev_load_image /home/lebedevri/darktable/src/develop/develop.c:468
    3 0x7f3592f6be5e in enter /home/lebedevri/darktable/src/views/darkroom.c:1182
    4 0x7f35b7d74e54 in dt_view_manager_switch /home/lebedevri/darktable/src/views/view.c:414
    5 0x7f35b7bfcaf9 in _dt_ctl_switch_mode_to /home/lebedevri/darktable/src/control/control.c:647
    6 0x7f35b557abe4 in g_main_context_invoke_full (/lib/x86_64-linux-gnu/

SUMMARY: AddressSanitizer: heap-use-after-free /home/lebedevri/darktable/src/libs/modulelist.c:127 favorite_renderer_function
Shadow bytes around the buggy address:
latest commit b15b157f08
@LebedevRI LebedevRI authored


darktable is an open source photography workflow application and RAW developer. A virtual lighttable and darkroom for photographers. It manages your digital negatives in a database, lets you view them through a zoomable lighttable and enables you to develop raw images and enhance them.



Release build

./ --prefix /opt/darktable --buildtype Release

Debug build

./ --prefix /opt/darktable --buildtype Debug

Tip: Check that you have the latest gphoto2 library installed in order to support the newest cameras.

Issue tracking


Mailing lists

Something went wrong with that request. Please try again.