pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/gprolog



Module Name:    pkgsrc
Committed By:   maya
Date:           Fri Jun 14 17:30:13 UTC 2019

Modified Files:
        pkgsrc/lang/gprolog: distinfo
Added Files:
        pkgsrc/lang/gprolog/patches: patch-src_EnginePl_dl__malloc.c

Log Message:
gprolog: avoid GCC optimizing calloc into an infinite loop.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/lang/gprolog/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/gprolog/patches/patch-src_EnginePl_dl__malloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/gprolog/distinfo
diff -u pkgsrc/lang/gprolog/distinfo:1.13 pkgsrc/lang/gprolog/distinfo:1.14
--- pkgsrc/lang/gprolog/distinfo:1.13   Tue Nov  3 22:50:36 2015
+++ pkgsrc/lang/gprolog/distinfo        Fri Jun 14 17:30:13 2019
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.13 2015/11/03 22:50:36 agc Exp $
+$NetBSD: distinfo,v 1.14 2019/06/14 17:30:13 maya Exp $
 
 SHA1 (gprolog-1.4.4.tar.gz) = 658b0efa5d916510dcddbbd980d90bc4d43a6e58
 RMD160 (gprolog-1.4.4.tar.gz) = 081ad0e6a2edd47de63db79ab1dc65a0e0d341da
 SHA512 (gprolog-1.4.4.tar.gz) = b6227a06794d31162f2c790a025f7372a6676c1891a76e880d2152aeab6322d3341aeab85e11d9be6d97ff1c69801bee73fa3ea6b0659af61f55990a455dc212
 Size (gprolog-1.4.4.tar.gz) = 3538152 bytes
+SHA1 (patch-src_EnginePl_dl__malloc.c) = 6146a8af0a6d64eba8446fe21374b2cea7e39420

Added files:

Index: pkgsrc/lang/gprolog/patches/patch-src_EnginePl_dl__malloc.c
diff -u /dev/null pkgsrc/lang/gprolog/patches/patch-src_EnginePl_dl__malloc.c:1.1
--- /dev/null   Fri Jun 14 17:30:13 2019
+++ pkgsrc/lang/gprolog/patches/patch-src_EnginePl_dl__malloc.c Fri Jun 14 17:30:13 2019
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_EnginePl_dl__malloc.c,v 1.1 2019/06/14 17:30:13 maya Exp $
+
+(from editors/emacs20):
+Work around bug in gcc 5.x that makes calloc into a call to itself,
+resulting in an infinite loop.
+
+--- src/EnginePl/dl_malloc.c.orig      2013-04-15 07:24:10.000000000 +0000
++++ src/EnginePl/dl_malloc.c
+@@ -4773,6 +4773,10 @@ void* dlcalloc(size_t n_elements, size_t
+       req = MAX_SIZE_T; /* force downstream failure on overflow */
+   }
+   mem = dlmalloc(req);
++#ifdef __GNUC__
++/* Work around a gcc bug that converts calloc into a call to itself. */
++  __asm volatile("" : "+r" (mem));
++#endif
+   if (mem != 0 && calloc_must_clear(mem2chunk(mem)))
+     memset(mem, 0, req);
+   return mem;



Home | Main Index | Thread Index | Old Index