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 18:42:56 +0200 Message-ID: <83d1s05zov.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> <83vb5s6gas.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1455386907 23238 80.91.229.3 (13 Feb 2016 18:08:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Feb 2016 18:08:27 +0000 (UTC) Cc: 22526@debbugs.gnu.org, andrewjmoreton@gmail.com To: Fabrice Popineau Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 13 19:08:10 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 1aUec6-0002wQ-5V for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Feb 2016 19:08:10 +0100 Original-Received: from localhost ([::1]:43885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUec5-0000k6-3s for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Feb 2016 13:08:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUec1-0000is-BA for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2016 13:08:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUeby-0001SQ-3V for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2016 13:08:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUebx-0001SM-Vu for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2016 13:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aUebx-0000KC-Rl for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2016 13:08:01 -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 18:08:01 +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.14553868371194 (code B ref 22526); Sat, 13 Feb 2016 18:08:01 +0000 Original-Received: (at 22526) by debbugs.gnu.org; 13 Feb 2016 18:07:17 +0000 Original-Received: from localhost ([127.0.0.1]:38261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aUebF-0000JC-1L for submit@debbugs.gnu.org; Sat, 13 Feb 2016 13:07:17 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41746) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aUebD-0000Iu-O7 for 22526@debbugs.gnu.org; Sat, 13 Feb 2016 13:07:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUdHc-0003TT-W3 for 22526@debbugs.gnu.org; Sat, 13 Feb 2016 11:43:01 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUdHc-0003TP-Q3; Sat, 13 Feb 2016 11:42:56 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1159 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aUdHb-0008IY-V0; Sat, 13 Feb 2016 11:42:56 -0500 In-reply-to: (message from Fabrice Popineau on Sat, 13 Feb 2016 17:08:07 +0100) 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:112976 Archived-At: > From: Fabrice Popineau > Date: Sat, 13 Feb 2016 17:08:07 +0100 > Cc: andrewjmoreton@gmail.com, 22526@debbugs.gnu.org > > Sorry for the delay with my answer, I'm trying to catch up with this problem. No need to apologize. Thanks for chiming in. > First, and about the patch Eli has offered for mmap_realloc(), I would be interested in knowing > what was the error code at line 718: > DebPrint (("realloc enlarge: VirtualAlloc error %ld\n", > GetLastError ())); I don't think we know that, because I think Andy attached the debugger only after the crash. But I sure hope to be wrong ;-) > I wonder if there is a case where it would fail on the VirtualAlloc() and manage with the mmap_alloc() later. > I agree than in the case of a failure with VirtualAlloc(), we don't return NULL here, which may be the root > of further problems. Yes. So you agree it's a good idea to commit that patch? > Second, I don't see the problem in mmap_alloc(): if VirtualAlloc() fails, p is NULL and this is the value returned > at line 668: > > return *var = p; > > Am I missing something here ? I thought about the scenario where VirtualAlloc succeeds in the call with MEM_RESERVE, but fails in the call with MEM_COMMIT. Please also read the rest of the thread, perhaps my conclusion about mmap_realloc being the culprit as incorrect. I just don't see how else to explain the fact that Emacs asked to enlarge the buffer beyond 64KB, but got a valid pointer to only a 64KB memory region.