Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 541326

Summary: media-gfx/darktable crashes with x11-libs/cairo-1.14.0-r1
Product: Gentoo Linux Reporter: Alexander Sergeyev <sergeev917>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED FIXED    
Severity: normal CC: Adrian.Bassett, amd64, graphics+disabled, sergeev917, tetromino, yngwin
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
gdb backtrace

Description Alexander Sergeyev 2015-02-25 10:35:58 UTC
Created attachment 397468 [details]
emerge --info

Hi,
recently I've updated cairo to unstable version x11-libs/cairo-1.14.0-r1 and got darktable crashing on switching from lighttable to darkroom mode: thumbnails are rendered normally, but after attempt to view/edit selected image darktable fails with heap corruption (possible security implications?):
Error in `darktable': malloc(): smallbin double linked list corrupted

Darktable versions 1.6.1 and 1.6.2 seems to be affected. Downgrading to x11-libs/cairo-1.12.18-r1 solves the problem.

x11-libs/cairo, enabled use flags: X glib svg xcb
media-gfx/darktable, enabled use flags: opencl openmp rawspeed cpu_flags_x86_sse3

emerge --info output and fail backtrace are attached.
Comment 1 Alexander Sergeyev 2015-02-25 10:36:56 UTC
Created attachment 397470 [details]
gdb backtrace

gdb backtrace for the fail
Comment 2 Andrey Volkov 2015-03-02 19:23:47 UTC
I have similar bug with evince and cairo-1.14.0-r1
Sometimes it crashes on opening pdf files.

Upstream bug:
https://bugs.freedesktop.org/show_bug.cgi?id=85151

Try this patch from upstream:
http://cgit.freedesktop.org/cairo/commit/?id=2de69581c28bf115852037ca41eba13cb7335976

It was the solution for evince
Comment 3 Alexander Sergeyev 2015-03-02 21:03:08 UTC
(In reply to Andrey Volkov from comment #2)
> Try this patch from upstream:
> http://cgit.freedesktop.org/cairo/patch/?id=2de69581c28bf115852037ca41eba13cb7335976

I've checked out this patch -- it fixes the problem, thanks.
Comment 4 Matt Turner gentoo-dev 2015-03-04 06:53:39 UTC
cairo maintainers: Opinions on how we should add this? Kind of sucks to add it in 1.14.0-r2 and then make users wait a really long time for the next stabilization round.
Comment 5 Matt Turner gentoo-dev 2015-03-04 06:56:00 UTC
Oh, sorry. Confusion on my part. We're not stabilizing 1.14.0-r1.

I'll add this to 1.14.0-r2 as a revbump unless someone beats me to it.
Comment 6 Alexandre Rostovtsev (RETIRED) gentoo-dev 2015-03-05 18:24:34 UTC
Thanks for investigating this, should be fixed in cairo-1.14.0-r2

+*cairo-1.14.0-r2 (05 Mar 2015)
+
+  05 Mar 2015; Alexandre Rostovtsev <tetromino@gentoo.org>
+  +cairo-1.14.0-r2.ebuild, +files/cairo-1.14.0-CFF-unaligned-access.patch,
+  +files/cairo-1.14.0-image-negative-span-length.patch,
+  +files/cairo-1.14.0-tor-scan-converter-do_fullrow-intersection.patch,
+  +files/cairo-1.14.0-xcb-0-sized-glyph.patch,
+  +files/cairo-1.14.0-xlib-0-sized-glyph.patch:
+  Add upstream patches to fix several crashes. Should fix bug #541326 (heap
+  corruption in darktable and evince), thanks to sergeev917 and Andrey Volkov.