From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#61896: 30.0.50; Emacs crashes because of an invalid free Date: Thu, 2 Mar 2023 13:20:03 +0100 Message-ID: <981CDB22-6430-44B5-8316-BD8268B22C83@acm.org> References: <87fsaoqkwo.fsf@posteo.net> <83zg8vel1t.fsf@gnu.org> <875ybjcz4t.fsf@posteo.net> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.14\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31757"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 61896@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 02 13:21:12 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 1pXhvr-00083V-Tn for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Mar 2023 13:21:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXhvm-0000rg-Lv; Thu, 02 Mar 2023 07:21: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 1pXhvj-0000oH-Do for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2023 07:21: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 1pXhvj-0006QE-2X for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2023 07:21:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pXhvi-0003tt-OC for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2023 07:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Mar 2023 12:21: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.167775962014896 (code B ref 61896); Thu, 02 Mar 2023 12:21:02 +0000 Original-Received: (at 61896) by debbugs.gnu.org; 2 Mar 2023 12:20:20 +0000 Original-Received: from localhost ([127.0.0.1]:56024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXhv2-0003sC-EX for submit@debbugs.gnu.org; Thu, 02 Mar 2023 07:20:20 -0500 Original-Received: from mail1451c50.megamailservers.eu ([91.136.14.51]:32988 helo=mail266c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXhuy-0003rr-R3 for 61896@debbugs.gnu.org; Thu, 02 Mar 2023 07:20:18 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1677759610; bh=GrIhotebMDhM+05vLF/zLvWta/4iVBhw9VG9KFdlPfc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=d5GS+rIsdIH2R8uGD4eLNkct4qu3JeloTiPvIMwM+7XfqlrT3JsIsoXgRCVHlhKQT 1y+5PBEZI04ZzXQQ8RpXzFCK+ZGn+k+iwnJyfyc2P+pp4FLE/XQ7D68by+rswRcNrv +M0byV3m0Q4AGc7ERL9MADKw76nF8GWEnZqMF1zU= Feedback-ID: mattiase@acm.or Original-Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se [188.150.171.209]) (authenticated bits=0) by mail266c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 322CK418008229; Thu, 2 Mar 2023 12:20:06 +0000 In-Reply-To: <875ybjcz4t.fsf@posteo.net> X-Mailer: Apple Mail (2.3654.120.0.1.14) X-VADE-SPAMSTATE: clean X-VADE-SPAMSCORE: -100 X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrudeljedgfeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffquffvqffrkfetpdfqfgfvpdfgpfggqdevhedtnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpegtggfuhfgjffevgffkfhfvofesthhqmhdthhdtvdenucfhrhhomhepofgrthhtihgrshcugfhnghguvghgnohrugcuoehmrghtthhirghsvgesrggtmhdrohhrgheqnecuggftrfgrthhtvghrnhepveekffdujefhkeehvdfgffeikefghfefvdekueffleegfeekueelhfejieefkefgnecukfhppedukeekrdduhedtrddujedurddvtdelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudekkedrudehtddrudejuddrvddtledphhgvlhhopehsmhhtphgtlhhivghnthdrrghpphhlvgdpmhgrihhlfhhrohhmpehmrghtthhirghsvgesrggtmhdrohhrghdpnhgspghrtghpthhtohepfedprhgtphhtthhopehphhhilhhiphhksehpohhsthgvohdrnhgvthdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhope eiudekleeiseguvggssghughhsrdhgnhhurdhorhhg X-Origin-Country: SE 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:257144 Archived-At: 2 mars 2023 kl. 09.53 skrev Philip Kaludercic : >> Byte-code saw quite a bit of changes on master. Adding Mattias in >> case he has some ideas. >=20 > =46rom 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? The very first thing is to make sure you don't have any lingering *.elc = files generated during the period of incompatibility regarding = `save-restriction`. That issue should have been resolved by now; let's = not chase ghosts. The indication of a specpdl imbalance does point to = this being a possible cause. The byte-code interpreter normally assumes the code to be correct and = performs few checks since every cycle counts here. There are some = additional checks to be enabled: the general --enable-checking=3Dall, = and/or compiling with -DBYTE_CODE_SAFE=3D1 (or just adding #define BYTE_CODE_SAFE 1 early in bytecode.c, which is what I tend to do). These checks do not audit the specpdl balance directly but that would be = something to add if you don't make further progress.