From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.bugs Subject: bug#18473: 24.4.50; SEGFAULT when vconcatting more than 2048 vectors Date: Mon, 15 Sep 2014 19:04:37 +0400 Message-ID: <54170005.6080405@yandex.ru> References: <87lhpngc6a.fsf@maru2.md5i.com> <5415CC07.2010702@yandex.ru> <5416895B.4080807@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1410794052 14625 80.91.229.3 (15 Sep 2014 15:14:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Sep 2014 15:14:12 +0000 (UTC) Cc: 18473@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 15 17:14:05 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 1XTXye-0002tJ-RB for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Sep 2014 17:14:05 +0200 Original-Received: from localhost ([::1]:60536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTXye-0007NO-9w for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Sep 2014 11:14:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTXq1-0001U2-R6 for bug-gnu-emacs@gnu.org; Mon, 15 Sep 2014 11:05:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTXpu-0008Rl-It for bug-gnu-emacs@gnu.org; Mon, 15 Sep 2014 11:05:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTXpu-0008RZ-Dz for bug-gnu-emacs@gnu.org; Mon, 15 Sep 2014 11:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XTXpu-0006kD-0N for bug-gnu-emacs@gnu.org; Mon, 15 Sep 2014 11:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Antipov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Sep 2014 15:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18473 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18473-submit@debbugs.gnu.org id=B18473.141079348525889 (code B ref 18473); Mon, 15 Sep 2014 15:05:01 +0000 Original-Received: (at 18473) by debbugs.gnu.org; 15 Sep 2014 15:04:45 +0000 Original-Received: from localhost ([127.0.0.1]:41541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XTXpc-0006jU-Kc for submit@debbugs.gnu.org; Mon, 15 Sep 2014 11:04:45 -0400 Original-Received: from forward3l.mail.yandex.net ([84.201.143.136]:53845) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XTXpY-0006jI-RL for 18473@debbugs.gnu.org; Mon, 15 Sep 2014 11:04:42 -0400 Original-Received: from smtp16.mail.yandex.net (smtp16.mail.yandex.net [95.108.252.16]) by forward3l.mail.yandex.net (Yandex) with ESMTP id 01CD7150135C; Mon, 15 Sep 2014 19:04:38 +0400 (MSK) Original-Received: from smtp16.mail.yandex.net (localhost [127.0.0.1]) by smtp16.mail.yandex.net (Yandex) with ESMTP id 67A926A080E; Mon, 15 Sep 2014 19:04:38 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp16.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 1zhiownI5x-4bSmN3oo; Mon, 15 Sep 2014 19:04:37 +0400 (using TLSv1.2 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: 868ca6d4-ffe8-4a83-b58d-cef3033e1acf DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1410793478; bh=jkQrMYxoS92eOAqcYQKun7OAr3sjtG0C8Ea901E3D8A=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=IysbUvaE53MMc2HaAJhe0waINxlAPGbq+gPp7WJO7cREa4QD8eWbsmSY3mm7Nhirj QlKYC0spdQUPjaDqnUcXWDouMCswx/oIHBWpSP9ou1mzrg+0UpKGPl4eK0GHCViDda Z+PMgDi1F7RPx8Y17u1jCjRT3Eq4kTXMtOLUh43M= Authentication-Results: smtp16.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 In-Reply-To: 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:93378 Archived-At: On 09/15/2014 05:09 PM, Stefan Monnier wrote: > I'm not thrilled at the idea of having to call backtrace_top every time, > instead of just using "specpdl_ptr - 1". I'd much rather compute > specpdl_ptr - 1 before calling USE_SAFE_ALLOCA, for example. Hm...this simple fix: === modified file 'src/eval.c' --- src/eval.c 2014-09-02 06:29:01 +0000 +++ src/eval.c 2014-09-15 14:57:18 +0000 @@ -2136,6 +2136,7 @@ /* Pass a vector of evaluated arguments. */ Lisp_Object *vals; ptrdiff_t argnum = 0; + union specbinding *pdl = specpdl_ptr - 1; USE_SAFE_ALLOCA; SAFE_ALLOCA_LISP (vals, XINT (numargs)); @@ -2151,8 +2152,8 @@ gcpro3.nvars = argnum; } - set_backtrace_args (specpdl_ptr - 1, vals); - set_backtrace_nargs (specpdl_ptr - 1, XINT (numargs)); + set_backtrace_args (pdl, vals); + set_backtrace_nargs (pdl, XINT (numargs)); val = (XSUBR (fun)->function.aMANY) (XINT (numargs), vals); UNGCPRO; causes bootstrap crash (with emacs-24). Hard to explain why, huh? > BTW, don't we have the same problem for the subsequent call to > backtrace_debug_on_exit (and this one is worse because it is shared > among all the different kinds of calls, so we *really* don't want to > slow it down). IIUC this applies only to apply_lambda, where we call to backtrace_debug_on_exit between SAFE_ALLOCA_LISP and SAFE_FREE. Dmitry