From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Olum Newsgroups: gmane.emacs.bugs Subject: bug#16433: Test case for newline cache corruption Date: Tue, 27 May 2014 12:20:52 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1401207702 11430 80.91.229.3 (27 May 2014 16:21:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 May 2014 16:21:42 +0000 (UTC) Cc: 16433@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 27 18:21:32 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WpK7u-0007I7-Sh for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 May 2014 18:21:23 +0200 Original-Received: from localhost ([::1]:36454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpK7u-0000Yz-8W for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 May 2014 12:21:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpK7k-0000Vp-CA for bug-gnu-emacs@gnu.org; Tue, 27 May 2014 12:21:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WpK7a-0000QQ-IV for bug-gnu-emacs@gnu.org; Tue, 27 May 2014 12:21:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpK7a-0000QM-D4 for bug-gnu-emacs@gnu.org; Tue, 27 May 2014 12:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WpK7Z-0000ml-OV for bug-gnu-emacs@gnu.org; Tue, 27 May 2014 12:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Olum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 May 2014 16:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16433 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 16433-submit@debbugs.gnu.org id=B16433.14012076562998 (code B ref 16433); Tue, 27 May 2014 16:21:01 +0000 Original-Received: (at 16433) by debbugs.gnu.org; 27 May 2014 16:20:56 +0000 Original-Received: from localhost ([127.0.0.1]:33585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpK7T-0000mF-8Z for submit@debbugs.gnu.org; Tue, 27 May 2014 12:20:56 -0400 Original-Received: from cosmos.phy.tufts.edu ([130.64.83.16]:37126) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpK7Q-0000m6-Od for 16433@debbugs.gnu.org; Tue, 27 May 2014 12:20:53 -0400 Original-Received: from kdo by cosmos.phy.tufts.edu ([local]:local) with local id 1WpK7Q-0004E1-Gh - Using Exim-4.80.1 (MandrivaLinux) MTA (return-path ); Tue, 27 May 2014 12:20:52 -0400 In-Reply-To: <83vbssibl5.fsf@gnu.org> (message from Eli Zaretskii on Mon, 26 May 2014 22:28:22 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:89563 Archived-At: Here is some additional output which perhaps will be helpful. I put checks at the beginning and end of rmail-swap-buffers, and also immediately before and after the call to buffer-swap-text. I had these checks print a message when the cache is OK, and print the character positions on the cache is corrupted, giving the following. Newlines are absent from the cache starting with the one at position 952. Ken ---------------------------------------------------------------------- Counting messages... know_region_cache (test.mbox, 351, 359, 1449) Counting messages...done know_region_cache ( *message-viewer test.mbox*, 7, 31, 1202) know_region_cache ( *message-viewer test.mbox*, 70, 74, 1202) know_region_cache (test.mbox, 1, 55, 1449) know_region_cache (test.mbox, 56, 93, 1449) know_region_cache (test.mbox, 94, 140, 1449) know_region_cache (test.mbox, 141, 171, 1449) know_region_cache (test.mbox, 172, 200, 1449) know_region_cache (test.mbox, 201, 214, 1449) know_region_cache (test.mbox, 215, 252, 1449) know_region_cache (test.mbox, 253, 330, 1449) know_region_cache (test.mbox, 331, 351, 1449) know_region_cache (test.mbox, 361, 367, 1449) know_region_cache (test.mbox, 368, 374, 1449) know_region_cache (test.mbox, 375, 445, 1449) know_region_cache (test.mbox, 446, 505, 1449) know_region_cache (test.mbox, 506, 533, 1449) know_region_cache (test.mbox, 534, 642, 1449) know_region_cache (test.mbox, 643, 650, 1449) know_region_cache (test.mbox, 651, 657, 1449) know_region_cache (test.mbox, 658, 750, 1449) know_region_cache (test.mbox, 751, 952, 1449) know_region_cache (test.mbox, 953, 1053, 1449) know_region_cache (test.mbox, 1054, 1145, 1449) know_region_cache (test.mbox, 1146, 1232, 1449) know_region_cache (test.mbox, 1233, 1324, 1449) know_region_cache (test.mbox, 1325, 1416, 1449) know_region_cache (test.mbox, 1417, 1431, 1449) know_region_cache (test.mbox, 1432, 1439, 1449) know_region_cache (test.mbox, 1440, 1447, 1449) Cache OK in test.mbox at start of rmail-swap-buffers know_region_cache ( *message-viewer test.mbox*, 1, 7, 1202) know_region_cache ( *message-viewer test.mbox*, 32, 60, 1202) know_region_cache ( *message-viewer test.mbox*, 61, 70, 1202) know_region_cache ( *message-viewer test.mbox*, 75, 112, 1202) know_region_cache ( *message-viewer test.mbox*, 114, 120, 1202) know_region_cache ( *message-viewer test.mbox*, 121, 127, 1202) know_region_cache ( *message-viewer test.mbox*, 128, 198, 1202) know_region_cache ( *message-viewer test.mbox*, 199, 258, 1202) know_region_cache ( *message-viewer test.mbox*, 259, 286, 1202) know_region_cache ( *message-viewer test.mbox*, 287, 395, 1202) know_region_cache ( *message-viewer test.mbox*, 396, 403, 1202) know_region_cache ( *message-viewer test.mbox*, 404, 410, 1202) know_region_cache ( *message-viewer test.mbox*, 411, 503, 1202) know_region_cache ( *message-viewer test.mbox*, 504, 705, 1202) know_region_cache ( *message-viewer test.mbox*, 706, 806, 1202) know_region_cache ( *message-viewer test.mbox*, 807, 898, 1202) know_region_cache ( *message-viewer test.mbox*, 899, 985, 1202) know_region_cache ( *message-viewer test.mbox*, 986, 1077, 1202) know_region_cache ( *message-viewer test.mbox*, 1078, 1169, 1202) know_region_cache ( *message-viewer test.mbox*, 1170, 1184, 1202) know_region_cache ( *message-viewer test.mbox*, 1185, 1192, 1202) know_region_cache ( *message-viewer test.mbox*, 1193, 1200, 1202) Cache OK in *message-viewer test.mbox* at start of rmail-swap-buffers Cache OK in test.mbox at right before swapping Cache OK in *message-viewer test.mbox* at right before swapping Cache OK in test.mbox at right after swapping Cache OK in *message-viewer test.mbox* at right after swapping Cache OK in test.mbox at end of rmail-swap-buffers Cache OK in *message-viewer test.mbox* at end of rmail-swap-buffers Cache OK in test.mbox at start of rmail-swap-buffers Cache OK in *message-viewer test.mbox* at start of rmail-swap-buffers Cache OK in test.mbox at right before swapping Cache OK in *message-viewer test.mbox* at right before swapping Cache OK in test.mbox at right after swapping Cache OK in *message-viewer test.mbox* at right after swapping Cache OK in test.mbox at end of rmail-swap-buffers Cache OK in *message-viewer test.mbox* at end of rmail-swap-buffers Getting mail from /old/home/kdo/test.in... invalidate_region_cache (test.mbox, 361, 361, 1449) (revalidated) invalidate_region_cache (test.mbox, 1449, 2014, 2014) (revalidated) invalidate_region_cache (test.mbox, 2012, 2012, 2014) invalidate_region_cache (test.mbox, 2030, 2030, 2032) (revalidated) know_region_cache (test.mbox, 2012, 2030, 2034) invalidate_region_cache (test.mbox, 2032, 2032, 2034) (revalidated) know_region_cache (test.mbox, 2030, 2032, 2042) invalidate_region_cache (test.mbox, 2040, 2040, 2042) (revalidated) know_region_cache (test.mbox, 2032, 2040, 2043) Counting new messages...done (1) Saving file /home/kdo/test.mbox... Wrote /home/kdo/test.mbox [2 times] 1 new message read invalidate_region_cache (test.mbox, 2038, 2039, 2043) (revalidated) invalidate_region_cache (test.mbox, 2038, 2038, 2042) (revalidated) know_region_cache (test.mbox, 2038, 2039, 2043) invalidate_region_cache ( *message-viewer test.mbox*, 1, 1202, 1202) invalidate_region_cache ( *message-viewer test.mbox*, 1, 1, 1) invalidate_region_cache ( *message-viewer test.mbox*, 1, 1, 1) invalidate_region_cache ( *message-viewer test.mbox*, 1, 1, 2) invalidate_region_cache ( *message-viewer test.mbox*, 1, 1, 3) invalidate_region_cache ( *message-viewer test.mbox*, 39, 39, 41) invalidate_region_cache ( *message-viewer test.mbox*, 68, 68, 70) invalidate_region_cache ( *message-viewer test.mbox*, 82, 82, 84) know_region_cache ( *message-viewer test.mbox*, 77, 81, 126) know_region_cache ( *message-viewer test.mbox*, 88, 123, 126) know_region_cache (test.mbox, 1449, 1503, 2043) know_region_cache (test.mbox, 1504, 1543, 2043) know_region_cache (test.mbox, 1544, 1581, 2043) know_region_cache (test.mbox, 1582, 1628, 2043) know_region_cache (test.mbox, 1629, 1687, 2043) know_region_cache (test.mbox, 1688, 1760, 2043) know_region_cache (test.mbox, 1761, 1835, 2043) know_region_cache (test.mbox, 1836, 1873, 2043) know_region_cache (test.mbox, 1874, 1902, 2043) know_region_cache (test.mbox, 1903, 1916, 2043) know_region_cache (test.mbox, 1917, 1969, 2043) know_region_cache (test.mbox, 1970, 2011, 2043) Cache OK in test.mbox at start of rmail-swap-buffers know_region_cache ( *message-viewer test.mbox*, 1, 38, 126) know_region_cache ( *message-viewer test.mbox*, 39, 67, 126) know_region_cache ( *message-viewer test.mbox*, 68, 77, 126) know_region_cache ( *message-viewer test.mbox*, 82, 88, 126) Cache OK in *message-viewer test.mbox* at start of rmail-swap-buffers Cache OK in test.mbox at right before swapping Cache OK in *message-viewer test.mbox* at right before swapping Cache OK in test.mbox at right after swapping Cache OK in *message-viewer test.mbox* at right after swapping Cache OK in test.mbox at end of rmail-swap-buffers Cache OK in *message-viewer test.mbox* at end of rmail-swap-buffers Cache OK in test.mbox at start of rmail-swap-buffers Cache OK in *message-viewer test.mbox* at start of rmail-swap-buffers Cache OK in test.mbox at right before swapping Cache OK in *message-viewer test.mbox* at right before swapping Cache OK in test.mbox at right after swapping Cache OK in *message-viewer test.mbox* at right after swapping Cache OK in test.mbox at end of rmail-swap-buffers Cache OK in *message-viewer test.mbox* at end of rmail-swap-buffers invalidate_region_cache ( *message-viewer test.mbox*, 1, 126, 126) invalidate_region_cache ( *message-viewer test.mbox*, 1, 1, 1) invalidate_region_cache ( *message-viewer test.mbox*, 1, 1, 1) invalidate_region_cache ( *message-viewer test.mbox*, 1, 1, 2) invalidate_region_cache ( *message-viewer test.mbox*, 1, 1, 3) invalidate_region_cache ( *message-viewer test.mbox*, 39, 39, 41) invalidate_region_cache ( *message-viewer test.mbox*, 68, 68, 70) invalidate_region_cache ( *message-viewer test.mbox*, 82, 82, 84) know_region_cache ( *message-viewer test.mbox*, 77, 81, 126) know_region_cache ( *message-viewer test.mbox*, 88, 123, 126) Cache OK in test.mbox at start of rmail-swap-buffers know_region_cache ( *message-viewer test.mbox*, 1, 38, 126) know_region_cache ( *message-viewer test.mbox*, 39, 67, 126) know_region_cache ( *message-viewer test.mbox*, 68, 77, 126) know_region_cache ( *message-viewer test.mbox*, 82, 88, 126) Cache OK in *message-viewer test.mbox* at start of rmail-swap-buffers Cache OK in test.mbox at right before swapping Cache OK in *message-viewer test.mbox* at right before swapping Cache OK in test.mbox at right after swapping Cache OK in *message-viewer test.mbox* at right after swapping Cache OK in test.mbox at end of rmail-swap-buffers Cache OK in *message-viewer test.mbox* at end of rmail-swap-buffers Cache OK in test.mbox at start of rmail-swap-buffers Cache OK in *message-viewer test.mbox* at start of rmail-swap-buffers Cache OK in test.mbox at right before swapping Cache OK in *message-viewer test.mbox* at right before swapping Cache OK in test.mbox at right after swapping Cache OK in *message-viewer test.mbox* at right after swapping Cache OK in test.mbox at end of rmail-swap-buffers Cache OK in *message-viewer test.mbox* at end of rmail-swap-buffers invalidate_region_cache ( *message-viewer test.mbox*, 1, 126, 126) invalidate_region_cache ( *message-viewer test.mbox*, 1, 1, 1) invalidate_region_cache ( *message-viewer test.mbox*, 1, 1, 1) invalidate_region_cache ( *message-viewer test.mbox*, 1, 1, 1089) invalidate_region_cache ( *message-viewer test.mbox*, 1, 1, 1090) invalidate_region_cache ( *message-viewer test.mbox*, 32, 32, 1121) invalidate_region_cache ( *message-viewer test.mbox*, 61, 61, 1150) invalidate_region_cache ( *message-viewer test.mbox*, 75, 75, 1164) know_region_cache ( *message-viewer test.mbox*, 7, 31, 1202) know_region_cache ( *message-viewer test.mbox*, 70, 74, 1202) know_region_cache (test.mbox, 361, 367, 2043) know_region_cache (test.mbox, 368, 374, 2043) know_region_cache (test.mbox, 375, 445, 2043) know_region_cache (test.mbox, 446, 505, 2043) know_region_cache (test.mbox, 506, 533, 2043) know_region_cache (test.mbox, 534, 642, 2043) know_region_cache (test.mbox, 643, 650, 2043) know_region_cache (test.mbox, 651, 657, 2043) know_region_cache (test.mbox, 658, 750, 2043) know_region_cache (test.mbox, 751, 926, 2043) know_region_cache (test.mbox, 932, 933, 2043) know_region_cache (test.mbox, 939, 940, 2043) know_region_cache (test.mbox, 1010, 1011, 2043) know_region_cache (test.mbox, 1070, 1071, 2043) know_region_cache (test.mbox, 1098, 1099, 2043) know_region_cache (test.mbox, 1207, 1208, 2043) know_region_cache (test.mbox, 1215, 1216, 2043) know_region_cache (test.mbox, 1222, 1223, 2043) know_region_cache (test.mbox, 1315, 1316, 2043) Newline cache corrupted in test.mbox at start of rmail-swap-buffers Cache says [55 93 140 171 200 214 252 330 359 360 367 374 445 505 533 642 650 657 750] Truth is [55 93 140 171 200 214 252 330 359 360 367 374 445 505 533 642 650 657 750 952 1053 1145 1232 1324 1416 1431 1439 1447 1448]