Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix#438 preset overwrite #4

Merged
merged 3 commits into from
Jun 10, 2012

Conversation

itarozzi
Copy link
Contributor

I have review code for presets in lighttable and darkroom.
This makes obsolete my 2 patch sent to old trac system.

Thanks to Petr Styblo for improvements!

hanatos and others added 3 commits May 31, 2012 20:52
- review code for edit existing preset
- add dialog confirm when delete preset in lighttable

Thanks to Petr Styblo for improvements!

NOTE:
This makes obsoletes the 2 patch I already sent to old trac system
@boucman
Copy link
Member

boucman commented May 31, 2012

did someone close your patches on trac ?

do you want me to do it ?

if yes could you post me the trac number or URL ?

@jcsogo
Copy link
Member

jcsogo commented May 31, 2012

@boucman Actually trac is closed now. The bug has been moved to redmine. I am not sure how git and redmine integrates.

@ghost ghost assigned jcsogo May 31, 2012
@itarozzi
Copy link
Contributor Author

I'm newbie on submitting patch, so may be I did not do all steps right.

I submitted 2 patches here:
http://sourceforge.net/apps/trac/darktable/ticket/438

I thinked developers team have to examine and decide if reject or merge
(apply) in master.

After this we received mail from Petr Styblo in dev mailing list,
with new patch (he did not see my patch on trac).

Examining his patch I found some other fix to do, but meanwhile new
github arrived :)

So I completed my fix and, instead to submit a new old-style patch, I
forked github project and create this bugfix branch.
Before push I squeezed previous commit, so this makes old patch obsolete.

Now I don't now what to do about old patch, but I think the bug can be
translated to new redmine and there give some reference to github fork?

If I have to do something myself please write me :)

Ivan

@boucman
Copy link
Member

boucman commented May 31, 2012

I'm simply trying to clean up our patches on redmine... so since we will follow through github I want to close your patches on redmine

but I didn't find them, do you remember how they were called ?

@itarozzi
Copy link
Contributor Author

As I wrote, I sent patch in trac only:
http://sourceforge.net/apps/trac/darktable/ticket/438

Now I activated my account in redmine too, but there I can't found my
submitted bugs in trac (was #438 and #439).

I wrote to Simon to notify this few minutes ago.

Seems these bug and patch are not transfered from trac to redmine ?!?

I asked Simon if I need to recreate bug on redmine or if better to wait
until switch is complete. I'm waiting a response.

If I have to talk with you instead Simon, please tell me. I wrote Simon
because he write to ML about switching account from trac to redmine ;)

Thanks!

@simonspa
Copy link
Member

Hi, I wrote you concerning the tickets. They got lost during transition and you might wanna re-create them in redmine. Thanks!

@itarozzi
Copy link
Contributor Author

Created new Bug #8722 in redmine. Thanks!

@jcsogo jcsogo merged commit 039fe28 into darktable-org:master Jun 10, 2012
LebedevRI added a commit that referenced this pull request Nov 21, 2014
This was probably missed (or it was not noticed) in 78fc8af

Fixes:
=================================================================
==19419==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7f31036b66e0 at pc 0x7f31cd73ce7a bp 0x7f3145815a80 sp 0x7f3145815a78
READ of size 4 at 0x7f31036b66e0 thread T57
    #0 0x7f31cd73ce79 in _blend_normal_unbounded /home/lebedevri/darktable/src/develop/blend.c:486
    #1 0x7f31cd744916 in dt_develop_blend_process._omp_fn.6 /home/lebedevri/darktable/src/develop/blend.c:2194
    #2 0x7f31c6ba5715 (/usr/lib/x86_64-linux-gnu/libgomp.so.1+0xd715)
    #3 0x7f31c9db80a3 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x80a3)
    #4 0x7f31c68cdccc in clone (/lib/x86_64-linux-gnu/libc.so.6+0xe5ccc)

0x7f31036b66e0 is located 0 bytes to the right of 89644768-byte region [0x7f30fe138800,0x7f31036b66e0)
allocated by thread T10 here:
    #0 0x7f31cdbd4c9b in __interceptor_posix_memalign (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x54c9b)
    #1 0x7f31cd65c18d in dt_alloc_align /home/lebedevri/darktable/src/common/darktable.c:997
    #2 0x7f31cd731cd8 in dt_dev_pixelpipe_cache_get_weighted /home/lebedevri/darktable/src/develop/pixelpipe_cache.c:163
    #3 0x7f31cd7369dd in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:827
    #4 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #5 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #6 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #7 0x7f31cd732c54 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:814
    #8 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #9 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #10 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #11 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #12 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #13 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #14 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #15 0x7f31cd732c54 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:814
    #16 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #17 0x7f31cd732c54 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:814
    #18 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #19 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #20 0x7f31cd732c54 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:814
    #21 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #22 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #23 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #24 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #25 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #26 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #27 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #28 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689
    #29 0x7f31cd732452 in dt_dev_pixelpipe_process_rec /home/lebedevri/darktable/src/develop/pixelpipe_hb.c:689

Thread T57 created by T10 here:
    #0 0x7f31cdba3bba in pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x23bba)
    #1 0x7f31c6ba5c56 (/usr/lib/x86_64-linux-gnu/libgomp.so.1+0xdc56)
    #2 0x7f31c6ba17d9 in GOMP_parallel (/usr/lib/x86_64-linux-gnu/libgomp.so.1+0x97d9)
    #3 0x3ed921823dcccccc

Thread T10 created by T0 here:
    #0 0x7f31cdba3bba in pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x23bba)
    #1 0x7f31cd6fc149 in dt_control_jobs_init /home/lebedevri/darktable/src/control/jobs.c:512
    #2 0x7f31cd6f1945 in dt_control_init /home/lebedevri/darktable/src/control/control.c:317
    #3 0x7f31cd65fe3c in dt_init /home/lebedevri/darktable/src/common/darktable.c:745
    #4 0x400b7f in main /home/lebedevri/darktable/src/main.c:24
    #5 0x7f31c6809b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)

SUMMARY: AddressSanitizer: heap-buffer-overflow /home/lebedevri/darktable/src/develop/blend.c:486 _blend_normal_unbounded
Shadow bytes around the buggy address:
  0x0fe6a06cec80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0fe6a06cec90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0fe6a06ceca0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0fe6a06cecb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0fe6a06cecc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0fe6a06cecd0: 00 00 00 00 00 00 00 00 00 00 00 00[fa]fa fa fa
  0x0fe6a06cece0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0fe6a06cecf0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0fe6a06ced00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0fe6a06ced10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0fe6a06ced20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Contiguous container OOB:fc
  ASan internal:           fe
==19419==ABORTING
LebedevRI added a commit that referenced this pull request Feb 26, 2015
…s longer than 19 symbols

We use  char op[20];  to store iop names, and if somehow we end up with iop
with long-enough name, we end up overflowing stack:

==23602==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff00816974 at pc 0x7fdcbfbce3f2 bp 0x7fff00816810 sp 0x7fff00816808
WRITE of size 1 at 0x7fff00816974 thread T0
    #0 0x7fdcbfbce3f1 in dt_iop_load_modules_so /home/lebedevri/darktable/src/develop/imageop.c:1214
    #1 0x7fdcbfb00229 in dt_init /home/lebedevri/darktable/src/common/darktable.c:873
    #2 0x400b9f in main /home/lebedevri/darktable/src/main.c:24
    #3 0x7fdcb80b1b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
    #4 0x400c22 (/usr/local/bin/darktable+0x400c22)

Address 0x7fff00816974 is located in stack of thread T0 at offset 180 in frame
    #0 0x7fdcbfbcc92f in dt_iop_load_modules_so /home/lebedevri/darktable/src/develop/imageop.c:1196

  This frame has 5 object(s):
    [32, 40) 'stmt'
    [96, 104) 'stmt'
    [160, 180) 'op' <== Memory access at offset 180 overflows this variable
    [224, 1248) 'path'
    [1280, 5376) 'plugindir'

SUMMARY: AddressSanitizer: stack-buffer-overflow /home/lebedevri/darktable/src/develop/imageop.c:1214 dt_iop_load_modules_so
...
==23602==ABORTING

Now, if we encounter such an iop (e.g. libexposure123456789012.so), we will simply fail to load it:
[iop_load_module] failed to open operation `exposure12345678901': /usr/local/lib/darktable/plugins/libexposure12345678901.so: cannot open shared object file: No such file or directory

While there, also add check to the CMake add_iop() macro to prevent adding such iops.
LebedevRI added a commit that referenced this pull request Feb 26, 2015
…s longer than 19 symbols

We use  char op[20];  to store iop names, and if somehow we end up with iop
with long-enough name, we end up overflowing stack:

==23602==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff00816974 at pc 0x7fdcbfbce3f2 bp 0x7fff00816810 sp 0x7fff00816808
WRITE of size 1 at 0x7fff00816974 thread T0
    #0 0x7fdcbfbce3f1 in dt_iop_load_modules_so /home/lebedevri/darktable/src/develop/imageop.c:1214
    #1 0x7fdcbfb00229 in dt_init /home/lebedevri/darktable/src/common/darktable.c:873
    #2 0x400b9f in main /home/lebedevri/darktable/src/main.c:24
    #3 0x7fdcb80b1b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
    #4 0x400c22 (/usr/local/bin/darktable+0x400c22)

Address 0x7fff00816974 is located in stack of thread T0 at offset 180 in frame
    #0 0x7fdcbfbcc92f in dt_iop_load_modules_so /home/lebedevri/darktable/src/develop/imageop.c:1196

  This frame has 5 object(s):
    [32, 40) 'stmt'
    [96, 104) 'stmt'
    [160, 180) 'op' <== Memory access at offset 180 overflows this variable
    [224, 1248) 'path'
    [1280, 5376) 'plugindir'

SUMMARY: AddressSanitizer: stack-buffer-overflow /home/lebedevri/darktable/src/develop/imageop.c:1214 dt_iop_load_modules_so
...
==23602==ABORTING

Now, if we encounter such an iop (e.g. libexposure123456789012.so), we will simply fail to load it:
[iop_load_module] failed to open operation `exposure12345678901': /usr/local/lib/darktable/plugins/libexposure12345678901.so: cannot open shared object file: No such file or directory

While there, also add check to the CMake add_iop() macro to prevent adding such iops.

(cherry picked from commit 8bfcc8c)
LebedevRI added a commit that referenced this pull request May 17, 2015
…o module

Fixes following issue: (refs #10455, comment 3)
1. (empty history stack) change exposure
2. add new exposure iop instance
3. change exposure in second instance
4. delete that new instance
5. change exposure in original instance

=================================================================
31502ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6190023d489c at pc 0x7f073823a423 bp 0x7ffd3f9349d0 sp 0x7ffd3f9349c8
READ of size 4 at 0x6190023d489c thread T0
#0 0x7f073823a422 in dt_dev_add_history_item /home/lebedevri/darktable/src/develop/develop.c:557
#1 0x7f0711886433 in exposure_set_white /home/lebedevri/darktable/src/iop/exposure.c:661
#2 0x7f0711886882 in dt_iop_exposure_set_white /home/lebedevri/darktable/src/iop/exposure.c:682
#3 0x7f07118869e2 in exposure_callback /home/lebedevri/darktable/src/iop/exposure.c:827
#4 0x7f0735ee0503 (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x10503)
#5 0x7f0735ef9fa6 in g_signal_emit_valist (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x29fa6)
#6 0x7f0735efae49 in g_signal_emit_by_name (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x2ae49)
#7 0x7f073814fe94 in dt_bauhaus_slider_set_normalized /home/lebedevri/darktable/src/bauhaus/bauhaus.c:1937
#8 0x7f07381535c6 in dt_bauhaus_slider_scroll /home/lebedevri/darktable/src/bauhaus/bauhaus.c:1781
#9 0x7f07379ad41d (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x1ed41d)
#10 0x7f0735ee0503 (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x10503)
#11 0x7f0735ef9a4f in g_signal_emit_valist (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x29a4f)
#12 0x7f0735efa8fe in g_signal_emit (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x2a8fe)
#13 0x7f0737addde3 (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x31dde3)
#14 0x7f07379aad2d (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x1ead2d)
#15 0x7f07379ac93d in gtk_main_do_event (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x1ec93d)
#16 0x7f073754fb11 (/usr/lib/x86_64-linux-gnu/libgdk-3.so.0+0x4fb11)
#17 0x7f0735c09c3c in g_main_context_dispatch (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x49c3c)
#18 0x7f0735c09f1f (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x49f1f)
#19 0x7f0735c0a241 in g_main_loop_run (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4a241)
#20 0x7f07379abbf4 in gtk_main (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x1ebbf4)
#21 0x7f073833ec96 in dt_gui_gtk_run /home/lebedevri/darktable/src/gui/gtk.c:964
#22 0x400cf3 in main /home/lebedevri/darktable/src/main.c:25
#23 0x7f07309e9b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
#24 0x400bd8 (/usr/local/bin/darktable+0x400bd8)

AddressSanitizer can not describe address in more detail (wild memory access suspected).
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/lebedevri/darktable/src/develop/develop.c:557 dt_dev_add_history_item
...
31502ABORTING
LebedevRI added a commit that referenced this pull request May 23, 2015
Fixes following LeakSanitizer-detected leaks:

Direct leak of 432 byte(s) in 1 object(s) allocated from:
    #0 0x7ff04e12c74f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x5474f)
    #1 0x7ff04df002dd in dt_get_printer_info /home/lebedevri/darktable/src/common/cups_print.c:51
    #2 0x7ff02b25d4ca
    #3 0x7ff02b261c9a
    #4 0x7ff04de9ac43 in dt_lib_load_modules /home/lebedevri/darktable/src/libs/lib.c:718
    #5 0x7ff04de9d512 in dt_lib_init /home/lebedevri/darktable/src/libs/lib.c:1008
    #6 0x7ff04dc968c7 in dt_init /home/lebedevri/darktable/src/common/darktable.c:889
    #7 0x400cb8 in main /home/lebedevri/darktable/src/main.c:24
    #8 0x7ff046501b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)

Direct leak of 432 byte(s) in 1 object(s) allocated from:
    #0 0x7ff04e12c74f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x5474f)
    #1 0x7ff04df002dd in dt_get_printer_info /home/lebedevri/darktable/src/common/cups_print.c:51
    #2 0x7ff02b25d4ca
    #3 0x7ff02b25e3b2
    #4 0x7ff04b9f0503 (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x10503)
LebedevRI added a commit that referenced this pull request May 23, 2015
That was allocated in dt_accel_connect_preset_lib()

Fixes following LeakSanitizer-detected leak:
Direct leak of 112 byte(s) in 7 object(s) allocated from:
    #0 0x7f6bd60fc74f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x5474f)
    #1 0x7f6bd36ef799 in g_malloc (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4f799)
    #2 0x7f6bd5e6ff8a in dt_lib_connect_common_accels /home/lebedevri/darktable/src/libs/lib.c:1103
    #3 0x7f6bd5e731db in dt_view_manager_switch /home/lebedevri/darktable/src/views/view.c:353
    #4 0x7f6bd5cf8572 in _dt_ctl_switch_mode_to /home/lebedevri/darktable/src/control/control.c:630
    #5 0x7f6bd36eac84 in g_main_context_invoke_full (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4ac84)
LebedevRI added a commit that referenced this pull request May 23, 2015
That was allocated in dt_accel_connect_preset_iop()

Fixes following LeakSanitizer-detected leak:
Direct leak of 1616 byte(s) in 101 object(s) allocated from:
    #0 0x7fe9ab77474f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x5474f)
    #1 0x7fe9a8d67799 in g_malloc (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4f799)
    #2 0x7fe9ab3afe5d in dt_iop_connect_common_accels /home/lebedevri/darktable/src/develop/imageop.c:2784
    #3 0x7fe9874ec398
    #4 0x7fe9ab4ebf54 in dt_view_manager_switch /home/lebedevri/darktable/src/views/view.c:401
    #5 0x7fe9ab370506 in _dt_ctl_switch_mode_to /home/lebedevri/darktable/src/control/control.c:630
    #6 0x7fe9a8d62be4 in g_main_context_invoke_full (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4abe4)
LebedevRI added a commit that referenced this pull request May 23, 2015
Probably, this is a regression since cd3ee07

Fixes ~20 LeakSanitizer-detected leaks like:
Direct leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x7f7afad8c895 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x54895)
    #1 0x7f7ad6a500ec (+0x5620ec)
    #2 0x7f7afa94e505 in dt_imageio_load_modules_format /home/lebedevri/darktable/src/common/imageio_module.c:173
    #3 0x7f7afa950a0d in dt_imageio_init /home/lebedevri/darktable/src/common/imageio_module.c:320
    #4 0x7f7afa8f687f in dt_init /home/lebedevri/darktable/src/common/darktable.c:875
    #5 0x400cb8 in main /home/lebedevri/darktable/src/main.c:24
    #6 0x7f7af3161b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)

Direct leak of 304 byte(s) in 3 object(s) allocated from:
    #0 0x7f7afad8c895 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x54895)
    #1 0x7f7af837f7f1 in g_malloc0 (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4f7f1)
    #2 0x7f7afa9508e3 in dt_imageio_load_modules_storage /home/lebedevri/darktable/src/common/imageio_module.c:306
    #3 0x7f7afa950a15 in dt_imageio_init /home/lebedevri/darktable/src/common/imageio_module.c:321
    #4 0x7f7afa8f687f in dt_init /home/lebedevri/darktable/src/common/darktable.c:875
    #5 0x400cb8 in main /home/lebedevri/darktable/src/main.c:24
    #6 0x7f7af3161b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
LebedevRI added a commit that referenced this pull request May 23, 2015
Fixes a LOT of LeakSanitizer-detected leaks like:
Direct leak of 1056 byte(s) in 1 object(s) allocated from:
    #0 0x7ff08a4f474f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x5474f)
    #1 0x7ff067636756
    #2 0x7ff08a262cb7 in dt_lib_load_modules /home/lebedevri/darktable/src/libs/lib.c:718
    #3 0x7ff08a265586 in dt_lib_init /home/lebedevri/darktable/src/libs/lib.c:1008
    #4 0x7ff08a05e8c7 in dt_init /home/lebedevri/darktable/src/common/darktable.c:889
    #5 0x400cb8 in main /home/lebedevri/darktable/src/main.c:24
    #6 0x7ff0828c9b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
LebedevRI added a commit that referenced this pull request May 23, 2015
Fixes several LeakSanitizer-detected leaks like:
Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7ff195fd474f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x5474f)
    #1 0x7ff18e98282d (/usr/lib/x86_64-linux-gnu/libcups.so.2+0x2282d)
    #2 0x7ff18e9845a5 in _cupsGetDests (/usr/lib/x86_64-linux-gnu/libcups.so.2+0x245a5)
    #3 0x7ff18e98553b in cupsGetDests2 (/usr/lib/x86_64-linux-gnu/libcups.so.2+0x2553b)
    #4 0x7ff195da8c8d in dt_get_papers /home/lebedevri/darktable/src/common/cups_print.c:189
    #5 0x7ff16987610e
    #6 0x7ff169879cc2
    #7 0x7ff195d42cb7 in dt_lib_load_modules /home/lebedevri/darktable/src/libs/lib.c:718
    #8 0x7ff195d45586 in dt_lib_init /home/lebedevri/darktable/src/libs/lib.c:1008
    #9 0x7ff195b3e8c7 in dt_init /home/lebedevri/darktable/src/common/darktable.c:889
    #10 0x400cb8 in main /home/lebedevri/darktable/src/main.c:24
    #11 0x7ff18e3a9b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
    #12 0x400bd8 (/usr/local/bin/darktable+0x400bd8)

Indirect leak of 304 byte(s) in 1 object(s) allocated from:
    #0 0x7ff195fd4a06 in __interceptor_realloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x54a06)
    #1 0x7ff18e9a4a58 in cupsAddOption (/usr/lib/x86_64-linux-gnu/libcups.so.2+0x44a58)
    #2 0x7ff18e9847f2 in _cupsGetDests (/usr/lib/x86_64-linux-gnu/libcups.so.2+0x247f2)
    #3 0x7ff18e98553b in cupsGetDests2 (/usr/lib/x86_64-linux-gnu/libcups.so.2+0x2553b)
    #4 0x7ff195da8c8d in dt_get_papers /home/lebedevri/darktable/src/common/cups_print.c:189
    #5 0x7ff16987610e
    #6 0x7ff169879cc2
    #7 0x7ff195d42cb7 in dt_lib_load_modules /home/lebedevri/darktable/src/libs/lib.c:718
    #8 0x7ff195d45586 in dt_lib_init /home/lebedevri/darktable/src/libs/lib.c:1008
    #9 0x7ff195b3e8c7 in dt_init /home/lebedevri/darktable/src/common/darktable.c:889
    #10 0x400cb8 in main /home/lebedevri/darktable/src/main.c:24
    #11 0x7ff18e3a9b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
    #12 0x400bd8 (/usr/local/bin/darktable+0x400bd8)
LebedevRI added a commit that referenced this pull request May 23, 2015
Fixes LeakSanitizer-detected leaks like:
Direct leak of 264 byte(s) in 1 object(s) allocated from:
    #0 0x7fbe6c634895 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x54895)
    #1 0x7fbe64fe8def in cupsCopyDestInfo (/usr/lib/x86_64-linux-gnu/libcups.so.2+0x28def)
    #2 0x7fbe6c408d5c in dt_get_papers /home/lebedevri/darktable/src/common/cups_print.c:205
    #3 0x7fbe3fee610e
    #4 0x7fbe3fee9cc2
    #5 0x7fbe6c3a2d07 in dt_lib_load_modules /home/lebedevri/darktable/src/libs/lib.c:718
    #6 0x7fbe6c3a55d6 in dt_lib_init /home/lebedevri/darktable/src/libs/lib.c:1008
    #7 0x7fbe6c19e917 in dt_init /home/lebedevri/darktable/src/common/darktable.c:889
    #8 0x400cb8 in main /home/lebedevri/darktable/src/main.c:24
    #9 0x7fbe64a09b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
    #10 0x400bd8 (/usr/local/bin/darktable+0x400bd8)
LebedevRI added a commit that referenced this pull request May 23, 2015
And 1 related patch sent into CUPS: https://www.cups.org/str.php?L4634

Fixes LeakSanitizer-detected leaks like:
Direct leak of 12808 byte(s) in 1 object(s) allocated from:
    #0 0x7ffb35bc4895 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x54895)
    #1 0x7ffb2e58073c (/usr/lib/x86_64-linux-gnu/libcups.so.2+0x3073c)
    #2 0x7ffb2e5834f0 in httpConnect2 (/usr/lib/x86_64-linux-gnu/libcups.so.2+0x334f0)
    #3 0x7ffb2e5739df in cupsConnectDest (/usr/lib/x86_64-linux-gnu/libcups.so.2+0x239df)
    #4 0x7ffb35998d51 in dt_get_papers /home/lebedevri/darktable/src/common/cups_print.c:200
    #5 0x7ffb0947610e
    #6 0x7ffb094763da
    #7 0x7ffb33488503 (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x10503)
    #8 0x7ffb334a1fa6 in g_signal_emit_valist (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x29fa6)
    #9 0x7ffb334a2e49 in g_signal_emit_by_name (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x2ae49)
    #10 0x7ffb35700af9 in dt_bauhaus_combobox_set /home/lebedevri/darktable/src/bauhaus/bauhaus.c:1104
    #11 0x7ffb09479caf
    #12 0x7ffb35932d17 in dt_lib_load_modules /home/lebedevri/darktable/src/libs/lib.c:718
    #13 0x7ffb359355e6 in dt_lib_init /home/lebedevri/darktable/src/libs/lib.c:1008
    #14 0x7ffb3572e927 in dt_init /home/lebedevri/darktable/src/common/darktable.c:889
    #15 0x400cb8 in main /home/lebedevri/darktable/src/main.c:24
    #16 0x7ffb2df99b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
    #17 0x400bd8 (/usr/local/bin/darktable+0x400bd8)
LebedevRI added a commit that referenced this pull request May 23, 2015
…has not changed

Fixes following LeakSanitizer-detected leak:
Direct leak of 1548384 byte(s) in 3 object(s) allocated from:
    #0 0x7f913367474f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x5474f)
    #1 0x7f9130c67799 in g_malloc (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4f799)
    #2 0x7f91325abb85 (/usr/lib/x86_64-linux-gnu/libgdk-3.so.0+0x53b85)
    #3 0x7f9133274b15 in dt_ctl_set_display_profile /home/lebedevri/darktable/src/control/control.c:199
    #4 0x7f9133391d6e in window_configure /home/lebedevri/darktable/src/gui/gtk.c:625
    #5 0x7f9132a0531c (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x1ed31c)
    #6 0x7f9130f382d4 in g_closure_invoke (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x102d4)
    #7 0x7f9130f4a03b (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x2203b)
    #8 0x7f9130f521a4 in g_signal_emit_valist (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x2a1a4)
    #9 0x7f9130f528fe in g_signal_emit (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x2a8fe)
    #10 0x7f9132b35de3 (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x31dde3)
    #11 0x7f9132a04819 in gtk_main_do_event (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x1ec819)
    #12 0x7f91325a7b11 (/usr/lib/x86_64-linux-gnu/libgdk-3.so.0+0x4fb11)
    #13 0x7f9130c61c3c in g_main_context_dispatch (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x49c3c)
    #14 0x7f9130c61f1f (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x49f1f)
    #15 0x7f9130c62241 in g_main_loop_run (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4a241)
    #16 0x7f9132a03bf4 in gtk_main (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x1ebbf4)
    #17 0x7f913339d36b in dt_gui_gtk_run /home/lebedevri/darktable/src/gui/gtk.c:964
    #18 0x400cf3 in main /home/lebedevri/darktable/src/main.c:25
    #19 0x7f912ba49b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
    #20 0x400bd8 (/usr/local/bin/darktable+0x400bd8)
LebedevRI added a commit that referenced this pull request May 23, 2015
… got if profile has not changed

Fixes following LeakSanitizer-detected leak:
Direct leak of 516129 byte(s) in 1 object(s) allocated from:
    #0 0x7f8c5f2bc74f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x5474f)
    #1 0x7f8c5c8967cb in g_file_get_contents (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x367cb)
    #2 0x7f8c5eeb809a in dt_ctl_get_display_profile_colord_callback /home/lebedevri/darktable/src/control/control.c:125
    #3 0x7f8c5ce3cdf6 in g_simple_async_result_complete (/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0+0x74df6)
    #4 0x7f8c5ce3ce58 (/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0+0x74e58)
    #5 0x7f8c5c8a9b4c in g_main_context_dispatch (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x49b4c)
    #6 0x7f8c5c8a9f1f (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x49f1f)
    #7 0x7f8c5c8aa241 in g_main_loop_run (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4a241)
    #8 0x7f8c5e64bbf4 in gtk_main (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x1ebbf4)
    #9 0x7f8c5efe5384 in dt_gui_gtk_run /home/lebedevri/darktable/src/gui/gtk.c:964
    #10 0x400cf3 in main /home/lebedevri/darktable/src/main.c:25
    #11 0x7f8c57691b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
    #12 0x400bd8 (/usr/local/bin/darktable+0x400bd8)
LebedevRI added a commit that referenced this pull request May 23, 2015
I see no segfault, not in picasa.c nor in facebook.c, so it must have been fixed already.

Fixes following LeakSanitizer-detected leak:
Direct leak of 36032 byte(s) in 1 object(s) allocated from:
    #0 0x7fe413b94895 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x54895)
    #1 0x7fe40f1b5319 (/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4+0x1d319)
    #2 0x7fe40f1c4a03 in curl_easy_init (/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4+0x2ca03)
    #3 0x7fe3ee78850b
    #4 0x7fe3ee78c10e
    #5 0x7fe4137589d3 in dt_imageio_load_modules_storage /home/lebedevri/darktable/src/common/imageio_module.c:306
    #6 0x7fe413758b05 in dt_imageio_init /home/lebedevri/darktable/src/common/imageio_module.c:321
    #7 0x7fe4136fe91f in dt_init /home/lebedevri/darktable/src/common/darktable.c:875
    #8 0x400cb8 in main /home/lebedevri/darktable/src/main.c:24
    #9 0x7fe40bf69b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
    #10 0x400bd8 (/usr/local/bin/darktable+0x400bd8)
LebedevRI added a commit that referenced this pull request May 23, 2015
TODO(?): move some cleanup code into this new function?
Might help with current hang on quit if main window is not in focus.

Fixes following LeakSanitizer-detected leak:
Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x7f2cccb04895 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x54895)
    #1 0x7f2ccc712314 in dt_control_jobs_init /home/lebedevri/darktable/src/control/jobs.c:488
    #2 0x7f2ccc703b45 in dt_control_init /home/lebedevri/darktable/src/control/control.c:319
    #3 0x7f2ccc66e107 in dt_init /home/lebedevri/darktable/src/common/darktable.c:808
    #4 0x400cb8 in main /home/lebedevri/darktable/src/main.c:24
    #5 0x7f2cc4ed9b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
edgomez added a commit that referenced this pull request Nov 2, 2015
Direct leak of 20 byte(s) in 1 object(s) allocated from:
    #0 0x7f62a93db37a in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9437a)
    #1 0x7f62a8ede41e in dt_guides_init /home/ed/programming/workspace/darktable/src/gui/guides.c:414
    #2 0x7f62a8d2b9fd in dt_init /home/ed/programming/workspace/darktable/src/common/darktable.c:872
    #3 0x400aef in main /home/ed/programming/workspace/darktable/src/main.c:24
    #4 0x7f62a2c02b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
TurboGit added a commit that referenced this pull request Dec 4, 2018
To reproduce the issue:
- create 3 circles, will be named #2 #3 #4
- delete circle #3
- add a new circle, will be named #4 (so two #4)
TurboGit added a commit that referenced this pull request Dec 4, 2018
To reproduce the issue:
- create 3 circles, will be named #2 #3 #4
- delete circle #3
- add a new circle, will be named #4 (so two #4)
phweyland referenced this pull request in phweyland/darktable Dec 9, 2018
To reproduce the issue:
- create 3 circles, will be named #2 #3 #4
- delete circle #3
- add a new circle, will be named #4 (so two #4)
cryptomilk added a commit to cryptomilk/darktable that referenced this pull request Nov 24, 2019
READ of size 24 at 0x7fffffffa2b8 thread T0
    #0 0x7ffff761162d in memmove (/usr/lib64/libasan.so.5+0x9f62d)
    #1 0x7ffff4a72a46 in memmove /usr/include/bits/string_fortified.h:40
    darktable-org#2 0x7ffff4a72a46 in _cmsDupDefaultFn /usr/src/debug/lcms2-2.9-2.5.x86_64/src/cmserr.c:174
    darktable-org#3 0x7ffff4a6efba in cmsWriteTag /usr/src/debug/lcms2-2.9-2.5.x86_64/src/cmsio0.c:1733
    darktable-org#4 0x7ffff4a6efba in cmsWriteTag /usr/src/debug/lcms2-2.9-2.5.x86_64/src/cmsio0.c:1639
    darktable-org#5 0x7ffff6c18c06 in _create_lcms_profile /home/asn/workspace/projects/darktable/src/common/colorspaces.c:299
    darktable-org#6 0x7ffff6c1900b in _colorspaces_create_srgb_profile /home/asn/workspace/projects/darktable/src/common/colorspaces.c:330
    darktable-org#7 0x7ffff6c1908e in dt_colorspaces_create_srgb_profile /home/asn/workspace/projects/darktable/src/common/colorspaces.c:340
    darktable-org#8 0x7ffff6c221f5 in dt_colorspaces_init /home/asn/workspace/projects/darktable/src/common/colorspaces.c:1270
    darktable-org#9 0x7ffff6c34a5a in dt_init /home/asn/workspace/projects/darktable/src/common/darktable.c:821
    darktable-org#10 0x4009be in main /home/asn/workspace/projects/darktable/src/main.c:92
    darktable-org#11 0x7ffff67bee0a in __libc_start_main (/lib64/libc.so.6+0x26e0a)
    darktable-org#12 0x4008e9 in _start (/home/asn/workspace/projects/darktable/obj-asan/src/darktable+0x4008e9)
cryptomilk added a commit to cryptomilk/darktable that referenced this pull request Nov 24, 2019
READ of size 24 at 0x7fffffffa2b8 thread T0
    #0 0x7ffff761162d in memmove (/usr/lib64/libasan.so.5+0x9f62d)
    #1 0x7ffff4a72a46 in memmove /usr/include/bits/string_fortified.h:40
    darktable-org#2 0x7ffff4a72a46 in _cmsDupDefaultFn /usr/src/debug/lcms2-2.9-2.5.x86_64/src/cmserr.c:174
    darktable-org#3 0x7ffff4a6efba in cmsWriteTag /usr/src/debug/lcms2-2.9-2.5.x86_64/src/cmsio0.c:1733
    darktable-org#4 0x7ffff4a6efba in cmsWriteTag /usr/src/debug/lcms2-2.9-2.5.x86_64/src/cmsio0.c:1639
    darktable-org#5 0x7ffff6c18c06 in _create_lcms_profile /home/asn/workspace/projects/darktable/src/common/colorspaces.c:299
    darktable-org#6 0x7ffff6c1900b in _colorspaces_create_srgb_profile /home/asn/workspace/projects/darktable/src/common/colorspaces.c:330
    darktable-org#7 0x7ffff6c1908e in dt_colorspaces_create_srgb_profile /home/asn/workspace/projects/darktable/src/common/colorspaces.c:340
    darktable-org#8 0x7ffff6c221f5 in dt_colorspaces_init /home/asn/workspace/projects/darktable/src/common/colorspaces.c:1270
    darktable-org#9 0x7ffff6c34a5a in dt_init /home/asn/workspace/projects/darktable/src/common/darktable.c:821
    darktable-org#10 0x4009be in main /home/asn/workspace/projects/darktable/src/main.c:92
    darktable-org#11 0x7ffff67bee0a in __libc_start_main (/lib64/libc.so.6+0x26e0a)
    darktable-org#12 0x4008e9 in _start (/home/asn/workspace/projects/darktable/obj-asan/src/darktable+0x4008e9)

(cherry picked from commit 3337ac2d18588a89580a8685f49afb5918cc1d30)
cryptomilk added a commit to cryptomilk/darktable that referenced this pull request Nov 24, 2019
READ of size 24 at 0x7fffffffa2b8 thread T0
    #0 0x7ffff761162d in memmove (/usr/lib64/libasan.so.5+0x9f62d)
    #1 0x7ffff4a72a46 in memmove /usr/include/bits/string_fortified.h:40
    darktable-org#2 0x7ffff4a72a46 in _cmsDupDefaultFn /usr/src/debug/lcms2-2.9-2.5.x86_64/src/cmserr.c:174
    darktable-org#3 0x7ffff4a6efba in cmsWriteTag /usr/src/debug/lcms2-2.9-2.5.x86_64/src/cmsio0.c:1733
    darktable-org#4 0x7ffff4a6efba in cmsWriteTag /usr/src/debug/lcms2-2.9-2.5.x86_64/src/cmsio0.c:1639
    darktable-org#5 0x7ffff6c18c06 in _create_lcms_profile /home/asn/workspace/projects/darktable/src/common/colorspaces.c:299
    darktable-org#6 0x7ffff6c1900b in _colorspaces_create_srgb_profile /home/asn/workspace/projects/darktable/src/common/colorspaces.c:330
    darktable-org#7 0x7ffff6c1908e in dt_colorspaces_create_srgb_profile /home/asn/workspace/projects/darktable/src/common/colorspaces.c:340
    darktable-org#8 0x7ffff6c221f5 in dt_colorspaces_init /home/asn/workspace/projects/darktable/src/common/colorspaces.c:1270
    darktable-org#9 0x7ffff6c34a5a in dt_init /home/asn/workspace/projects/darktable/src/common/darktable.c:821
    darktable-org#10 0x4009be in main /home/asn/workspace/projects/darktable/src/main.c:92
    darktable-org#11 0x7ffff67bee0a in __libc_start_main (/lib64/libc.so.6+0x26e0a)
    darktable-org#12 0x4008e9 in _start (/home/asn/workspace/projects/darktable/obj-asan/src/darktable+0x4008e9)
Sturmflut pushed a commit to Sturmflut/darktable that referenced this pull request Sep 1, 2022
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.

5 participants