GNU bug report logs - #22522
Commit b88e9cded7ae3756e3a2ec4a23e8df352a0239f9 breaks emacs dumping for me

Previous Next

Package: emacs;

Reported by: Elric Milon <emacs <at> whirm.eu>

Date: Mon, 1 Feb 2016 16:52:02 UTC

Severity: important

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #61 received at 22522 <at> debbugs.gnu.org (full text, mbox):

From: Ken Brown <kbrown <at> cornell.edu>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Andy Moreton <andrewjmoreton <at> gmail.com>, 22522 <at> debbugs.gnu.org
Subject: Re: bug#22522: Commit b88e9cded7ae3756e3a2ec4a23e8df352a0239f9 breaks
 emacs dumping for me
Date: Wed, 3 Feb 2016 08:35:33 -0500
On 2/3/2016 3:41 AM, Paul Eggert wrote:
> Ken Brown wrote:
>>> I installed the attached patch into the Emacs master, to try to work
>>> around this problem by putting GCC into C11 mode. Please give it a try.
>>
>> No, that didn't fix it.
> 
> Can you investigate why not?  The patch should cause 'configure' to put 
> -stdc=gnu11 into CFLAGS. If you look at config.log, it should have 
> something like this:
> 
> configure:5924: checking for gcc option to enable C11 features
> ...
> configure:6146: result: -std=gnu11
> 
> If this isn't the result, what is the result and why?

Yes, that's the result.  Compiling with that option caused __STDC_VERSION__ to be defined as 201112L.  But it didn't affect __ISO_C_VISIBLE, which is what guards the declaration of aligned_alloc.

> I'd rather not go that route, as __ISO_C_VISIBLE is supposed to be private. I installed the attached patch instead; please give it a try.

We're almost there.  After your change, I get the following in config.h:

/* Define to 1 if you have the declaration of `aligned_alloc', and to 0 if you
   don't. */
#define HAVE_DECL_ALIGNED_ALLOC 0

So we need the following additional change:

diff --git a/src/lisp.h b/src/lisp.h
index a99002b..c8363be 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3775,7 +3775,7 @@ INLINE void (check_cons_list) (void) { lisp_h_check_cons_list (); }
 #if !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC && !defined SYSTEM_MALLOC
 extern size_t __malloc_extra_blocks;
 #endif
-#ifndef HAVE_DECL_ALIGNED_ALLOC
+#if !HAVE_DECL_ALIGNED_ALLOC
 extern void *aligned_alloc (size_t, size_t) ATTRIBUTE_MALLOC_SIZE ((2));
 #endif
 extern void malloc_enable_thread (void);

Thanks.

Ken




This bug report was last modified 9 years and 170 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.