From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#61896: 30.0.50; Emacs crashes because of an invalid free Date: Thu, 02 Mar 2023 10:58:08 +0000 Message-ID: <87356n2zen.fsf@posteo.net> References: <87cz5rctz2.fsf@zohomail.eu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13902"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61896@debbugs.gnu.org To: Rah Guzar Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 02 11:58:14 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXgda-0003K3-8e for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Mar 2023 11:58:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXgdS-0003iP-63; Thu, 02 Mar 2023 05:58:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXgdP-0003hx-5B for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2023 05:58:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXgdO-0006qc-GV for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2023 05:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pXgdO-0001ah-CZ for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2023 05:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Mar 2023 10:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61896 X-GNU-PR-Package: emacs Original-Received: via spool by 61896-submit@debbugs.gnu.org id=B61896.16777546806108 (code B ref 61896); Thu, 02 Mar 2023 10:58:02 +0000 Original-Received: (at 61896) by debbugs.gnu.org; 2 Mar 2023 10:58:00 +0000 Original-Received: from localhost ([127.0.0.1]:55942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXgdM-0001aR-57 for submit@debbugs.gnu.org; Thu, 02 Mar 2023 05:58:00 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:49163) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXgdK-0001aC-0h for 61896@debbugs.gnu.org; Thu, 02 Mar 2023 05:57:59 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id ECC5B240609 for <61896@debbugs.gnu.org>; Thu, 2 Mar 2023 11:57:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1677754672; bh=hsWIBBRuMg0ybzfHXFzLeLCrL/xEqjA6kec7I+8cNYo=; h=From:To:Cc:Subject:Date:From; b=K0rSFZm6ecT2sRzaCe9GKn2IVolEH8pnzSxA5wZ17GTMae+qzZnLUJj3yTtcO1ZdR WPVdLg31HW+txeOo8Qo3WZcOS4hYO8w3oVoj+MgF8c7KgW8+mX5rgSSJjoE2LxDObS N0to25sIo2Gsbami3xba7SLLzUeeCrpwxCq1oOAIVdgudgEkpiPse5dVHQjlrNE+z0 +T+rZFnzFpwIuh/Vap5r17qU2yW6UTSN/PvxWG1NqOOm356M4jhpG8BuJGgtIIILeb zmzsJx16MWwqStmn4iocx7QszY7N1Bu4yqWIiXEKKtLxdnhUA4SbuQmm6F9/PfqKMn UulGmv6zxAXGA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PS7Ns0RFNz9rxM; Thu, 2 Mar 2023 11:57:48 +0100 (CET) In-Reply-To: <87cz5rctz2.fsf@zohomail.eu> (Rah Guzar's message of "Thu, 02 Mar 2023 11:30:40 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257133 Archived-At: Rah Guzar writes: > I encountered something very similar today after updating emacs. > In my case the crash was caused by trying to read an email from mu4e, > which I have installed as a systems package. > > Like you I could everything worked fine with `emacs -Q`. After adding, > mu4e to the load path, I could load it and read messages successfully. > But with my own configuration it crashed even after removing all mu4e > related settings from my config. Emacs crashed and I could see the > following on the terminal I launched it from > > free(): invalid pointer > Fatal error 6: Aborted > > along with a backtrace. This was exactly the issue I had, though in my case the byte code was not from a site directory. Could you start Emacs using GDB print and run the xbacktrace command that is defined in emacs.git's src/.gdbinit file (I believe this is best done by starting GDB within the src directory)? > After finding this thread, I copied the mu4e lisp files to a directory > writable by me and byte compiled those. Adding this directory to load-path > has fixed my problem. > > I think the distro provided elc files were compiled by Emacs 28 > and I am using a build of emacs 29 and some incompatible change > recently caused this problem. > > For now, my fix works but is there a good way to deal with possibly > incompatible bytecode in site-lisp directory? > > Rah Guzar > > Philip Kaludercic writes: > >> Emacs just crashes out of nowhere, e.g. after I open a my init file. >> >> I have had this device for a while on a device of mine, that I couldn't >> reproduce on my main workstation or using emacs -Q. Apparently this >> could be related to some faulty byte-code. >> >> The best I could do to detect this issue was to build Emacs using >> -fsanitize=address and I managed to reprodce the issue reliably by >> invoking package-recompile-all. I collected the following log: >> >> >> >> I ran the same command in batch mode, and now the issue appears to be >> fixed. This gives me no reassurance, as a few days ago the I had >> temporary managed to acchive the same state and then Emacs crashed again >> after rebuilding again. >> >> In GNU Emacs 30.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version >> 3.24.36, cairo version 1.16.0) of 2023-03-01 built on quetzal >> Repository revision: 4b99015e15a23bd5cbec021d53ef9fcca25b2441 >> Repository branch: master >> System Description: Debian GNU/Linux bookworm/sid >> >> Configured using: >> 'configure --with-pgtk 'CFLAGS=-O0 -ggdb3 -fsanitize=address'' >> >> Configured features: >> ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG >> JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY >> PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF >> TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB >> >> Important settings: >> value of $LC_MONETARY: en_US.UTF-8 >> value of $LC_NUMERIC: en_US.UTF-8 >> value of $LC_TIME: en_US.UTF-8 >> value of $LANG: en_US.UTF-8 >> value of $XMODIFIERS: @im=ibus >> locale-coding-system: utf-8-unix >> >> Major mode: ELisp/l >> >> Minor modes in effect: >> tooltip-mode: t >> global-eldoc-mode: t >> eldoc-mode: t >> show-paren-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 >> line-number-mode: t >> transient-mark-mode: t >> auto-composition-mode: t >> auto-encryption-mode: t >> auto-compression-mode: t >> >> Load-path shadows: >> None found. >> >> Features: >> (shadow sort emacsbug mail-extr message mailcap yank-media puny dired >> dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 >> epg-config gnus-util text-property-search time-date subr-x mm-decode >> mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader >> sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils >> cus-edit pp cus-start cus-load icons wid-edit misearch multi-isearch >> vc-git diff-mode easy-mmode vc-dispatcher cl-loaddefs cl-lib rmc >> iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook >> vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win >> term/common-win pgtk-dnd tool-bar dnd fontset image regexp-opt fringe >> tabulated-list replace newcomment text-mode lisp-mode prog-mode register >> page tab-bar menu-bar rfn-eshadow isearch easymenu timer select >> scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors >> frame minibuffer nadvice seq simple cl-generic indonesian philippine >> 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 emoji-zwj charscript >> charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure >> cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp >> files window text-properties overlay sha1 md5 base64 format env >> code-pages mule custom widget keymap hashtable-print-readable backquote >> threads dbusbind inotify dynamic-setting system-font-setting >> font-render-setting cairo gtk pgtk lcms2 multi-tty make-network-process >> emacs) >> >> Memory information: >> ((conses 16 65648 11383) >> (symbols 48 7380 0) >> (strings 32 19680 1617) >> (string-bytes 1 540967) >> (vectors 16 12795) >> (vector-slots 8 182734 13738) >> (floats 8 32 68) >> (intervals 56 625 8) >> (buffers 984 13))