oyranos-cms / oyranos

Colour Management System
https://gitlab.com/oyranos/oyranos
Other
18 stars 6 forks source link

Crash in oyStringListFreeDoubles_ #21

Closed davispuh closed 9 years ago

davispuh commented 9 years ago

Not sure what exactly it caused.

oyranos-monitor[2179]: segfault at 0 ip 00007fdbc4824fe6 sp 00007ffe22942108 error 4 in libc-2.21.so[7fdbc46fe000+199000]
systemd-coredump[2187]: Process 2179 (oyranos-monitor) of user 1000 dumped core.

#0  0x00007f6c265e5fe6 in __strcmp_ssse3 () from /usr/lib/libc.so.6
#1  0x00007f6c2549c81f in oyStringListFreeDoubles_ (list=0x182fcd0, list_n=list_n@entry=0x7ffe01f09150,
    deallocateFunc=0x7f6c25495890 <oyDeAllocateFunc_>)
    at /mnt/AUR/oyranos-git/src/oyranos/src/liboyranos_core/oyranos_string.c:855
#2  0x00007f6c2549a62e in oyDataPathsGet_ (count=count@entry=0x7ffe01f092c4, subdir=subdir@entry=0x7f6c25b453bf "color/icc",
    data=data@entry=2, owner=owner@entry=0, allocateFunc=allocateFunc@entry=0x7f6c25495780 <oyAllocateFunc_>)
    at /mnt/AUR/oyranos-git/src/oyranos/src/liboyranos_core/oyranos_io_core.c:1546
#3  0x00007f6c25b20ff2 in oyProfilePathsGet_ (count=count@entry=0x7ffe01f092c4,
    allocateFunc=allocateFunc@entry=0x7f6c25495780 <oyAllocateFunc_>)
    at /mnt/AUR/oyranos-git/src/oyranos/src/liboyranos_config/oyranos_io.c:239
#4  0x00007f6c25b2200e in oyProfileListGet_ (colorsig=colorsig@entry=0x0, flags=flags@entry=0, size=size@entry=0x7ffe01f0938c)
    at /mnt/AUR/oyranos-git/src/oyranos/src/liboyranos_config/oyranos_io.c:435
#5  0x00007f6c25b34269 in oyProfiles_Create (patterns=0x1830780, flags=0, object=object@entry=0x0)
    at /mnt/AUR/oyranos-git/src/oyranos/src/API_generated/oyProfiles_s.c:355
#6  0x00007f6c25b385be in oyDeviceSetup (device=0x18222c0, options=0x1820370)
    at /mnt/AUR/oyranos-git/src/oyranos/src/API_generated/oyranos_devices.c:369
#7  0x000000000040624c in main (argc=<optimized out>, argv=<optimized out>)
    at /mnt/AUR/oyranos-git/src/oyranos/src/tools/oyranos_gamma.c:874

basically strcmp called with null pointer, look at oyranos_string.c#855 there

if(strcmp(list[i], list[k]) == 0)
davispuh commented 9 years ago

oh lol, just noticed f3cc7588, I'll recompile it fixed this.

beku commented 9 years ago

Thanks for reporting. I did not check before committing :-/