From unknown Sat Jun 21 03:30:42 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#53343 <53343@debbugs.gnu.org> To: bug#53343 <53343@debbugs.gnu.org> Subject: Status: 29.0.50; assertion failure in diff--iterate-hunks Reply-To: bug#53343 <53343@debbugs.gnu.org> Date: Sat, 21 Jun 2025 10:30:42 +0000 retitle 53343 29.0.50; assertion failure in diff--iterate-hunks reassign 53343 emacs submitter 53343 Stephen Berman severity 53343 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 18 06:03:13 2022 Received: (at submit) by debbugs.gnu.org; 18 Jan 2022 11:03:13 +0000 Received: from localhost ([127.0.0.1]:49073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9mGe-00036r-Lc for submit@debbugs.gnu.org; Tue, 18 Jan 2022 06:03:13 -0500 Received: from lists.gnu.org ([209.51.188.17]:33308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9mGZ-00036e-I3 for submit@debbugs.gnu.org; Tue, 18 Jan 2022 06:03:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9mGZ-0001R2-6G for bug-gnu-emacs@gnu.org; Tue, 18 Jan 2022 06:03:07 -0500 Received: from mout.gmx.net ([212.227.17.20]:49875) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9mFs-0004mB-Aq for bug-gnu-emacs@gnu.org; Tue, 18 Jan 2022 06:03:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1642503738; bh=1rFQBZ8taPWcij2wD32ib5VviTPmmuXqm5n0Q3NwhqA=; h=X-UI-Sender-Class:From:To:Subject:Date; b=hsWuPxcXk+11xEj2rVmm0xHtvHypaOPh8sfhQ0O6naHt2QI5KfGRDH9AHFpmPeqL+ pCgfCfUpFfcoxmFaUN+GZGtPtjQ5hZ5up7VreIMVVtjJ2yCwuvDLG7FgaHM9IqEN9a 8IFwOGKaqzoa3DzMGeDKecaGygW6wKD5VKhlRcBs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from strobelfs2 ([89.246.38.66]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mi2Jt-1mf6KZ0SsD-00e0iq for ; Tue, 18 Jan 2022 12:02:18 +0100 From: Stephen Berman To: bug-gnu-emacs@gnu.org Subject: 29.0.50; assertion failure in diff--iterate-hunks Date: Tue, 18 Jan 2022 12:02:17 +0100 Message-ID: <87czkpl32e.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:r5lPX2DSj2oA8CwTsMMgmd5PxpgBKoY2o9Ps/REydccQoavQu91 6Fr3BuHmQs0xz0zD8zr4xGibG9nv9UfFP1kdWvTj48SDeXPQu3VKPSJ9eF148Ji8igcqLHQ dxYMquU9gM36FS/adxSMqO0kA9uq/7DBNYkzwccZgQalrShy7cBOeYBHCNvhFlWhhYL62I+ BXE0knSkVuQPrJYU/BGaA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Uq0QaD+8Pls=:aL4NsCW+yfjrg1gdpABSBW KaJfzGLaQaue8xqnx33A37FJ5TlgfCh5yR01fYUPYUzCQUt6Mj5h32pJ4zl52TK03Cdi7yDnr smVOTEISrbkquNGmGKT3FXotqpF/oj870Rmy5ZTOWvVWUb0o8xOD8QWzzsXSpD7DnW6yhzO8d a0pECG7dpqEh5IFGGPdPMAM5z/ECEZsPZyms77ycsF4TnMB9qQ7Fu/k+duHgV4OA9y8b2Zkvs BjlxlMvgTu04vro2NWz5jQAjSAjZe1XKg68y/L21z8Wd5lFaKg6M2xCrQOF9BbhH8YzXYTq2T XJV1n6ezcj0PKfkhXD6Jk5medYor7fMovpPfCSKuepdY0F0qzrgsPJekMZfulhRTEXMl+o/Ld 9C4D1N709ECNt2FchBMyBl1a+UY0jRCaZVWJ/A+OTzqxslXoNFm8RsQd9DcPXe0MXq8CXLLRs Rv/+k6lY4XbPx3MSB/lf2mOWFHdobyNo7vUSbFvr/1y4nzGiFaZ5q2fRk4KOVgNxGvYm4FJQF SY3uTiUKUljoscc8fdQxYAYak4DFOu02cDjUYLtkg57k4mUf8oBa2bcf9yd1y+1kQ+VHoyQrm JK+nVAWcGBBmI03BipdGXdblJlGlKThMbSB1l3fO35o6hYjv2ZGgaAquaJnEgZ49G+Y5xO87e wdIZ8COk6hF+e7OpzGgGGehQSvHqs1PjXiqe4IXx0pedty119Zns61G22SancCAg0Hrri2Dnf ++yFa+Uk9cEUhrs4ZfI3LfM7ZjFgNThByp4kKC+SK5R0QT/tvbwdGtNbThwHTbTqoiMMhQGDx Ttim4q5wJiErf/DWy89kT/3u2W1gzuMboa2/R8DpoBKPmSpjqAww4fHGVkmwYPxXszUNLZMPI j43aeIai62G/IgoNBd9EA2PVCmgBqANSzVb2Tr7CdA8BdS5oNnzbYAHMX9GuScQOeUXUN6dLo yFGwzh+Zz+F+9d2LdH8JOSHumagFXkNAN+Ipr2OoEaiCznkR1uO7N9bC1VZcOz2QPl3FLDBFZ 1H1EluEE1K5A88LWFlspe4H+bRUsLVu7d9RgWl8kXJf8iQ226KdGtuOK62yY9q4YHXtO+SzdD lUs7vEB4TkdkfU= Received-SPF: pass client-ip=212.227.17.20; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Trying to view in Gnus an attached and buttonized diff in a certain article raises an assertion failure. To reproduce: 0. emacs -Q 1. M-x gnus 2. Type `y' at prompt 3. Type `B RET news.gmane.io RET' 4. Type `C-s gmane.emacs.bugs RET RET' 5. Type `1 RET' at prompt 6. Type `j' and enter `<87fspm0z47.fsf@stranik.org> RET' at the prompt 7. Click on the Options menu and check "Enter Debugger on Error" 8. Type `2 b' => Debugger entered--Lisp error: (cl-assertion-failed ((looking-at diff-hunk-header-re) nil)) cl--assertion-failed((looking-at diff-hunk-header-re)) diff--iterate-hunks(975 #f(compiled-function (beg end) #)) diff--font-lock-syntax(975) font-lock-fontify-keywords-region(1 975 nil) font-lock-default-fontify-region(1 975 nil) font-lock-fontify-region(1 975) #f(compiled-function (beg end) #)(1 975) font-lock-ensure() mm-display-inline-fontify((# ("text/x-diff") nil nil ("attachment" (filename . "ebrowse-emacs-27.2-fix.diff")) nil nil nil) diff-mode) mm-display-patch-inline((# ("text/x-diff") nil nil ("attachment" (filename . "ebrowse-emacs-27.2-fix.diff")) nil nil nil)) mm-display-inline((# ("text/x-diff") nil nil ("attachment" (filename . "ebrowse-emacs-27.2-fix.diff")) nil nil nil)) gnus-mm-display-part((# ("text/x-diff") nil nil ("attachment" (filename . "ebrowse-emacs-27.2-fix.diff")) nil nil nil)) gnus-article-view-part(2) funcall-interactively(gnus-article-view-part 2) call-interactively(gnus-article-view-part nil nil) command-execute(gnus-article-view-part) The assertion fails when point is at the beginning of the last line in the following excerpt from the diff (in buffer " *temp*") *** /var/home/janstranik/src/emacs-27.2/lib-src/ebrowse.c~ 2021-01-28 11:52:16.000000000 -0600 --- /var/home/janstranik/src/emacs-27.2/lib-src/ebrowse.c 2021-09-24 09:31:49.136287028 -0500 *************** *** 1924,1931 **** This happens because diff-beginning-of-hunk calls re-search-forward on diff-hunk-header-re, which puts point at the end the line "*** 1924,1931 ****" and then calls (forward-line 0), putting point at the beginning of that line. But then (looking-at diff-hunk-header-re) returns nil, raising the assertion in diff--iterate-hunks. Replacing (forward-line 0) in diff-beginning-of-hunk with (forward-line -1) makes the assertion succeed. I'm not sure if this is a bug or if the diff is malformed. But evidence that the diff is not malformed is that if the diff in the article is saved to a file (by typing `2 K o' in the *Summary* buffer), then visiting that file in diff-mode with -Q does not raise an assertion failure. In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, cairo version 1.17.4) of 2022-01-18 built on strobelfs2 Repository revision: 68472c12e7acdb6e9f55a10eecf02a4ace26465a Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101003 System Description: Linux From Scratch r11.0-115 Configured using: 'configure --with-xwidgets 'CFLAGS=-Og -g3' PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 18 07:20:32 2022 Received: (at 53343) by debbugs.gnu.org; 18 Jan 2022 12:20:32 +0000 Received: from localhost ([127.0.0.1]:49150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9nTT-0005Cg-A3 for submit@debbugs.gnu.org; Tue, 18 Jan 2022 07:20:32 -0500 Received: from mout.gmx.net ([212.227.17.22]:42923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9nTN-0005CO-C1 for 53343@debbugs.gnu.org; Tue, 18 Jan 2022 07:20:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1642508419; bh=kKO4TMyyCMc6jn2QWcR5uGq38ZAooT3KQ2tkDoUorqI=; h=X-UI-Sender-Class:From:To:Subject:References:Date:In-Reply-To; b=hSDv//wIeojlzYQK3xupcuXSdzoaCFR5lDaQScn1fGKaHGZL5K2peH9skZvfa2DUf 4eAo2uYTXvRuQM3ajaLbvpMtITGiCRyd7xt+qoZkqrFJfhye3MQal6MIe9NocOTVoo 7rEw3a6rTlacuoHQwmV++YADr2mGazdzduvHDsGk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from strobelfs2 ([89.246.38.66]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MgNh1-1mfgWS0xFH-00hxml for <53343@debbugs.gnu.org>; Tue, 18 Jan 2022 13:20:19 +0100 From: Stephen Berman To: 53343@debbugs.gnu.org Subject: Re: bug#53343: 29.0.50; assertion failure in diff--iterate-hunks References: <87czkpl32e.fsf@gmx.net> Date: Tue, 18 Jan 2022 13:20:18 +0100 In-Reply-To: <87czkpl32e.fsf@gmx.net> (Stephen Berman's message of "Tue, 18 Jan 2022 12:02:17 +0100") Message-ID: <878rvdkzgd.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:sGbqN5qQ7RT5gX5GjO8cMyi+vq5Ny3ui2f03/uLFM8EcHZ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SUnn/S4rGEp7/TpNtAm5MQc+TS0kXqN6yVgQDERXycS/ca9GUk+Wv7WKChT4pY kXz+eL9SlVAZN6MdKupRlml4IUoGKNdYeb0TFUquKf/vyKq4PlTz5jI7x48mFSGF6uqWrjMTj OUjwB0WixcJkB4MuwPp43vXsRmhErzV14rInynNBM4bvJ7GcyQgNIHRhS5lusn8XP/PjkpuRA fcG/I4e1J1FkquCqagl7k+uapgDqL05M9I9zYKLWgkx9eUiEgArBPX8q4nJebw1MGmWIJgYSe gdSdIfuot5SBJ0= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53343 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Tue, 18 Jan 2022 12:02:17 +0100 Stephen Berman wrote: > Trying to view in Gnus an attached and buttonized diff in a certain > article raises an assertion failure. To reproduce: > > 0. emacs -Q > 1. M-x gnus > 2. Type `y' at prompt > 3. Type `B RET news.gmane.io RET' > 4. Type `C-s gmane.emacs.bugs RET RET' > 5. Type `1 RET' at prompt > 6. Type `j' and enter `<87fspm0z47.fsf@stranik.org> RET' at the prompt > 7. Click on the Options menu and check "Enter Debugger on Error" > 8. Type `2 b' > => > Debugger entered--Lisp error: (cl-assertion-failed ((looking-at diff-hunk-header-re) nil)) [...] > The assertion fails when point is at the beginning of the last line in > the following excerpt from the diff (in buffer " *temp*") > > *** /var/home/janstranik/src/emacs-27.2/lib-src/ebrowse.c~ 2021-01-28 11:52:16.000000000 -0600 > --- /var/home/janstranik/src/emacs-27.2/lib-src/ebrowse.c 2021-09-24 09:31:49.136287028 -0500 > *************** > *** 1924,1931 **** > > This happens because diff-beginning-of-hunk calls re-search-forward on > diff-hunk-header-re, which puts point at the end the line "*** 1924,1931 > ****" and then calls (forward-line 0), putting point at the beginning of > that line. But then (looking-at diff-hunk-header-re) returns nil, > raising the assertion in diff--iterate-hunks. Replacing (forward-line > 0) in diff-beginning-of-hunk with (forward-line -1) makes the assertion > succeed. > > I'm not sure if this is a bug or if the diff is malformed. But evidence > that the diff is not malformed is that if the diff in the article is > saved to a file (by typing `2 K o' in the *Summary* buffer), then > visiting that file in diff-mode with -Q does not raise an assertion > failure. On the other hand, I get the assertion failure with the above recipe in emacs-28 and emacs-27, and it seems unlikely that such a bug in diff-mode would have gone unnoticed till now, so maybe the diff is malformed. (Though if so, why does the failure not happen when visiting the file containing the diff?) Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 21 06:08:02 2022 Received: (at 53343) by debbugs.gnu.org; 21 Jan 2022 11:08:02 +0000 Received: from localhost ([127.0.0.1]:60326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nArlx-0004en-Oi for submit@debbugs.gnu.org; Fri, 21 Jan 2022 06:08:02 -0500 Received: from quimby.gnus.org ([95.216.78.240]:33230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nArlv-0004eO-1V for 53343@debbugs.gnu.org; Fri, 21 Jan 2022 06:08:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZtVpcB9wU810fVyX84i9Zlqisby8fCYcjaMH+vocNGY=; b=q/+/kcz+2vQgZLww/nA00lgVqd O3m+/z8j987cac1IL3yIXVHALlUOBi96h+CRu+n6FcfWPV1Qxjyp7bMrAnxIN3KMZxsJWKtT7J//J 6xSsTvMAmcBJC1QvWjgbJGn6VqRpr6EStF0LqhIYT1iSqJwWsv1ZxDu3Uup9Z8dZ9lqQ=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nArlm-00027n-2J; Fri, 21 Jan 2022 12:07:52 +0100 From: Lars Ingebrigtsen To: Stephen Berman Subject: Re: bug#53343: 29.0.50; assertion failure in diff--iterate-hunks References: <87czkpl32e.fsf@gmx.net> <878rvdkzgd.fsf@gmx.net> X-Now-Playing: John Cale's _Music For A New Society_: "Broken Bird" Date: Fri, 21 Jan 2022 12:07:49 +0100 In-Reply-To: <878rvdkzgd.fsf@gmx.net> (Stephen Berman's message of "Tue, 18 Jan 2022 13:20:18 +0100") Message-ID: <874k5xtkhm.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stephen Berman writes: > On the other hand, I get the assertion failure with the above recipe in > emacs-28 and emacs-27, and it seems unlikely that such a bug in > diff-mode would have gone unnoticed till now, so maybe the [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 53343 Cc: 53343@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stephen Berman writes: > On the other hand, I get the assertion failure with the above recipe in > emacs-28 and emacs-27, and it seems unlikely that such a bug in > diff-mode would have gone unnoticed till now, so maybe the diff is > malformed. (Though if so, why does the failure not happen when visiting > the file containing the diff?) I tried (setq debug-on-error t) put the diff in a file, and got a backtrace when loading it. Debugger entered--Lisp error: (error "Unknown diff hunk type") signal(error ("Unknown diff hunk type")) error("Unknown diff hunk type") diff-hunk-text("" nil nil) diff-syntax-fontify-hunk(506 506 t) etc So I've now made that function less assertative, and that fixes this issue. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 21 06:08:07 2022 Received: (at control) by debbugs.gnu.org; 21 Jan 2022 11:08:07 +0000 Received: from localhost ([127.0.0.1]:60329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nArm3-0004fF-5J for submit@debbugs.gnu.org; Fri, 21 Jan 2022 06:08:07 -0500 Received: from quimby.gnus.org ([95.216.78.240]:33244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nArm0-0004eZ-W9 for control@debbugs.gnu.org; Fri, 21 Jan 2022 06:08:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=CU8xXZVyycVPZdXsIztfyqbyTXyTjC181wgd2tdqVaw=; b=TuhEke8KEFL5nntFtGqbWuj9th wVFu4kmS0mME4NdJoXzo3zW+P9qZp62GOcDWJ3rkWusI3IXrVcQJFZb2IIwGV4aDVMoKkzpxmFlcr 5EoRs2nTGya2Ax66GjhI0EiVNGuE5xPDDPsVTefWPy8OsmtzlFVpcdSx6EEeMDxU5uGM=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nArlt-00028B-3a for control@debbugs.gnu.org; Fri, 21 Jan 2022 12:07:59 +0100 Date: Fri, 21 Jan 2022 12:07:56 +0100 Message-Id: <8735lhtkhf.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #53343 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 53343 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 53343 29.1 quit From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 21 08:29:31 2022 Received: (at 53343) by debbugs.gnu.org; 21 Jan 2022 13:29:31 +0000 Received: from localhost ([127.0.0.1]:60638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nAtyt-0005Fe-3Y for submit@debbugs.gnu.org; Fri, 21 Jan 2022 08:29:31 -0500 Received: from mout.gmx.net ([212.227.17.21]:48087) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nAtyq-0005FO-Vu for 53343@debbugs.gnu.org; Fri, 21 Jan 2022 08:29:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1642771762; bh=gsTqNkquS0AOdg57i8iz/wBTbBiXPOnoiafMHCwwQPY=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=jQwOE1W/Wx3Uz0rkIElKeleIQp3WuRTMPTCzkr8G6LTTF8a8AEA6oOgZGXnPm3/lj rn+knY1CJdcbWW+T1gxPOfZx1wZl6s0Otz3XKbOfnhWQb57E51k/aghBuu72a4d5LJ YCpy/wMDDPK9GdPuwR6dqQIoV9hldnfR8O3ghJl0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from strobelfs2 ([89.246.36.97]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MnakX-1mU6R530uj-00jZEx; Fri, 21 Jan 2022 14:29:22 +0100 From: Stephen Berman To: Lars Ingebrigtsen Subject: Re: bug#53343: 29.0.50; assertion failure in diff--iterate-hunks References: <87czkpl32e.fsf@gmx.net> <878rvdkzgd.fsf@gmx.net> <874k5xtkhm.fsf@gnus.org> Date: Fri, 21 Jan 2022 14:29:21 +0100 In-Reply-To: <874k5xtkhm.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 21 Jan 2022 12:07:49 +0100") Message-ID: <87r191b4jy.fsf@rub.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:wJePZl+k9+4ejDR95V8hG2qOUepkZbr5KdUOtK6se0qDrI3yyFr k5AfOtXIazX5MXfIaQPrrR6sa82vmIqCGyMXL5NKcAwnuzEPrO8faQm9Qpe85Fp/ckUHf0f PnZbqG0jxCbW32XdQh/wdoVt4wuNlUWg9rpgwMAjEYk985Z5ss7G2ohbXVswejDzyY4CDie gf+LYXJF8a6JHq2DejjUQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:zqYvEWyMYgk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nj6cGGV6m8J1/rHoT8tI74edU83kcH574UnDAffz 1y8rOI5wnIM6fE= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53343 Cc: 53343@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Fri, 21 Jan 2022 12:07:49 +0100 Lars Ingebrigtsen wrote: > Stephen Berman writes: > >> On the other hand, I get the assertion failure with the above recipe in >> emacs-28 and emacs-27, and it seems unlikely that such a bug in >> diff-mode would have gone unnoticed till now, so maybe the diff is >> malformed. (Though if so, why does the failure not happen when visiting >> the file containing the diff?) > > I tried > > (setq debug-on-error t) > > put the diff in a file, and got a backtrace when loading it. > > Debugger entered--Lisp error: (error "Unknown diff hunk type") > signal(error ("Unknown diff hunk type")) > error("Unknown diff hunk type") > diff-hunk-text("" nil nil) > diff-syntax-fontify-hunk(506 506 t) > etc Yes, I get this too. I must have mistested that before. > So I've now made that function less assertative, and that fixes this > issue. Thanks, and I confirm your fix avoids the error. However, you added this to the doc string of `diff-ignore-whitespace-hunk': "If INHIBIT-ERROR, ignore malformed hunks." But you didn't add an INHIBIT-ERROR argument. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 21 08:32:10 2022 Received: (at 53343) by debbugs.gnu.org; 21 Jan 2022 13:32:10 +0000 Received: from localhost ([127.0.0.1]:60647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nAu1F-00075O-GP for submit@debbugs.gnu.org; Fri, 21 Jan 2022 08:32:10 -0500 Received: from quimby.gnus.org ([95.216.78.240]:34988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nAu1E-0006zw-FN for 53343@debbugs.gnu.org; Fri, 21 Jan 2022 08:31:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=4OyUaSq1eQMdmVECSKbGQAM3yOW2RerJSzLebLZDpVY=; b=PJahScRrZVGqTou60F2Nhbtk2M e7whBCCc4003je+LOFIS9RNNztnZT7nxroMwK0/R27AubPiGFiuMxYn1BqkRXAEXr/wxMhvbC9OYc cTc9bnhAHZq66B3kW1EezATsMvGfMdD9BQo0ayrBBd1rGtRldsqr2PM3jDJiv7R+Nd14=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAu16-0004f0-2y; Fri, 21 Jan 2022 14:31:50 +0100 From: Lars Ingebrigtsen To: Stephen Berman Subject: Re: bug#53343: 29.0.50; assertion failure in diff--iterate-hunks References: <87czkpl32e.fsf@gmx.net> <878rvdkzgd.fsf@gmx.net> <874k5xtkhm.fsf@gnus.org> <87r191b4jy.fsf@rub.de> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEWqkm7Ip2rMs4rV wZ/269NLMRqQajn///+EDJsnAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+YBFQ0JOz5/HRwAAAGgSURB VDjLzZPNdoIwEIUHrVmXtHUNaNljsHsh3VPpZA3V5P0foZNJVPzpvrMIyf2YO5ecA8A/qYSX/FZO fdEqs+u3U1kU0rNrwDpVTo/8SidRKbVhmk71lToVgfTiQ3qtqQIpihhHko2O1Qa/6L866ydC0W50 TwKggMG/LaYtAD4oC594vLRwR3TKl/sbEJy01D9xCnnlDOIxPz4GlVqfcgUQRzRjeZyCRK54RIPG 4dN5+gW8o3lDPIOMPjyABfqKU5TyVxIA69GLZmRQt5IBWOxKDF/U6k0O7brig/3A/tDP4xAa3siG t9hjX+y7GJg6djOtd/oVcI99Nzt5UYeqa1Gpl0Fsyaora7X91m2bJZBtlgZSiQ7RLHCwFG1WzrMR nN/yMq1uAMGbMzDO8WMAPro7MALvB38hsxVhkzpfdgR7a88OboBHOpkw6IQAQ+McrQJAOOssAWpL q8yZg1alGRL/GyyM6DxwkCwRR1nQ+pU+g9ciAJL832QDEEPscGJJOalcAAsGhnP7iP4RTsYZmESc 3tgEYLyMezAt+wegGb+43uf6fHKqZwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMS0yMVQxMzow OTo1OSswMDowMI7Sw7kAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDEtMjFUMTM6MDk6NTkrMDA6 MDD/j3sFAAAAAElFTkSuQmCC X-Now-Playing: David Bowie's _Brilliant Adventure (2): The Buddha Of Suburbia_: "Strangers When We Meet" Date: Fri, 21 Jan 2022 14:31:47 +0100 In-Reply-To: <87r191b4jy.fsf@rub.de> (Stephen Berman's message of "Fri, 21 Jan 2022 14:29:21 +0100") Message-ID: <87bl05p64c.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stephen Berman writes: > Thanks, and I confirm your fix avoids the error. However, you added > this to the doc string of `diff-ignore-whitespace-hunk': "If > INHIBIT-ERROR, ignore malformed hunks." But you didn't add an > I [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 53343 Cc: 53343@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stephen Berman writes: > Thanks, and I confirm your fix avoids the error. However, you added > this to the doc string of `diff-ignore-whitespace-hunk': "If > INHIBIT-ERROR, ignore malformed hunks." But you didn't add an > INHIBIT-ERROR argument. =F0=9F=98=80 Forgot to remove that after deciding that I didn't need to ad= d any arguments after all. Now fixed. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Jun 21 03:30:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 19 Feb 2022 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator