From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: adam plaice Newsgroups: gmane.emacs.bugs Subject: bug#29581: 26.0.90; SVG file can cause emacs to crash (imagemagick) Date: Tue, 5 Dec 2017 19:59:06 +0000 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1512504021 27993 195.159.176.226 (5 Dec 2017 20:00:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 5 Dec 2017 20:00:21 +0000 (UTC) To: 29581@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 05 21:00:16 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eMJO2-00070H-Vl for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Dec 2017 21:00:15 +0100 Original-Received: from localhost ([::1]:51867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMJOA-0006pN-5U for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Dec 2017 15:00:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMJNx-0006js-7v for bug-gnu-emacs@gnu.org; Tue, 05 Dec 2017 15:00:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eMJNr-000067-8p for bug-gnu-emacs@gnu.org; Tue, 05 Dec 2017 15:00:09 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39427) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eMJNr-00005z-5K for bug-gnu-emacs@gnu.org; Tue, 05 Dec 2017 15:00:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eMJNq-0000H7-MJ for bug-gnu-emacs@gnu.org; Tue, 05 Dec 2017 15:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: adam plaice Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Dec 2017 20:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29581 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1512503965986 (code B ref -1); Tue, 05 Dec 2017 20:00:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Dec 2017 19:59:25 +0000 Original-Received: from localhost ([127.0.0.1]:48108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eMJNE-0000Fp-Oj for submit@debbugs.gnu.org; Tue, 05 Dec 2017 14:59:25 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eMJND-0000Fc-5f for submit@debbugs.gnu.org; Tue, 05 Dec 2017 14:59:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eMJN6-00087m-IZ for submit@debbugs.gnu.org; Tue, 05 Dec 2017 14:59:17 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:56864) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eMJN6-00087W-FS for submit@debbugs.gnu.org; Tue, 05 Dec 2017 14:59:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMJN4-00066k-OF for bug-gnu-emacs@gnu.org; Tue, 05 Dec 2017 14:59:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eMJN3-00084P-7X for bug-gnu-emacs@gnu.org; Tue, 05 Dec 2017 14:59:14 -0500 Original-Received: from mail-yb0-x22f.google.com ([2607:f8b0:4002:c09::22f]:45053) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eMJN3-00084E-1D for bug-gnu-emacs@gnu.org; Tue, 05 Dec 2017 14:59:13 -0500 Original-Received: by mail-yb0-x22f.google.com with SMTP id z62so640649yba.11 for ; Tue, 05 Dec 2017 11:59:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to :content-transfer-encoding; bh=D1qEx0rt8X4ZWwlJctdBT8dSYnk/HcDxTCe5stOZw1E=; b=t84/c3n2bqv9aPjDRtdv3BA29HjsTvHE5x80V8GcRgwegVK8LCxi3Ejsip47kAgWcS LsFJn1YVGh4sjZ/UNuECJSgOVFPHATCBxBdNSn/qbMjvmkDsA0Nb8FWxNq+54u/+HQvE rzJCwvdffKDjJK+RuW3b0AC6bN606YTky73BRTYrr6tt2d220YBqO9ByIu25soYkGDuv CTYeyr5xSDn3al5FGTPcztNe+Z3Bz/2elmZervIxJPlZ6sCq6WEWVo+87QqbvU46zxYS f9gjRPxjXD3eWe7HfNSCRu1qeAIht60qpYJ5+jlEhqzkjlYjOS+48J1MQ5dv78DOXrIi j98Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to:content-transfer-encoding; bh=D1qEx0rt8X4ZWwlJctdBT8dSYnk/HcDxTCe5stOZw1E=; b=VbmAzFQdk0spCtAOJW+axVWcQHDrOAvE4Bp7FjuHQUTmUqXnvpn7Qm3hV4WrA2cKfY nI1P03ogvmZ9jR+yJCph3+C81iy3AV3H7ZDqk8uDDMnLQlNBmugsPHFfltiGUwCjhrB6 AMqAA8yrkFMOoVjrgRHYkkHtsxT6d7xgqNh1Dj3+b8v9CnrbPOm4lP5BNo0Kp94SPb2w JL/+b0JMdkk+e8fD9FO0A/HT1tOaMBz1KkSFL7SPO/c1SaqirbyYeYm8kc/Tg5nvMEwh NXg66yaTndpSO3qFErSDn1c5xHNYEQKVS7I5K9END0+4s6FuuzsnYeLsabFQ3E/F4pxn rI8Q== X-Gm-Message-State: AJaThX5jlmbNFcy6hmdalZTJb6JzuaxBpfrEy+M9lwXmA8scmT9puH2C 1AlLuWfFdfSfdVxFIyXj9TdvQbl539bI/XRkW38= X-Google-Smtp-Source: AGs4zMbWgon+Oa+/pgjprRfIC04W/M3c7/ojaJUZLwcmCn6GLVz33Z+5bCwycSrq9xZtIU62O+L8g7drK7/YUzvCeVk= X-Received: by 10.37.204.130 with SMTP id l124mr13082245ybf.320.1512503946991; Tue, 05 Dec 2017 11:59:06 -0800 (PST) Original-Received: by 10.37.129.201 with HTTP; Tue, 5 Dec 2017 11:59:06 -0800 (PST) X-Google-Sender-Auth: VMne5KcaCq5ErnpU79q4GlXdLVU X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140730 Archived-At: If emacs, on Linux, is compiled with imagemagick support, then opening a specific svg file can cause emacs to crash. The bug report is based on https://emacs.stackexchange.com/questions/37216/open-svg-files-in-xml-mode * To reproduce: 1. Save the following to test.svg (svg file taken from the above mentioned stackexchange question): 2. Run: emacs -Q test.svg * Expected result: A blank square or nothing is displayed (since the svg file does not contain= any actual image) and (optionally) an error message is displayed. * Actual result: A segmentation fault occurs (with the following output) and emacs crashes: Fatal error 11: Segmentation fault Backtrace: emacs[0x50e019] emacs[0x4f46c7] emacs[0x50c9ce] emacs[0x50ccd3] emacs[0x50cd10] /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f2f395d5390] /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/modules-Q16/coders/svg.so(+0xb8= b8)[0x7f2f26b9a8b8] /usr/lib/x86_64-linux-gnu/libMagickCore-6.Q16.so.2(ReadImage+0x198)[0x7f2f3= bd688e8] /usr/lib/x86_64-linux-gnu/libMagickWand-6.Q16.so.2(MagickReadImage+0x6a)[0x= 7f2f3c23aa3a] emacs[0x5e39c2] emacs[0x5ea8b4] emacs[0x5eaba0] emacs[0x56ca4f] emacs[0x56bb26] emacs[0x5a4f78] emacs[0x56b7df] emacs[0x56ba8b] emacs[0x5a4f78] emacs[0x56b7df] emacs[0x56ba8b] emacs[0x5a4f78] emacs[0x56b7df] emacs[0x56ba8b] emacs[0x5a4f78] emacs[0x56b7df] emacs[0x56ba8b] emacs[0x5a4f78] emacs[0x56b7df] emacs[0x56ba8b] emacs[0x5a4f78] emacs[0x56b7df] emacs[0x56ba8b] emacs[0x5a4f78] emacs[0x56b7df] emacs[0x56ba8b] emacs[0x5a4f78] emacs[0x56b7df] emacs[0x56ba8b] emacs[0x5a4f78] emacs[0x56b7df] emacs[0x56ba8b] ... Segmentation fault (core dumped) * Possibly relevant information The error occurs only when emacs is compiled with ImageMagick support. If it's compiled --without-imagemagick then the error does not occur. Also, when emacs is forced/tricked to use the librsvg backend, rather than imagemagick, (even when imagemagick support was compiled in) the error does not occur. Trying to manipulate the file test.svg directly with imagemagick, for example via: convert test.svg test.png also results in an error: Aborted (core dumped) so the "fault" is almost certainly on the side of imagemagick, but perhaps there's something that emacs can do about it. The bug is present in both emacs-25.3 and the latest emacs from the emacs-26 branch. It was not present, by default, in emacs-24.5.1 and earlier (as expected, the image was not displayed, but emacs did not crash), though it seems to be because for these versions of emacs, the imagemagick backend was not the default =E2=80=94 if emacs is forced to use the imagemagick backend, the bug/crash does occur. Thank you and best regards, Adam In GNU Emacs 26.0.90 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-12-05 built on adam Repository revision: 46d62b9f36f1ef771a077df4227ae6559fb32e84 Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Ubuntu 16.04.3 LTS Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --with-modules --without-pop' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES LIBSYSTEMD LCMS2 Important settings: value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 94561 8308) (symbols 48 20332 1) (miscs 40 42 118) (strings 32 28247 1513) (string-bytes 1 744109) (vectors 16 13967) (vector-slots 8 491974 7546) (floats 8 50 67) (intervals 56 219 0) (buffers 992 12) (heap 1024 35241 1000))