pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/gprolog gprolog: avoid GCC optimizing calloc into...
details: https://anonhg.NetBSD.org/pkgsrc/rev/653b157121fd
branches: trunk
changeset: 335180:653b157121fd
user: maya <maya%pkgsrc.org@localhost>
date: Fri Jun 14 17:30:13 2019 +0000
description:
gprolog: avoid GCC optimizing calloc into an infinite loop.
diffstat:
lang/gprolog/distinfo | 3 ++-
lang/gprolog/patches/patch-src_EnginePl_dl__malloc.c | 19 +++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletions(-)
diffs (35 lines):
diff -r da5df5c7f905 -r 653b157121fd lang/gprolog/distinfo
--- a/lang/gprolog/distinfo Fri Jun 14 17:22:21 2019 +0000
+++ b/lang/gprolog/distinfo Fri Jun 14 17:30:13 2019 +0000
@@ -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
diff -r da5df5c7f905 -r 653b157121fd lang/gprolog/patches/patch-src_EnginePl_dl__malloc.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gprolog/patches/patch-src_EnginePl_dl__malloc.c Fri Jun 14 17:30:13 2019 +0000
@@ -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