diff options
author | christos <christos@pkgsrc.org> | 2011-10-14 00:17:44 +0000 |
---|---|---|
committer | christos <christos@pkgsrc.org> | 2011-10-14 00:17:44 +0000 |
commit | 1b34f0143624e7f7707309f0a8160ef302ef347e (patch) | |
tree | a9523206a4e615f40f13c45e4d6da6d7cfb2f7d8 | |
parent | 0c44ebfdfcf34a6209b25e4e6cce7e3b7eaac1d9 (diff) | |
download | pkgsrc-1b34f0143624e7f7707309f0a8160ef302ef347e.tar.gz |
- use mmap instead of malloc.
- check the result of malloc in the place we were crashing.
-rw-r--r-- | lang/mono/Makefile | 4 | ||||
-rw-r--r-- | lang/mono/distinfo | 5 | ||||
-rw-r--r-- | lang/mono/patches/patch-da | 107 | ||||
-rw-r--r-- | lang/mono/patches/patch-do | 13 |
4 files changed, 121 insertions, 8 deletions
diff --git a/lang/mono/Makefile b/lang/mono/Makefile index 3d11994fb62..bb22d7517ae 100644 --- a/lang/mono/Makefile +++ b/lang/mono/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.118 2011/08/04 05:23:02 kefren Exp $ +# $NetBSD: Makefile,v 1.119 2011/10/14 00:17:44 christos Exp $ DISTNAME= mono-2.10.2 -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= lang MASTER_SITES= http://ftp.novell.com/pub/mono/sources/mono/ EXTRACT_SUFX= .tar.bz2 diff --git a/lang/mono/distinfo b/lang/mono/distinfo index da226feb40e..1abe75ee6ce 100644 --- a/lang/mono/distinfo +++ b/lang/mono/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.80 2011/08/04 05:23:02 kefren Exp $ +$NetBSD: distinfo,v 1.81 2011/10/14 00:17:44 christos Exp $ SHA1 (mono-2.10.2.tar.bz2) = 7b673255c6b17c5a41c15059e5f068d6a970d2ea RMD160 (mono-2.10.2.tar.bz2) = bac1ecb7e94c77341ae5f15f8d59141f9eb4aa38 @@ -28,7 +28,7 @@ SHA1 (patch-bg) = 7ac66455c304880e40bb915b8ba1f28ee57dd576 SHA1 (patch-bh) = a42432fd8ed92e2213fbcd24bf29c2b6d4cbd8ba SHA1 (patch-bi) = 91786c858b459cd6b5a0dc683b5bdefc412973c1 SHA1 (patch-cc) = 97b247ea353c6b0e08b96bdf0e6de74c5dcb60ef -SHA1 (patch-da) = 877ed8ec92ec25686c5a9a59db107f122d49035d +SHA1 (patch-da) = ec2299928595710331f1856450e46e1694b5c292 SHA1 (patch-db) = 1d735b2b25c113119637835f6bc54d8b37532941 SHA1 (patch-dc) = e139e349217b213eea53a17fcae44fda0bbfe636 SHA1 (patch-de) = d9867210a90389ff9ff5b9376b7091f923960973 @@ -41,3 +41,4 @@ SHA1 (patch-dk) = 7111c77894ff94264e668019d1010f659350f2cd SHA1 (patch-dl) = fc9cd48c070dbecad68cfe7d45eea59a3e6023d9 SHA1 (patch-dm) = bac9172f419630f817702e15dd3761cb4f60e0a0 SHA1 (patch-dn) = 9a55bd9c492b64ec9feadb45419b4bec37900b89 +SHA1 (patch-do) = 6ccd5598198fc04e638ec5bc5e03c92e16206c92 diff --git a/lang/mono/patches/patch-da b/lang/mono/patches/patch-da index 93c860f616f..d0a3c222e3c 100644 --- a/lang/mono/patches/patch-da +++ b/lang/mono/patches/patch-da @@ -1,8 +1,8 @@ -$NetBSD: patch-da,v 1.2 2009/04/28 10:31:58 hasso Exp $ +$NetBSD: patch-da,v 1.3 2011/10/14 00:17:45 christos Exp $ ---- libgc/include/private/gcconfig.h.orig 2009-03-03 14:22:28 -0800 -+++ libgc/include/private/gcconfig.h 2009-03-03 14:24:56 -0800 -@@ -351,6 +351,9 @@ +--- libgc/include/private/gcconfig.h.orig 2011-04-18 07:23:28.000000000 -0400 ++++ libgc/include/private/gcconfig.h 2011-10-13 20:10:24.000000000 -0400 +@@ -361,6 +361,9 @@ # define OPENBSD # define mach_type_known # endif @@ -12,3 +12,102 @@ $NetBSD: patch-da,v 1.2 2009/04/28 10:31:58 hasso Exp $ # if defined(FREEBSD) && (defined(i386) || defined(__i386__)) # define I386 # define mach_type_known +@@ -700,6 +703,10 @@ + # endif + # ifdef NETBSD + # define OS_TYPE "NETBSD" ++# ifndef USE_MMAP ++# define USE_MMAP ++# endif ++# define USE_MMAP_ANON + # define HEURISTIC2 + # ifdef __ELF__ + # define DATASTART GC_data_start +@@ -891,6 +898,10 @@ + # ifdef NETBSD + # define ALIGNMENT 4 + # define OS_TYPE "NETBSD" ++# ifndef USE_MMAP ++# define USE_MMAP ++# endif ++# define USE_MMAP_ANON + # define HEURISTIC2 + extern char etext[]; + # define DATASTART GC_data_start +@@ -1062,6 +1073,10 @@ + # endif + # ifdef NETBSD + # define OS_TYPE "NETBSD" ++# ifndef USE_MMAP ++# define USE_MMAP ++# endif ++# define USE_MMAP_ANON + # define HEURISTIC2 + # ifdef __ELF__ + # define DATASTART GC_data_start +@@ -1374,6 +1389,10 @@ + # endif + # ifdef NETBSD + # define OS_TYPE "NETBSD" ++# ifndef USE_MMAP ++# define USE_MMAP ++# endif ++# define USE_MMAP_ANON + # ifdef __ELF__ + # define DYNAMIC_LOADING + # endif +@@ -1534,6 +1553,10 @@ + # if defined(NETBSD) + # define ALIGNMENT 4 + # define OS_TYPE "NETBSD" ++# ifndef USE_MMAP ++# define USE_MMAP ++# endif ++# define USE_MMAP_ANON + # define HEURISTIC2 + # define USE_GENERIC_PUSH_REGS + # ifdef __ELF__ +@@ -1660,6 +1683,10 @@ + # endif + # ifdef NETBSD + # define OS_TYPE "NETBSD" ++# ifndef USE_MMAP ++# define USE_MMAP ++# endif ++# define USE_MMAP_ANON + # define HEURISTIC2 + # define DATASTART GC_data_start + # define ELFCLASS32 32 +@@ -1923,6 +1950,10 @@ + # define ALIGNMENT 4 + # ifdef NETBSD + # define OS_TYPE "NETBSD" ++# ifndef USE_MMAP ++# define USE_MMAP ++# endif ++# define USE_MMAP_ANON + # define HEURISTIC2 + # ifdef __ELF__ + # define DATASTART GC_data_start +@@ -2020,6 +2051,10 @@ + # endif + # ifdef NETBSD + # define OS_TYPE "NETBSD" ++# ifndef USE_MMAP ++# define USE_MMAP ++# endif ++# define USE_MMAP_ANON + # define HEURISTIC2 + # define DATASTART GC_data_start + # define USE_GENERIC_PUSH_REGS +@@ -2131,6 +2166,10 @@ + # endif + # ifdef NETBSD + # define OS_TYPE "NETBSD" ++# ifndef USE_MMAP ++# define USE_MMAP ++# endif ++# define USE_MMAP_ANON + # ifdef __ELF__ + # define DYNAMIC_LOADING + # endif diff --git a/lang/mono/patches/patch-do b/lang/mono/patches/patch-do new file mode 100644 index 00000000000..b6cae612f6a --- /dev/null +++ b/lang/mono/patches/patch-do @@ -0,0 +1,13 @@ +$NetBSD: patch-do,v 1.1 2011/10/14 00:17:45 christos Exp $ + +--- libgc/headers.c.orig 2011-10-13 20:12:06.000000000 -0400 ++++ libgc/headers.c 2011-10-13 20:11:50.000000000 -0400 +@@ -139,6 +139,8 @@ + register unsigned i; + + GC_all_nils = (bottom_index *)GC_scratch_alloc((word)sizeof(bottom_index)); ++ if (GC_all_nils == NULL) ++ ABORT("out of memory"); + BZERO(GC_all_nils, sizeof(bottom_index)); + for (i = 0; i < TOP_SZ; i++) { + GC_top_index[i] = GC_all_nils; |