unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 6626e54828c4c40fa1db12e18a15b259b27a8157 894 bytes (raw)
name: packages/patches/imagemagick-test-segv.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 
This patch works around a segmentation fault in 'Magick++/tests/color' when
running 'Magick++/tests/tests.tap'.  Here we get an exception early on, which
is supposedly harmless:

  Caught exception: color: UnableToOpenConfigureFile `colors.xml' @ warning/configure.c/GetConfigureOptions/706

However, when the stack unwinders run, 'UnregisterDOTImage' gets called even
though 'RegisterDOTImage' hadn't been called yet; thus, 'graphic_context' in
coders/dot.c is NULL, leading to the segfault.

--- ImageMagick-6.9.2-1/coders/dot.c	2015-09-16 17:32:42.900323334 +0200
+++ ImageMagick-6.9.2-1/coders/dot.c	2015-09-16 17:32:48.312367636 +0200
@@ -240,6 +240,7 @@ ModuleExport void UnregisterDOTImage(voi
   (void) UnregisterMagickInfo("GV");
   (void) UnregisterMagickInfo("DOT");
 #if defined(MAGICKCORE_GVC_DELEGATE)
+  if (graphic_context != NULL)
   gvFreeContext(graphic_context);
 #endif
 }

debug log:

solving 6626e54828c4c40fa1db12e18a15b259b27a8157 ...
found 6626e54828c4c40fa1db12e18a15b259b27a8157 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).