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 08:53:54 +0000 Message-ID: <875ybjcz4t.fsf@posteo.net> References: <87fsaoqkwo.fsf@posteo.net> <83zg8vel1t.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1132"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 61896@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 02 09:54:25 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 1pXehl-00005g-Ik for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Mar 2023 09:54:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXehX-00038A-Hr; Thu, 02 Mar 2023 03:54:11 -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 1pXehO-000350-ND for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2023 03:54:04 -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 1pXehO-0006jf-D7 for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2023 03:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pXehO-0006o4-0U for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2023 03:54: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 08:54:01 +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.167774722226135 (code B ref 61896); Thu, 02 Mar 2023 08:54:01 +0000 Original-Received: (at 61896) by debbugs.gnu.org; 2 Mar 2023 08:53:42 +0000 Original-Received: from localhost ([127.0.0.1]:55714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXeh3-0006nT-NS for submit@debbugs.gnu.org; Thu, 02 Mar 2023 03:53:42 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:59523) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXeh2-0006nH-JK for 61896@debbugs.gnu.org; Thu, 02 Mar 2023 03:53:41 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 18D6124061C for <61896@debbugs.gnu.org>; Thu, 2 Mar 2023 09:53:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1677747215; bh=GtxFODkFffYgzzGT4goeohhk+2pk13wo9sYXXvyuLL0=; h=From:To:Cc:Subject:Date:From; b=FSd0HIxfQZOVFEI8H6s64OQuwtiSXzEB5IJMpX/e/svKV1kRhAPeGzn4jOL6CmNjR Uh56Q+1dQvh80f7V8NMoGD/E9RTbxhE63dF2ELNI3a95XUm5sgnSI899u6UxkyE0zR G58sQ2E4FXdiq6nZOFZuKo+l8JqPICSr5ore7GbuFxMVMoIfrjtf0txfcJ74vo9t6r jwGizO2/wsyB21tzLwGiZ7IhOpMrxa/PpbdBze6Qkg0mxwvrhIywXvwwZCzdF5QVlr 99br/pQjbmtQXVOYEtc/54WqmM8FSeBGm+SVd+L1O1klcB249EEfVIykel/NpwmWVX 9+XOrDasrLw2w== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PS4dV2dZzz6trW; Thu, 2 Mar 2023 09:53:33 +0100 (CET) In-Reply-To: <83zg8vel1t.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 02 Mar 2023 08:15:10 +0200") 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:257119 Archived-At: Eli Zaretskii writes: >> From: Philip Kaludercic >> Date: Wed, 01 Mar 2023 20:25:11 +0000 >> >> Emacs just crashes out of nowhere, e.g. after I open a my init file. > > It would help if you could run Emacs under GDB and show the backtrace > from one of those crashes, including the Lisp backtrace (the > "xbacktrace" command defined on src/.gdbinit). I tried debugging it using GDB, but didn't know about xbacktrace. Sadly I cannot reproduce the issue any more (at least for now). >> 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: > > Byte-code saw quite a bit of changes on master. Adding Mattias in > case he has some ideas. >From what I recall, the address being freed was on the stack. How does the byte-code interpreter behave when the input is broken? Is there some way of validating if the byte-code is "coherent"? If I manually modify the byte code and replace random bytes, is the interpreter written to expect this kind of issue?