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#2099: 23.0.60; `mark_object' with larger nested objects crashes Emacs Date: Mon, 11 Jan 2016 17:11:44 +0200 Message-ID: <83vb70kv67.fsf@gnu.org> References: <20090128230645.07F1DC468CC@mt-computer.local> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1452525184 18423 80.91.229.3 (11 Jan 2016 15:13:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Jan 2016 15:13:04 +0000 (UTC) Cc: larsi@gnus.org, markus.triska@gmx.at, 2099@debbugs.gnu.org To: Alan J Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 11 16:12:53 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 1aIe9M-00029P-GW for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Jan 2016 16:12:52 +0100 Original-Received: from localhost ([::1]:55001 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIe9K-00084z-HP for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Jan 2016 10:12:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIe8c-0006hB-J5 for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2016 10:12:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIe8Y-0007tt-JH for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2016 10:12:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIe8Y-0007to-Ga for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2016 10:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aIe8Y-0001yH-Aa for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2016 10:12: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: Mon, 11 Jan 2016 15:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 2099 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 2099-submit@debbugs.gnu.org id=B2099.14525251107559 (code B ref 2099); Mon, 11 Jan 2016 15:12:02 +0000 Original-Received: (at 2099) by debbugs.gnu.org; 11 Jan 2016 15:11:50 +0000 Original-Received: from localhost ([127.0.0.1]:46559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aIe8L-0001xr-Pw for submit@debbugs.gnu.org; Mon, 11 Jan 2016 10:11:50 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48595) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aIe8K-0001xc-5H for 2099@debbugs.gnu.org; Mon, 11 Jan 2016 10:11:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIe8A-0007jn-Qi for 2099@debbugs.gnu.org; Mon, 11 Jan 2016 10:11:42 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIe8A-0007jj-O2; Mon, 11 Jan 2016 10:11:38 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1929 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aIe89-0000sQ-VP; Mon, 11 Jan 2016 10:11:38 -0500 In-reply-to: (message from Alan J Third on Sun, 10 Jan 2016 22:12:10 +0000) 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:111495 Archived-At: > From: Alan J Third > Date: Sun, 10 Jan 2016 22:12:10 +0000 > Cc: Markus Triska , 2099@debbugs.gnu.org > > > Markus Triska writes: > > > >> When you do: > >> > >> $ emacs -Q --eval "(let (v) (while t (setq v (cons v v))))" > >> > >> then Emacs crashes with: > >> > >> Program received signal EXC_BAD_ACCESS, Could not access memory. > >> Reason: KERN_INVALID_ADDRESS at address: 0xbf7ffffc > >> 0x0013bc1a in mark_object (arg=40166541) at alloc.c:5372 > >> (gdb) bt > >> #0 0x0013bc1a in mark_object (arg=40166541) at alloc.c:5372 > > > > I can confirm that the crash is still present in Emacs 24: > > And Emacs 25: > > Fatal error 11: Segmentation fault Of course: this is expected. I admit I don't really understand what is the purpose of this bug report; perhaps the OP could clarify. Here's my take on this: . What happens is clear: stack overflow during GC. Since the stack space is always limited, one can always overflow it by deliberately consing larger and larger objects. . When stack overflow happens during GC, Emacs commits suicide, because such fatal errors are not recoverable with the current code. . Making GC non-recursive is a large job, that will most probably require significant changes in GC as a whole, not just in the recursive mark step. If someone wants to work on that, they surely don't need this bug as an inspiration. IOW, this is a known limitation of the current GC implementation. So I think we should mark this bug "wishlist" (or maybe even "wontfix"), and leave it at that. Any objections/comments/suggestions?