all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Wolfgang Jenkner <wjenkner@inode.at>, Joseph Mingrone <jrm@ftfl.ca>
Cc: ashish@FreeBSD.org, 22065@debbugs.gnu.org,
	Dmitry Antipov <dmantipov@yandex.ru>
Subject: bug#22065: core dumped during compilation (emacs-25 branch on FreeBSD 9)
Date: Sun, 14 Feb 2016 11:47:57 -0800	[thread overview]
Message-ID: <56C0D9ED.3030002@cs.ucla.edu> (raw)
In-Reply-To: <85si0vjkos.fsf@iznogoud.viz>

[-- Attachment #1: Type: text/plain, Size: 530 bytes --]

Wolfgang Jenkner wrote:
> So, perhaps, the FreeBSD 9 default base cc (a patched gcc 4.2.1) has
> some stack-related optimization bug, even on amd64?

Thanks for the detective work. It inspired me to search GCC bug reports, where I 
found a couple that appear to be directly relevant. The corresponding bug was 
fixed in 2008 but GCC 4.2.1 predates the fix. I installed the attached patch 
into the emacs-25 branch, and I hope it works around the compiler bug with 
stack-allocated Lisp objects on FreeBSD 9. Please give it a try.

[-- Attachment #2: emacs.diff --]
[-- Type: text/x-diff, Size: 700 bytes --]

diff --git a/src/lisp.h b/src/lisp.h
index af73c4b..8eab38b 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4522,6 +4522,12 @@ extern void *record_xmalloc (size_t) ATTRIBUTE_ALLOC_SIZE ((1));
    This feature is experimental and requires careful debugging.
    Build with CPPFLAGS='-DUSE_STACK_LISP_OBJECTS=0' to disable it.  */
 
+#if (!defined USE_STACK_LISP_OBJECTS \
+     && defined __GNUC__ && !defined __clang__ \
+     && !(4 < __GNUC__ + (3 < __GNUC_MINOR__ + (2 <= __GNUC_PATCHLEVEL__))))
+  /* Work around GCC bugs 36584 and 35271, which were fixed in GCC 4.3.2.  */
+# define USE_STACK_LISP_OBJECTS false
+#endif
 #ifndef USE_STACK_LISP_OBJECTS
 # define USE_STACK_LISP_OBJECTS true
 #endif

  reply	other threads:[~2016-02-14 19:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-30 22:10 bug#22065: core dumped during compilation (emacs-25 branch on FreeBSD 9) Joseph Mingrone
2015-12-26 21:22 ` Lars Ingebrigtsen
2016-02-13  1:08 ` Paul Eggert
2016-02-14 16:12 ` Wolfgang Jenkner
2016-02-14 19:47   ` Paul Eggert [this message]
2016-02-15  4:05     ` Joseph Mingrone
2016-02-15  5:56       ` Ashish SHUKLA
2016-02-15  8:17       ` Paul Eggert
2016-02-15 13:08         ` Wolfgang Jenkner
2016-02-15 18:51           ` Joseph Mingrone
2016-02-15 18:51         ` Joseph Mingrone
2016-02-17  3:38           ` Joseph Mingrone
2016-02-17  7:56             ` Paul Eggert
2016-02-17 13:23               ` Wolfgang Jenkner
2016-02-17 15:35                 ` Joseph Mingrone
2016-02-17 17:49             ` Wolfgang Jenkner
2016-02-17 22:45               ` Joseph Mingrone
2016-02-18 13:39                 ` Wolfgang Jenkner
2016-03-20  2:40 ` Paul Eggert
     [not found] ` <handler.22065.D22065.145844160912708.notifdone@debbugs.gnu.org>
2016-03-20  2:52   ` bug#22065: closed (Re: bug#22065: core dumped during compilation (emacs-25 branch on FreeBSD 9)) Joseph Mingrone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56C0D9ED.3030002@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=22065@debbugs.gnu.org \
    --cc=ashish@FreeBSD.org \
    --cc=dmantipov@yandex.ru \
    --cc=jrm@ftfl.ca \
    --cc=wjenkner@inode.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.