From 7687ddfa0eb323129bb7c7b3b7bf278a47f37201 Mon Sep 17 00:00:00 2001 From: Ashish SHUKLA Date: Mon, 23 Sep 2013 08:33:31 +0000 Subject: [PATCH] - Fix crash on 10-CURRENT Submitted by: dim --- editors/emacs22/files/patch-src__alloc.c | 36 +++++++++++++++++-- .../emacs22/files/patch-src__m__intel386.h | 11 ++++++ 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 editors/emacs22/files/patch-src__m__intel386.h diff --git a/editors/emacs22/files/patch-src__alloc.c b/editors/emacs22/files/patch-src__alloc.c index 80c226b6f778..17d8ed30d6c1 100644 --- a/editors/emacs22/files/patch-src__alloc.c +++ b/editors/emacs22/files/patch-src__alloc.c @@ -1,6 +1,36 @@ ---- src/alloc.c.orig 2008-09-07 05:25:27.000000000 +0300 -+++ src/alloc.c 2008-09-07 05:25:27.000000000 +0300 -@@ -4573,8 +4573,12 @@ +--- src/alloc.c.orig 2008-08-12 20:35:44.000000000 +0200 ++++ src/alloc.c 2013-09-07 21:52:46.000000000 +0200 +@@ -1205,6 +1205,9 @@ + #endif /* GC_MALLOC_CHECK */ + + __free_hook = old_free_hook; ++#ifdef __GNUC__ ++ __asm __volatile ("" : : : "memory"); ++#endif + free (ptr); + + /* If we released our reserve (due to running out of memory), +@@ -1236,6 +1239,9 @@ + + BLOCK_INPUT_ALLOC; + __malloc_hook = old_malloc_hook; ++#ifdef __GNUC__ ++ __asm __volatile ("" : : : "memory"); ++#endif + #ifdef DOUG_LEA_MALLOC + mallopt (M_TOP_PAD, malloc_hysteresis * 4096); + #else +@@ -1285,6 +1291,9 @@ + + BLOCK_INPUT_ALLOC; + __realloc_hook = old_realloc_hook; ++#ifdef __GNUC__ ++ __asm __volatile ("" : : : "memory"); ++#endif + + #ifdef GC_MALLOC_CHECK + if (ptr) +@@ -4573,8 +4582,12 @@ needed on ia64 too. See mach_dep.c, where it also says inline assembler doesn't work with relevant proprietary compilers. */ #ifdef __sparc__ diff --git a/editors/emacs22/files/patch-src__m__intel386.h b/editors/emacs22/files/patch-src__m__intel386.h new file mode 100644 index 000000000000..9db1d7bdf584 --- /dev/null +++ b/editors/emacs22/files/patch-src__m__intel386.h @@ -0,0 +1,11 @@ +--- src/m/intel386.h.orig 2008-02-28 00:32:04.000000000 +0100 ++++ src/m/intel386.h 2013-09-14 16:14:18.000000000 +0200 +@@ -58,7 +58,7 @@ NOTE-END */ + /* Define NO_ARG_ARRAY if you cannot take the address of the first of a + * group of arguments and treat it as an array of the arguments. */ + +-/* #define NO_ARG_ARRAY */ ++#define NO_ARG_ARRAY + + /* Define WORD_MACHINE if addresses and such have + * to be corrected before they can be used as byte counts. */