GNU bug report logs - #28308
Build failure on FreeBSD/aarch64

Previous Next

Package: emacs;

Reported by: Gergely Czuczy <gergely.czuczy <at> harmless.hu>

Date: Thu, 31 Aug 2017 16:43:01 UTC

Severity: important

Tags: fixed, patch

Merged with 24892

Fixed in version 26.1

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Gergely Czuczy <gergely.czuczy <at> harmless.hu>, 28308 <at> debbugs.gnu.org
Subject: bug#28308: Build failure on FreeBSD/aarch64
Date: Tue, 31 Oct 2017 13:31:46 -0400
tags 28308 + patch
quit

On Tue, Oct 24, 2017 at 2:43 PM, Noam Postavsky
<npostavs <at> users.sourceforge.net> wrote:

> It seems that the memory pointer to by float_block->floats becomes
> invalid following the dumping process.

The following patch which makes FreeBSD use the hybrid malloc scheme fixes it:

diff --git a/configure.ac b/configure.ac
index d294412dc4..2e690987a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2206,7 +2206,7 @@ AC_DEFUN
 case "$opsys" in
   ## darwin ld insists on the use of malloc routines in the System framework.
   darwin | mingw32 | nacl | sol2-10) ;;
-  cygwin) hybrid_malloc=yes
+  freebsd | cygwin) hybrid_malloc=yes
           system_malloc= ;;
   *) test "$ac_cv_func_sbrk" = yes &&
system_malloc=$emacs_cv_sanitize_address;;
 esac
diff --git a/src/gmalloc.c b/src/gmalloc.c
index baaff58050..8fd05fe845 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -1509,9 +1509,13 @@ gdefault_morecore (ptrdiff_t increment)
       return bss_sbrk (increment);
     }
 #endif
+#ifdef HAVE_SBRK
   result = (void *) __sbrk (increment);
   if (result == (void *) -1)
     return NULL;
+#else
+  result = NULL;
+#endif
   return result;
 }




This bug report was last modified 7 years and 201 days ago.

Previous Next


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