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#22522: Commit b88e9cded7ae3756e3a2ec4a23e8df352a0239f9 breaks emacs dumping for me Date: Tue, 2 Feb 2016 09:26:17 -0800 Organization: UCLA Computer Science Department Message-ID: <56B0E6B9.5020609@cs.ucla.edu> References: <87mvrkft66.fsf@whirm.eu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010805030809050304080901" X-Trace: ger.gmane.org 1454434049 12721 80.91.229.3 (2 Feb 2016 17:27:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Feb 2016 17:27:29 +0000 (UTC) Cc: Andy Moreton , 22522@debbugs.gnu.org To: Elric Milon Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 02 18:27:18 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 1aQejT-0005oR-NS for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Feb 2016 18:27:15 +0100 Original-Received: from localhost ([::1]:58385 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQejP-0005xe-LE for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Feb 2016 12:27:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQejK-0005v5-SD for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 12:27:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQejG-00060B-Rg for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 12:27:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQejG-000603-Or for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 12:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aQejG-0006YQ-F6 for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 12:27:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87mvrkft66.fsf@whirm.eu> Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Feb 2016 17:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22522 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22522-submit@debbugs.gnu.org id=B22522.145443398625149 (code B ref 22522); Tue, 02 Feb 2016 17:27:02 +0000 Original-Received: (at 22522) by debbugs.gnu.org; 2 Feb 2016 17:26:26 +0000 Original-Received: from localhost ([127.0.0.1]:57011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQeig-0006XZ-7R for submit@debbugs.gnu.org; Tue, 02 Feb 2016 12:26:26 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41721) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQeie-0006XM-DO for 22522@debbugs.gnu.org; Tue, 02 Feb 2016 12:26:24 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 79BDE1601F0; Tue, 2 Feb 2016 09:26:18 -0800 (PST) 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 QCzIye7vm2LS; Tue, 2 Feb 2016 09:26:17 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C36C4160522; Tue, 2 Feb 2016 09:26:17 -0800 (PST) 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 2GmChhDGUyNi; Tue, 2 Feb 2016 09:26:17 -0800 (PST) Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id A70181601F0; Tue, 2 Feb 2016 09:26:17 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 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:112277 Archived-At: This is a multi-part message in MIME format. --------------010805030809050304080901 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Thanks for reporting this. I reproduced the problem on Fedora 23 x86-64. It appears to be a bug in link-time optimization. The symbol __malloc_initialize_hook is marked external in alloc.o, but merely static (private) in temacs: $ nm -o alloc.o temacs | grep __malloc_init alloc.o:00000000002e0a40 D __malloc_initialize_hook temacs:0000000000b25340 d __malloc_initialize_hook We used to define this variable in emacs.o, and we now do it in alloc.o. Possibly we were lucky that the code ever worked, as I guess the LTO bug strikes depending on link time order. I installed the attached patch, which works around the bug for me. Please give it a try. Are any of you connected to the folks who implement LTO? It'd be nice to report this bug to them somehow. --------------010805030809050304080901 Content-Type: application/x-patch; name="0001-Port-malloc.h-hygiene-fix-to-LTO.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0001-Port-malloc.h-hygiene-fix-to-LTO.patch" RnJvbSAzNzY3OTYzOWY0OGI1OTJhOGUzOGUyZDhlOGUxYWI1YjJmNTU0NmI3IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBUdWUsIDIgRmViIDIwMTYgMDk6MTY6MjQgLTA4MDAKU3ViamVjdDogW1BBVENI XSBQb3J0IG1hbGxvYy5oIGh5Z2llbmUgZml4IHRvIExUTwoKKiBzcmMvYWxsb2MuYyAoX19t YWxsb2NfaW5pdGlhbGl6ZV9ob29rKToKTWFrZSBpdCBleHRlcm5hbGx5IHZpc2libGUgKEJ1 ZyMyMjUyMikuCi0tLQogc3JjL2FsbG9jLmMgfCA0ICsrKy0KIDEgZmlsZSBjaGFuZ2VkLCAz IGluc2VydGlvbnMoKyksIDEgZGVsZXRpb24oLSkKCmRpZmYgLS1naXQgYS9zcmMvYWxsb2Mu YyBiL3NyYy9hbGxvYy5jCmluZGV4IDU3ZWY0YzUuLmI0MGMxZjMgMTAwNjQ0Ci0tLSBhL3Ny Yy9hbGxvYy5jCisrKyBiL3NyYy9hbGxvYy5jCkBAIC0xNTcsMTAgKzE1NywxMiBAQCBtYWxs b2NfaW5pdGlhbGl6ZV9ob29rICh2b2lkKQogICAgIH0KIH0KIAorLyogRGVjbGFyZSB0aGUg bWFsbG9jIGluaXRpYWxpemF0aW9uIGhvb2ssIHdoaWNoIHJ1bnMgYmVmb3JlICdtYWluJyBz dGFydHMuCisgICBFWFRFUk5BTExZX1ZJU0lCTEUgd29ya3MgYXJvdW5kIEJ1ZyMyMjUyMi4g ICovCiAjIGlmbmRlZiBfX01BTExPQ19IT09LX1ZPTEFUSUxFCiAjICBkZWZpbmUgX19NQUxM T0NfSE9PS19WT0xBVElMRQogIyBlbmRpZgotdm9pZGZ1bmNwdHIgX19NQUxMT0NfSE9PS19W T0xBVElMRSBfX21hbGxvY19pbml0aWFsaXplX2hvb2sKK3ZvaWRmdW5jcHRyIF9fTUFMTE9D X0hPT0tfVk9MQVRJTEUgX19tYWxsb2NfaW5pdGlhbGl6ZV9ob29rIEVYVEVSTkFMTFlfVklT SUJMRQogICA9IG1hbGxvY19pbml0aWFsaXplX2hvb2s7CiAKICNlbmRpZgotLSAKMi41LjAK Cg== --------------010805030809050304080901--