From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#21666: 25.0.50; Random segfaults Date: Tue, 13 Oct 2015 09:09:16 -0700 Organization: UCLA Computer Science Department Message-ID: <561D2CAC.40404@cs.ucla.edu> References: <87si5fugvw.fsf@loki.jorgenschaefer.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030304030708030204050003" X-Trace: ger.gmane.org 1444752722 5235 80.91.229.3 (13 Oct 2015 16:12:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Oct 2015 16:12:02 +0000 (UTC) To: Jorgen Schaefer , 21666@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 13 18:11:51 2015 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 1Zm2Aw-0003ur-B4 for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Oct 2015 18:11:42 +0200 Original-Received: from localhost ([::1]:37223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zm2Av-0006M6-MU for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Oct 2015 12:11:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zm29Q-0005Ov-PG for bug-gnu-emacs@gnu.org; Tue, 13 Oct 2015 12:10:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zm29M-0003Ip-LG for bug-gnu-emacs@gnu.org; Tue, 13 Oct 2015 12:10:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zm29M-0003Ig-HF for bug-gnu-emacs@gnu.org; Tue, 13 Oct 2015 12:10:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zm29L-0001rZ-J2 for bug-gnu-emacs@gnu.org; Tue, 13 Oct 2015 12:10:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Oct 2015 16:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21666 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21666-submit@debbugs.gnu.org id=B21666.14447525607106 (code B ref 21666); Tue, 13 Oct 2015 16:10:03 +0000 Original-Received: (at 21666) by debbugs.gnu.org; 13 Oct 2015 16:09:20 +0000 Original-Received: from localhost ([127.0.0.1]:38937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zm28e-0001qY-0G for submit@debbugs.gnu.org; Tue, 13 Oct 2015 12:09:20 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45261) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zm28c-0001qQ-0V for 21666@debbugs.gnu.org; Tue, 13 Oct 2015 12:09:18 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5697D1608CE; Tue, 13 Oct 2015 09:09:17 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id un0gtoAeGgKw; Tue, 13 Oct 2015 09:09:16 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A1D72160D3D; Tue, 13 Oct 2015 09:09:16 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NDDwvIl-Nc99; Tue, 13 Oct 2015 09:09:16 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 8492C1608CE; Tue, 13 Oct 2015 09:09:16 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: <87si5fugvw.fsf@loki.jorgenschaefer.de> 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: 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:107576 Archived-At: This is a multi-part message in MIME format. --------------030304030708030204050003 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Those two backtraces both have a call to mapcar1 with a long list (leni=2544 in one, leni=2502 in the other). When Fmapcar uses SAFE_ALLOCA_LISP, it'll ask for (say) 2502*8 bytes, or 20016 bytes, and this is more than the 16 KiB MAX_ALLOCA limit, which means SAFE_ALLOCA_LISP will invoke xmalloc and make_save_memory rather than invoking AVAIL_ALLOCA. One possibility is that the xmalloced memory isn't being properly analyzed by the garbage collector. To test that theory, can you please try something like the attached patch? This wouldn't fix the bug, but it would mean mapcar should work for larger lists and you won't get a backtrace until the list gets about twice as large. --------------030304030708030204050003 Content-Type: text/plain; charset=UTF-8; name="t.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="t.diff" ZGlmZiAtLWdpdCBhL3NyYy9mbnMuYyBiL3NyYy9mbnMuYwppbmRleCBkZmQ0OGEyLi5iYjBh ZjRhIDEwMDY0NAotLS0gYS9zcmMvZm5zLmMKKysrIGIvc3JjL2Zucy5jCkBAIC0yNTg0LDYg KzI1ODQsNyBAQCBTRVFVRU5DRSBtYXkgYmUgYSBsaXN0LCBhIHZlY3RvciwgYSBib29sLXZl Y3Rvciwgb3IgYSBzdHJpbmcuICAqLykKICAgcmVnaXN0ZXIgTGlzcF9PYmplY3QgKmFyZ3M7 CiAgIExpc3BfT2JqZWN0IHJldDsKICAgVVNFX1NBRkVfQUxMT0NBOworICBzYV9hdmFpbCA9 IDMyICogMTAyNDsKIAogICBsZW4gPSBGbGVuZ3RoIChzZXF1ZW5jZSk7CiAgIGlmIChDSEFS X1RBQkxFX1AgKHNlcXVlbmNlKSkK --------------030304030708030204050003--