pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/editors/emacs20 Extend previous to realloc and free as...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bfcc5e4e55e9
branches:  trunk
changeset: 596193:bfcc5e4e55e9
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Thu Dec 01 05:12:57 2011 +0000

description:
Extend previous to realloc and free as well, which is almost certainly
necessary. PR 45669.

diffstat:

 editors/emacs20/distinfo         |   4 ++--
 editors/emacs20/patches/patch-bm |  30 ++++++++++++++++++++++++++++--
 2 files changed, 30 insertions(+), 4 deletions(-)

diffs (66 lines):

diff -r a9bb11f7db8b -r bfcc5e4e55e9 editors/emacs20/distinfo
--- a/editors/emacs20/distinfo  Thu Dec 01 05:07:22 2011 +0000
+++ b/editors/emacs20/distinfo  Thu Dec 01 05:12:57 2011 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.21 2011/12/01 05:07:22 dholland Exp $
+$NetBSD: distinfo,v 1.22 2011/12/01 05:12:57 dholland Exp $
 
 SHA1 (emacs-20.7-mule-4.1b-elc.tar.gz) = 3894fb2b81bb326545f6ccc3bf0a8405c23004ff
 RMD160 (emacs-20.7-mule-4.1b-elc.tar.gz) = c675b31dafaa4321a453af9d87eddf051ee71b1f
@@ -47,7 +47,7 @@
 SHA1 (patch-bj) = 6dba88723ee632b67fcf6a2dd2918e69034837e2
 SHA1 (patch-bk) = 7582e915a5bd9778259961e7fa842d5cdce3e85c
 SHA1 (patch-bl) = f2cd03713d7cdb6cb41119569031249d7d708b13
-SHA1 (patch-bm) = b493e6d24bc3940da004322651ee24a25eda46e5
+SHA1 (patch-bm) = 2f00f63120a90477c6f5c63ac6ca23fc508b9e54
 SHA1 (patch-bn) = 247c04ae1accf3bc6b07b22767eb3cf2cdb55013
 SHA1 (patch-bo) = f9b8b73af91a445dbf50f9e862b84c7abc2b730e
 SHA1 (patch-bp) = 9091134cf50e17ce58976c3193666e716345a124
diff -r a9bb11f7db8b -r bfcc5e4e55e9 editors/emacs20/patches/patch-bm
--- a/editors/emacs20/patches/patch-bm  Thu Dec 01 05:07:22 2011 +0000
+++ b/editors/emacs20/patches/patch-bm  Thu Dec 01 05:12:57 2011 +0000
@@ -1,4 +1,10 @@
-$NetBSD: patch-bm,v 1.3 2011/12/01 05:07:23 dholland Exp $
+$NetBSD: patch-bm,v 1.4 2011/12/01 05:12:57 dholland Exp $
+
+- use standard headers
+- fix type of __malloc_extra_blocks
+- add an empty asm() destroying memory that prevents gcc from
+  optimizing out __malloc_hook and friends (which leads to
+  SIGSEGV in temacs during build)
 
 --- src/alloc.c.orig   1999-09-16 07:20:15.000000000 +0000
 +++ src/alloc.c
@@ -17,7 +23,17 @@
  #endif /* !defined(DOUG_LEA_MALLOC) */
  
  #define max(A,B) ((A) > (B) ? (A) : (B))
-@@ -420,6 +421,9 @@ emacs_blocked_malloc (size)
+@@ -380,6 +381,9 @@ emacs_blocked_free (ptr)
+ {
+   BLOCK_INPUT;
+   __free_hook = old_free_hook;
++#ifdef __GNUC__
++  __asm __volatile("":::"memory");
++#endif
+   free (ptr);
+   /* If we released our reserve (due to running out of memory),
+      and we have a fair amount free once again,
+@@ -420,6 +424,9 @@ emacs_blocked_malloc (size)
  
    BLOCK_INPUT;
    __malloc_hook = old_malloc_hook;
@@ -27,3 +43,13 @@
  #ifdef DOUG_LEA_MALLOC
      mallopt (M_TOP_PAD, malloc_hysteresis * 4096);
  #else
+@@ -441,6 +448,9 @@ emacs_blocked_realloc (ptr, size)
+ 
+   BLOCK_INPUT;
+   __realloc_hook = old_realloc_hook;
++#ifdef __GNUC__
++  __asm __volatile("":::"memory");
++#endif
+   value = (void *) realloc (ptr, size);
+   __realloc_hook = emacs_blocked_realloc;
+   UNBLOCK_INPUT;



Home | Main Index | Thread Index | Old Index