From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22526: 25.0.90; Crash starting gnus Date: Sat, 13 Feb 2016 12:44:11 +0200 Message-ID: <83vb5s6gas.fsf@gnu.org> References: <56AFD88B.5040904@gmail.com> <87pow9cc0c.fsf@gnus.org> <83h9hkse78.fsf@gnu.org> <864mdk44q6.fsf@gmail.com> <83mvrcqli1.fsf@gnu.org> <86twlg2e69.fsf@gmail.com> <8360xv9ems.fsf@gnu.org> <8637sz7xmh.fsf@gmail.com> <83io1v7xcd.fsf@gnu.org> <83fuwx7vkv.fsf@gnu.org> <86fuwxk1l1.fsf@gmail.com> <837fi96mkq.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1455360323 24923 80.91.229.3 (13 Feb 2016 10:45:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Feb 2016 10:45:23 +0000 (UTC) Cc: 22526@debbugs.gnu.org To: andrewjmoreton@gmail.com, fabrice.popineau@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 13 11:45:12 2016 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 1aUXhP-0002Wb-KO for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Feb 2016 11:45:11 +0100 Original-Received: from localhost ([::1]:41029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUXhO-0001ss-IB for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Feb 2016 05:45:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUXhJ-0001qp-Nc for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2016 05:45:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUXhG-0007vy-Gi for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2016 05:45:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57552) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUXhG-0007vu-DP for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2016 05:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aUXhG-00046H-9L for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2016 05:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Feb 2016 10:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22526 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22526-submit@debbugs.gnu.org id=B22526.145536026215687 (code B ref 22526); Sat, 13 Feb 2016 10:45:02 +0000 Original-Received: (at 22526) by debbugs.gnu.org; 13 Feb 2016 10:44:22 +0000 Original-Received: from localhost ([127.0.0.1]:38460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aUXgb-00044x-Nl for submit@debbugs.gnu.org; Sat, 13 Feb 2016 05:44:21 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:60159) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aUXga-00044j-Hn for 22526@debbugs.gnu.org; Sat, 13 Feb 2016 05:44:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUXgS-0007pR-7G for 22526@debbugs.gnu.org; Sat, 13 Feb 2016 05:44:15 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUXgS-0007pN-3p; Sat, 13 Feb 2016 05:44:12 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3791 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aUXgR-0001zr-AV; Sat, 13 Feb 2016 05:44:11 -0500 In-reply-to: <837fi96mkq.fsf@gnu.org> (message from Eli Zaretskii on Sat, 13 Feb 2016 10:28:37 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:112962 Archived-At: > Date: Sat, 13 Feb 2016 10:28:37 +0200 > From: Eli Zaretskii > Cc: 22526@debbugs.gnu.org > > FWIW, I'm not really sure that patch will fix the problem, for 2 > reasons: (1) the code it fixes should only get executed very rarely, > if ever; and (2) according to my reading of gap_left, it should have > touched these addresses just before hitting the segfault. So I > believe there's some other factor at work here I cannot figure out. Answering my own question: #2 above can happen if the gap was already at the end of buffer text -- in that case, gap_left does nothing except update the gap position. The values shown in one of the previous backtraces indicate this is indeed what happened here. And in that case, line 411 of insdel.c is indeed the first one where the additional memory allocated by enlarge_buffer_text is touched. So it looks like the problem is indeed somewhere in w32heap.c. Btw, I see in mmap_malloc a problem similar to the one I tried to fix with the patch for mmap_realloc: if the call to VirtualAlloc that commits the reserved memory fails, mmap_malloc won't return NULL as it should. AFAIU, failure to commit reserved memory could happen if the system is short on physical memory. Are there other reasons?