Hello community,

here is the log from the commit of package gcc5 for openSUSE:Factory checked in 
at 2016-09-17 14:35:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gcc5 (Old)
 and      /work/SRC/openSUSE:Factory/.gcc5.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gcc5"

Changes:
--------
--- /work/SRC/openSUSE:Factory/gcc5/cross-aarch64-gcc5.changes  2016-04-22 
16:16:12.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.gcc5.new/cross-aarch64-gcc5.changes     
2016-09-17 14:35:38.000000000 +0200
@@ -1,0 +2,21 @@
+Wed Sep 14 10:13:03 UTC 2016 - rguent...@suse.com
+
+- Update to gcc-5-branch head (r240125).
+- Refresh gcc-dir-version.patch
+
+-------------------------------------------------------------------
+Fri Sep  9 10:47:38 UTC 2016 - stbueh...@web.de
+
+- fix 2 issues with libffi and mmap protection
+  - fix race condition
+  - check for PaX MPROTECT
+  - make PaX EMUTRAMP experimental, disabling it
+  - adds gcc5-libffi-pax.patch and gcc5-libffi-race-condition.patch
+
+-------------------------------------------------------------------
+Fri Jun  3 11:31:18 UTC 2016 - rguent...@suse.com
+
+- Update to GCC 5.4 release.
+- Enable profiledbootstrap for x86_64, ppc64le, s390x and aarch64.
+
+-------------------------------------------------------------------
cross-armv6hl-gcc5.changes: same change
cross-armv7hl-gcc5.changes: same change
cross-avr-gcc5.changes: same change
cross-i386-gcc5.changes: same change
cross-m68k-gcc5.changes: same change
cross-ppc64-gcc5.changes: same change
cross-ppc64le-gcc5.changes: same change
cross-s390-gcc5.changes: same change
cross-s390x-gcc5.changes: same change
cross-sparc-gcc5.changes: same change
cross-sparc64-gcc5.changes: same change
cross-x86_64-gcc5.changes: same change
gcc5-testresults.changes: same change
gcc5.changes: same change
libffi-gcc5.changes: same change
libgcj-gcc5.changes: same change

Old:
----
  gcc-5.3.1-r234891.tar.bz2

New:
----
  gcc-5.4.1-r240125.tar.bz2
  gcc5-libffi-pax.patch
  gcc5-libffi-race-condition.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cross-aarch64-gcc5.spec ++++++
--- /var/tmp/diff_new_pack.1WejUW/_old  2016-09-17 14:35:49.000000000 +0200
+++ /var/tmp/diff_new_pack.1WejUW/_new  2016-09-17 14:35:49.000000000 +0200
@@ -114,7 +114,7 @@
 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
 
 Url:            http://gcc.gnu.org/
-Version:        5.3.1+r234891
+Version:        5.4.1+r240125
 Release:        0
 %define gcc_version %(echo %version | sed 's/+.*//')
 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1)
@@ -151,6 +151,9 @@
 Patch61:        gcc44-rename-info-files.patch
 # Some libgo patches
 Patch70:        gcc5-libgo-fix-certificates-lookup.patch
+# https://github.com/libffi/libffi/pull/282
+Patch100:       gcc5-libffi-pax.patch
+Patch101:       gcc5-libffi-race-condition.patch
 
 #testpatch end
 
@@ -228,6 +231,8 @@
 %patch60
 %patch61
 %patch70
+%patch100 -p1
+%patch101 -p1
 
 #test patching end
 

cross-armv6hl-gcc5.spec: same change
cross-armv7hl-gcc5.spec: same change
cross-avr-gcc5.spec: same change
cross-i386-gcc5.spec: same change
cross-m68k-gcc5.spec: same change
cross-ppc64-gcc5.spec: same change
cross-ppc64le-gcc5.spec: same change
cross-s390-gcc5.spec: same change
cross-s390x-gcc5.spec: same change
cross-sparc-gcc5.spec: same change
cross-sparc64-gcc5.spec: same change
cross-x86_64-gcc5.spec: same change
++++++ gcc5-testresults.spec ++++++
--- /var/tmp/diff_new_pack.1WejUW/_old  2016-09-17 14:35:49.000000000 +0200
+++ /var/tmp/diff_new_pack.1WejUW/_new  2016-09-17 14:35:49.000000000 +0200
@@ -258,7 +258,7 @@
 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
 
 Url:            http://gcc.gnu.org/
-Version:        5.3.1+r234891
+Version:        5.4.1+r240125
 Release:        0
 %define gcc_version %(echo %version | sed 's/+.*//')
 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1)
@@ -333,6 +333,9 @@
 Patch61:        gcc44-rename-info-files.patch
 # Some libgo patches
 Patch70:        gcc5-libgo-fix-certificates-lookup.patch
+# https://github.com/libffi/libffi/pull/282
+Patch100:       gcc5-libffi-pax.patch
+Patch101:       gcc5-libffi-race-condition.patch
 
 #testpatch end
 
@@ -461,6 +464,8 @@
 %patch60
 %patch61
 %patch70
+%patch100 -p1
+%patch101 -p1
 
 #test patching end
 
@@ -768,11 +773,11 @@
 %else
 STAGE1_FLAGS="-g"
 # Only run profiled bootstrap on archs where it works and matters
-#%ifarch x86_64 ppc64le s390x
-#make profiledbootstrap STAGE1_CFLAGS="$STAGE1_FLAGS" 
BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
-#%else
+%ifarch x86_64 ppc64le s390x aarch64
+make profiledbootstrap STAGE1_CFLAGS="$STAGE1_FLAGS" 
BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+%else
 make STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
-#%endif
+%endif
 make info
 %if 0%{?building_libjava:1}
 make -C %{GCCDIST}/libstdc++-v3/doc doc-html-doxygen

++++++ gcc5.spec ++++++
--- /var/tmp/diff_new_pack.1WejUW/_old  2016-09-17 14:35:49.000000000 +0200
+++ /var/tmp/diff_new_pack.1WejUW/_new  2016-09-17 14:35:49.000000000 +0200
@@ -240,7 +240,7 @@
 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
 
 Url:            http://gcc.gnu.org/
-Version:        5.3.1+r234891
+Version:        5.4.1+r240125
 Release:        0
 %define gcc_version %(echo %version | sed 's/+.*//')
 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1)
@@ -315,6 +315,9 @@
 Patch61:        gcc44-rename-info-files.patch
 # Some libgo patches
 Patch70:        gcc5-libgo-fix-certificates-lookup.patch
+# https://github.com/libffi/libffi/pull/282
+Patch100:       gcc5-libffi-pax.patch
+Patch101:       gcc5-libffi-race-condition.patch
 
 #testpatch end
 
@@ -1950,6 +1953,8 @@
 %patch60
 %patch61
 %patch70
+%patch100 -p1
+%patch101 -p1
 
 #test patching end
 
@@ -2257,11 +2262,11 @@
 %else
 STAGE1_FLAGS="-g"
 # Only run profiled bootstrap on archs where it works and matters
-#%ifarch x86_64 ppc64le s390x
-#make profiledbootstrap STAGE1_CFLAGS="$STAGE1_FLAGS" 
BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
-#%else
+%ifarch x86_64 ppc64le s390x aarch64
+make profiledbootstrap STAGE1_CFLAGS="$STAGE1_FLAGS" 
BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+%else
 make STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
-#%endif
+%endif
 make info
 %if 0%{?building_libjava:1}
 make -C %{GCCDIST}/libstdc++-v3/doc doc-html-doxygen

++++++ libffi-gcc5.spec ++++++
--- /var/tmp/diff_new_pack.1WejUW/_old  2016-09-17 14:35:49.000000000 +0200
+++ /var/tmp/diff_new_pack.1WejUW/_new  2016-09-17 14:35:49.000000000 +0200
@@ -257,7 +257,7 @@
 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
 
 Url:            http://gcc.gnu.org/
-Version:        5.3.1+r234891
+Version:        5.4.1+r240125
 Release:        0
 %define gcc_version %(echo %version | sed 's/+.*//')
 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1)
@@ -332,6 +332,9 @@
 Patch61:        gcc44-rename-info-files.patch
 # Some libgo patches
 Patch70:        gcc5-libgo-fix-certificates-lookup.patch
+# https://github.com/libffi/libffi/pull/282
+Patch100:       gcc5-libffi-pax.patch
+Patch101:       gcc5-libffi-race-condition.patch
 
 #testpatch end
 
@@ -632,6 +635,8 @@
 %patch60
 %patch61
 %patch70
+%patch100 -p1
+%patch101 -p1
 
 #test patching end
 
@@ -939,11 +944,11 @@
 %else
 STAGE1_FLAGS="-g"
 # Only run profiled bootstrap on archs where it works and matters
-#%ifarch x86_64 ppc64le s390x
-#make profiledbootstrap STAGE1_CFLAGS="$STAGE1_FLAGS" 
BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
-#%else
+%ifarch x86_64 ppc64le s390x aarch64
+make profiledbootstrap STAGE1_CFLAGS="$STAGE1_FLAGS" 
BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+%else
 make STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
-#%endif
+%endif
 make info
 %if 0%{?building_libjava:1}
 make -C %{GCCDIST}/libstdc++-v3/doc doc-html-doxygen

libgcj-gcc5.spec: same change

++++++ gcc-5.3.1-r234891.tar.bz2 -> gcc-5.4.1-r240125.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/gcc5/gcc-5.3.1-r234891.tar.bz2 
/work/SRC/openSUSE:Factory/.gcc5.new/gcc-5.4.1-r240125.tar.bz2 differ: char 11, 
line 1

++++++ gcc-dir-version.patch ++++++
--- /var/tmp/diff_new_pack.1WejUW/_old  2016-09-17 14:35:49.000000000 +0200
+++ /var/tmp/diff_new_pack.1WejUW/_new  2016-09-17 14:35:49.000000000 +0200
@@ -1,7 +1,7 @@
 Index: gcc/Makefile.in
 ===================================================================
---- gcc/Makefile.in.orig       2015-05-08 17:10:12.068697540 +0200
-+++ gcc/Makefile.in    2015-05-08 17:25:31.831833081 +0200
+--- gcc/Makefile.in.orig       2016-09-14 12:56:27.070191497 +0200
++++ gcc/Makefile.in    2016-09-14 12:57:38.323022112 +0200
 @@ -810,12 +810,14 @@ GTM_H     = tm.h      $(tm_file_list) in
  TM_H      = $(GTM_H) insn-flags.h $(OPTIONS_H)
  
@@ -76,7 +76,7 @@
 @@ -2640,8 +2643,8 @@ build/gcov-iov$(build_exeext): build/gco
                build/gcov-iov.o -o $@
  
- gcov-iov.h: s-iov
+ gcov-iov.h: s-iov; @true
 -s-iov: build/gcov-iov$(build_exeext) $(BASEVER) $(DEVPHASE)
 -      build/gcov-iov$(build_exeext) '$(BASEVER_c)' '$(DEVPHASE_c)' \
 +s-iov: build/gcov-iov$(build_exeext) $(FULLVER) $(DEVPHASE)
@@ -86,8 +86,8 @@
        $(STAMP) s-iov
 Index: libjava/testsuite/lib/libjava.exp
 ===================================================================
---- libjava/testsuite/lib/libjava.exp.orig     2014-12-02 13:29:22.487902351 
+0100
-+++ libjava/testsuite/lib/libjava.exp  2015-05-08 17:25:31.831833081 +0200
+--- libjava/testsuite/lib/libjava.exp.orig     2016-09-14 12:56:27.070191497 
+0200
++++ libjava/testsuite/lib/libjava.exp  2016-09-14 12:56:35.190286153 +0200
 @@ -179,7 +179,7 @@ proc libjava_init { args } {
  
      set text [eval exec "$GCJ_UNDER_TEST -B$specdir -v 2>@ stdout"]
@@ -99,8 +99,8 @@
  
 Index: gcc/cppbuiltin.c
 ===================================================================
---- gcc/cppbuiltin.c.orig      2015-01-12 16:22:34.486893087 +0100
-+++ gcc/cppbuiltin.c   2015-05-08 17:25:31.832833089 +0200
+--- gcc/cppbuiltin.c.orig      2016-09-14 12:56:27.070191497 +0200
++++ gcc/cppbuiltin.c   2016-09-14 12:56:35.190286153 +0200
 @@ -46,9 +46,9 @@ parse_basever (int *major, int *minor, i
    static int s_major = -1, s_minor, s_patchlevel;
  

++++++ gcc.spec.in ++++++
--- /var/tmp/diff_new_pack.1WejUW/_old  2016-09-17 14:35:49.000000000 +0200
+++ /var/tmp/diff_new_pack.1WejUW/_new  2016-09-17 14:35:49.000000000 +0200
@@ -246,7 +246,7 @@
 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
 
 URL:          http://gcc.gnu.org/
-Version: 5.3.1+r234891
+Version: 5.4.1+r240125
 Release:      1
 %define gcc_version %(echo %version | sed 's/+.*//')
 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1)
@@ -323,6 +323,9 @@
 Patch61:       gcc44-rename-info-files.patch
 # Some libgo patches
 Patch70:       gcc5-libgo-fix-certificates-lookup.patch
+# https://github.com/libffi/libffi/pull/282
+Patch100:      gcc5-libffi-pax.patch
+Patch101:      gcc5-libffi-race-condition.patch
 
 #testpatch end
 
@@ -1215,6 +1218,8 @@
 %patch60
 %patch61
 %patch70
+%patch100 -p1
+%patch101 -p1
 
 #test patching end
 
@@ -1524,11 +1529,11 @@
 %else
 STAGE1_FLAGS="-g"
 # Only run profiled bootstrap on archs where it works and matters
-#%ifarch x86_64 ppc64le s390x
-#make profiledbootstrap STAGE1_CFLAGS="$STAGE1_FLAGS" 
BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
-#%else
+%ifarch x86_64 ppc64le s390x aarch64
+make profiledbootstrap STAGE1_CFLAGS="$STAGE1_FLAGS" 
BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
+%else
 make STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
-#%endif
+%endif
 make info
 %if 0%{?building_libjava:1}
 make -C %{GCCDIST}/libstdc++-v3/doc doc-html-doxygen

++++++ gcc5-libffi-pax.patch ++++++
>From 757876336c183f5b20b6620d674cc9817fd0d280 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20B=C3=BChler?= <bueh...@cert.uni-stuttgart.de>
Date: Wed, 7 Sep 2016 15:50:54 +0200
Subject: [PATCH 2/2] always check for PaX MPROTECT on linux, make EMUTRAMP
 experimental

- ffi_prep_closure_loc doesn't necessarily generate trampolines recognized by
  PaX EMUTRAMP handler; there is no way to check before, and it isn't working
on x86-64 right now -> experimental
- if MPROTECT is enabled use the same workaround as is used for SELinux (double
  mmap())
---
 configure.ac   | 11 +++++++---
 src/closures.c | 68 +++++++++++++++++++++++++++++++++++++++-------------------
 2 files changed, 54 insertions(+), 25 deletions(-)

--- a/libffi/configure.ac
+++ b/libffi/configure.ac
@@ -177,12 +177,17 @@
     ;;
 esac
 
-# On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC.
+# On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC;
+# if EMUTRAMP is active too ffi could try mapping without PROT_EXEC,
+# but the kernel needs to recognize the trampoline generated by ffi.
+# Otherwise fallback to double mmap trick.
 AC_ARG_ENABLE(pax_emutramp,
-  [  --enable-pax_emutramp       enable pax emulated trampolines, for we can't 
use PROT_EXEC],
+  [  --enable-pax_emutramp       enable pax emulated trampolines 
(experimental)],
   if test "$enable_pax_emutramp" = "yes"; then
+    AC_MSG_WARN([EMUTRAMP is experimental only.  Use 
--enable-pax_emutramp=experimental to enforce.])
+  elif test "$enable_pax_emutramp" = "experimental"; then
     AC_DEFINE(FFI_MMAP_EXEC_EMUTRAMP_PAX, 1,
-      [Define this if you want to enable pax emulated trampolines])
+      [Define this if you want to enable pax emulated trampolines 
(experimental)])
   fi)
 
 FFI_EXEC_TRAMPOLINE_TABLE=0
--- a/libffi/src/closures.c
+++ b/libffi/src/closures.c
@@ -53,14 +53,18 @@
 # endif
 #endif
 
-#if FFI_MMAP_EXEC_WRIT && !defined FFI_MMAP_EXEC_SELINUX
-# ifdef __linux__
+#if FFI_MMAP_EXEC_WRIT && defined __linux__
+# if !defined FFI_MMAP_EXEC_SELINUX
 /* When defined to 1 check for SELinux and if SELinux is active,
    don't attempt PROT_EXEC|PROT_WRITE mapping at all, as that
    might cause audit messages.  */
 #  define FFI_MMAP_EXEC_SELINUX 1
-# endif
-#endif
+# endif /* !defined FFI_MMAP_EXEC_SELINUX */
+# if !defined FFI_MMAP_PAX
+/* Also check for PaX MPROTECT */
+#  define FFI_MMAP_PAX 1
+# endif /* !defined FFI_MMAP_PAX */
+#endif /* FFI_MMAP_EXEC_WRIT && defined __linux__ */
 
 #if FFI_CLOSURES
 
@@ -172,14 +176,18 @@
 
 #endif /* !FFI_MMAP_EXEC_SELINUX */
 
-/* On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC. */
-#ifdef FFI_MMAP_EXEC_EMUTRAMP_PAX
+/* On PaX enable kernels that have MPROTECT enabled we can't use PROT_EXEC. */
+#if defined FFI_MMAP_PAX
 #include <stdlib.h>
 
-static int emutramp_enabled = -1;
+enum {
+  PAX_MPROTECT = (1 << 0),
+  PAX_EMUTRAMP = (1 << 1),
+};
+static int cached_pax_flags = -1;
 
 static int
-emutramp_enabled_check (void)
+pax_flags_check (void)
 {
   char *buf = NULL;
   size_t len = 0;
@@ -193,9 +201,10 @@
   while (getline (&buf, &len, f) != -1)
     if (!strncmp (buf, "PaX:", 4))
       {
-        char emutramp;
-        if (sscanf (buf, "%*s %*c%c", &emutramp) == 1)
-          ret = (emutramp == 'E');
+        if (NULL != strchr (buf + 4, 'M'))
+          ret |= PAX_MPROTECT;
+        if (NULL != strchr (buf + 4, 'E'))
+          ret |= PAX_EMUTRAMP;
         break;
       }
   free (buf);
@@ -203,9 +212,13 @@
   return ret;
 }
 
-#define is_emutramp_enabled() (emutramp_enabled >= 0 ? emutramp_enabled \
-                               : (emutramp_enabled = emutramp_enabled_check 
()))
-#endif /* FFI_MMAP_EXEC_EMUTRAMP_PAX */
+#define get_pax_flags() (cached_pax_flags >= 0 ? cached_pax_flags \
+                               : (cached_pax_flags = pax_flags_check ()))
+#define has_pax_flags(flags) ((flags) == ((flags) & get_pax_flags ()))
+#define is_mprotect_enabled() (has_pax_flags (PAX_MPROTECT))
+#define is_emutramp_enabled() (has_pax_flags (PAX_EMUTRAMP))
+
+#endif /* defined FFI_MMAP_PAX */
 
 #elif defined (__CYGWIN__) || defined(__INTERIX)
 
@@ -216,9 +229,10 @@
 
 #endif /* !defined(X86_WIN32) && !defined(X86_WIN64) */
 
-#ifndef FFI_MMAP_EXEC_EMUTRAMP_PAX
-#define is_emutramp_enabled() 0
-#endif /* FFI_MMAP_EXEC_EMUTRAMP_PAX */
+#if !defined FFI_MMAP_PAX
+# define is_mprotect_enabled() 0
+# define is_emutramp_enabled() 0
+#endif /* !defined FFI_MMAP_PAX */
 
 /* Declare all functions defined in dlmalloc.c as static.  */
 static void *dlmalloc(size_t);
@@ -525,13 +539,23 @@
   printf ("mapping in %zi\n", length);
 #endif
 
-  if (execfd == -1 && is_emutramp_enabled ())
+  /* -1 != execfd hints that we already decided to use dlmmap_locked
+     last time.  */
+  if (execfd == -1 && is_mprotect_enabled ())
     {
-      ptr = mmap (start, length, prot & ~PROT_EXEC, flags, fd, offset);
-      return ptr;
+#ifdef FFI_MMAP_EXEC_EMUTRAMP_PAX
+      if (is_emutramp_enabled ())
+        {
+          /* emutramp requires the kernel recognizing the trampoline pattern
+             generated by ffi_prep_closure_loc; there is no way to test
+             in advance whether this will work, so this is experimental.  */
+          ptr = mmap (start, length, prot & ~PROT_EXEC, flags, fd, offset);
+          return ptr;
+        }
+#endif
+      /* fallback to dlmmap_locked.  */
     }
-
-  if (execfd == -1 && !is_selinux_enabled ())
+  else if (execfd == -1 && !is_selinux_enabled ())
     {
       ptr = mmap (start, length, prot | PROT_EXEC, flags, fd, offset);
 
--- a/libffi/configure
+++ b/libffi/configure
@@ -1410,7 +1410,7 @@
   --disable-libtool-lock  avoid locking (might break parallel builds)
   --enable-maintainer-mode  enable make rules and dependencies not useful
                          (and sometimes confusing) to the casual installer
-  --enable-pax_emutramp       enable pax emulated trampolines, for we can't 
use PROT_EXEC
+  --enable-pax_emutramp       enable pax emulated trampolines (experimental)
   --enable-debug          debugging mode
   --disable-structs       omit code for struct support
   --disable-raw-api       make the raw api unavailable
@@ -15769,10 +15769,16 @@
     ;;
 esac
 
-# On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC.
+# On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC;
+# if EMUTRAMP is active too ffi could try mapping without PROT_EXEC,
+# but the kernel needs to recognize the trampoline generated by ffi.
+# Otherwise fallback to double mmap trick.
 # Check whether --enable-pax_emutramp was given.
 if test "${enable_pax_emutramp+set}" = set; then :
   enableval=$enable_pax_emutramp; if test "$enable_pax_emutramp" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: EMUTRAMP is experimental 
only.  Use --enable-pax_emutramp=experimental to enforce." >&5
+$as_echo "$as_me: WARNING: EMUTRAMP is experimental only.  Use 
--enable-pax_emutramp=experimental to enforce." >&2;}
+  elif test "$enable_pax_emutramp" = "experimental"; then
 
 $as_echo "#define FFI_MMAP_EXEC_EMUTRAMP_PAX 1" >>confdefs.h
 
++++++ gcc5-libffi-race-condition.patch ++++++
>From 48d2e46528fb6e621d95a7fa194069fd136b712d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20B=C3=BChler?= <bueh...@cert.uni-stuttgart.de>
Date: Wed, 7 Sep 2016 15:49:48 +0200
Subject: [PATCH 1/2] dlmmap_locked always needs locking as it always modifies
 execsize

---
 src/closures.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

--- a/libffi/src/closures.c
+++ b/libffi/src/closures.c
@@ -568,16 +568,11 @@
         MREMAP_DUP and prot at this point.  */
     }
 
-  if (execsize == 0 || execfd == -1)
-    {
-      pthread_mutex_lock (&open_temp_exec_file_mutex);
-      ptr = dlmmap_locked (start, length, prot, flags, offset);
-      pthread_mutex_unlock (&open_temp_exec_file_mutex);
+  pthread_mutex_lock (&open_temp_exec_file_mutex);
+  ptr = dlmmap_locked (start, length, prot, flags, offset);
+  pthread_mutex_unlock (&open_temp_exec_file_mutex);
 
-      return ptr;
-    }
-
-  return dlmmap_locked (start, length, prot, flags, offset);
+  return ptr;
 }
 
 /* Release memory at the given address, as well as the corresponding

Reply via email to