pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/x11/xorg-libs Fix crash with -current/amd64.
details: https://anonhg.NetBSD.org/pkgsrc/rev/cb72c9b7a46e
branches: trunk
changeset: 489447:cb72c9b7a46e
user: hira <hira%pkgsrc.org@localhost>
date: Mon Feb 21 16:45:40 2005 +0000
description:
Fix crash with -current/amd64.
- don't pass address hint to mmap() with 2.99.16 or later
- add __NetBSD__ to use mprotect()
diffstat:
x11/xorg-libs/distinfo | 9 +++++----
x11/xorg-libs/patches/patch-ac | 25 +++++++++++++++++++------
x11/xorg-libs/patches/patch-ar | 13 +++++++------
x11/xorg-libs/patches/patch-as | 16 ++++++++--------
x11/xorg-libs/patches/patch-ay | 40 ++++++++++++++++++++++++++++++++++++++++
5 files changed, 79 insertions(+), 24 deletions(-)
diffs (208 lines):
diff -r 8d729c0a3848 -r cb72c9b7a46e x11/xorg-libs/distinfo
--- a/x11/xorg-libs/distinfo Mon Feb 21 16:39:03 2005 +0000
+++ b/x11/xorg-libs/distinfo Mon Feb 21 16:45:40 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.10 2005/01/25 17:49:57 xtraeme Exp $
+$NetBSD: distinfo,v 1.11 2005/02/21 16:45:40 hira Exp $
SHA1 (X11R6.8.1-src1.tar.gz) = 027d16317e07d9df166c0176a1f28b2614f38cc9
Size (X11R6.8.1-src1.tar.gz) = 30562401 bytes
@@ -9,7 +9,7 @@
SHA1 (xorg-681-CAN-2004-0914.patch) = 56b8db629045942c84c13d48192a1e8722b330ca
Size (xorg-681-CAN-2004-0914.patch) = 55411 bytes
SHA1 (patch-aa) = 009b7a2679ae98ebd7071e4fa6169c3401273ca1
-SHA1 (patch-ac) = 1c12d9c5b976ac5c9b6667e0f3a98792eef433fc
+SHA1 (patch-ac) = 9ada5ad89af7f744a7951b0919a09f0b26d949e3
SHA1 (patch-ad) = 7843332769ee47bc8a52a9adb1047b1a637af71b
SHA1 (patch-ae) = a06752ee9f55e64a407fac6fbde3547fd096c71d
SHA1 (patch-ag) = 178d556fa11818420cd685308cf179ee5f6f7dac
@@ -22,10 +22,11 @@
SHA1 (patch-an) = 513f8746bb66c954decdd7f2ca00888175c72834
SHA1 (patch-ao) = 3350204fda261f03ba69e475420f90141974c6b0
SHA1 (patch-ap) = 4a69e2df26e850ee33c1f7e6acc45ac205a46cd5
-SHA1 (patch-ar) = 869fd564e55cbc50cb7d535bec52b78bbabf3295
-SHA1 (patch-as) = 278f358daeb3c9757ebc6fba0f5a1bbc7f6d1cc5
+SHA1 (patch-ar) = ba96209b55579f16c53f8a1c26337a3278d1808a
+SHA1 (patch-as) = 80112c0604470d7a113bd70595401481e454b8c9
SHA1 (patch-at) = bc375171b6f0a8141621009767b5457962967112
SHA1 (patch-au) = fd2bcdb1c37ce0cc748b0f5c2a12d226e4486d0d
SHA1 (patch-av) = 99e9764ca1afdfb5882d62e453ccaea7dfa7f182
SHA1 (patch-aw) = d305ea935ba10d443f9bfdcfc2c74bab5a03ba60
SHA1 (patch-ax) = 5a340661ded23816334b6af67068680a8de73cda
+SHA1 (patch-ay) = e83713c5e0c35c4935101df9432c6f125cdd1478
diff -r 8d729c0a3848 -r cb72c9b7a46e x11/xorg-libs/patches/patch-ac
--- a/x11/xorg-libs/patches/patch-ac Mon Feb 21 16:39:03 2005 +0000
+++ b/x11/xorg-libs/patches/patch-ac Mon Feb 21 16:45:40 2005 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ac,v 1.3 2004/12/20 14:45:25 xtraeme Exp $
+$NetBSD: patch-ac,v 1.4 2005/02/21 16:45:40 hira Exp $
---- config/cf/NetBSD.cf.in.orig 2004-08-15 02:03:36.000000000 +0200
-+++ config/cf/NetBSD.cf.in 2004-12-20 15:33:15.000000000 +0100
+--- config/cf/NetBSD.cf.in.orig 2004-08-15 09:03:36.000000000 +0900
++++ config/cf/NetBSD.cf.in 2005-02-21 11:23:09.000000000 +0900
@@ -123,7 +123,7 @@
# define ThreadedX YES
# define HasThreadSafeAPI YES
@@ -80,7 +80,7 @@
# else
# define ServerExtraSysLibs /**/
# endif
-@@ -280,6 +280,11 @@
+@@ -280,10 +280,24 @@
# ifndef XFree86ConsoleDefines
# define XFree86ConsoleDefines -DWSCONS_SUPPORT
# endif
@@ -92,7 +92,20 @@
#else
# define ServerExtraDefines GccGasOption
#endif
-@@ -400,6 +405,10 @@
+
++
++#if defined(AMD64Architecture) && \
++ ((OSMajorVersion > 2) || \
++ (OSMajorVersion == 2 && OSMinorVersion == 99 && OSTeenyVersion >= 16))
++#ifndef PassHintToMMAP
++#define PassHintToMMAP
++#endif
++#endif
++
+ #define StandardDefines -DCSRG_BASED
+ /* Citrus mb locale were added in 1.5P */
+ #if ((OSMajorVersion > 1) || \
+@@ -400,6 +414,10 @@
# endif /* MTRRBuiltin */
#endif /* i386Architecture */
@@ -103,7 +116,7 @@
/*
* agpgart support (NetBSD 1.5Y and up)
*/
-@@ -588,7 +597,7 @@
+@@ -588,7 +606,7 @@
# define BuildXInputLib YES
#endif
diff -r 8d729c0a3848 -r cb72c9b7a46e x11/xorg-libs/patches/patch-ar
--- a/x11/xorg-libs/patches/patch-ar Mon Feb 21 16:39:03 2005 +0000
+++ b/x11/xorg-libs/patches/patch-ar Mon Feb 21 16:45:40 2005 +0000
@@ -1,13 +1,14 @@
-$NetBSD: patch-ar,v 1.1 2004/11/15 11:15:48 hira Exp $
+$NetBSD: patch-ar,v 1.2 2005/02/21 16:45:40 hira Exp $
---- programs/Xserver/hw/xfree86/loader/Imakefile.orig 2004-11-03 17:25:44.000000000 +0900
-+++ programs/Xserver/hw/xfree86/loader/Imakefile 2004-11-03 17:25:49.000000000 +0900
-@@ -40,6 +40,10 @@
+--- programs/Xserver/hw/xfree86/loader/Imakefile.orig 2004-08-13 12:39:57.000000000 +0900
++++ programs/Xserver/hw/xfree86/loader/Imakefile 2005-02-21 10:38:49.000000000 +0900
+@@ -40,6 +40,11 @@
ARCHDEFINES = -DDoMMAPedMerge -DMmapPageAlign
#endif
-+#if defined(NetBSDArchitecture) && defined(AMD64Architecture)
-+ARCHDEFINES = -DUseMMAP
++#if defined(NetBSDArchitecture) && defined(AMD64Architecture) && \
++ defined(PassHintToMMAP)
++ARCHDEFINES = -DUseMMAP -DPassHintToMMAP
+#endif
+
DEFINES = $(DBMALLOCDEFINE) $(DLOPENDEFINES) $(OS_DEFINES) $(COMPAT_DEFINES) \
diff -r 8d729c0a3848 -r cb72c9b7a46e x11/xorg-libs/patches/patch-as
--- a/x11/xorg-libs/patches/patch-as Mon Feb 21 16:39:03 2005 +0000
+++ b/x11/xorg-libs/patches/patch-as Mon Feb 21 16:45:40 2005 +0000
@@ -1,12 +1,12 @@
-$NetBSD: patch-as,v 1.1 2004/11/15 11:15:48 hira Exp $
+$NetBSD: patch-as,v 1.2 2005/02/21 16:45:40 hira Exp $
---- programs/Xserver/hw/xfree86/loader/loader.c.orig 2004-11-03 17:26:20.000000000 +0900
-+++ programs/Xserver/hw/xfree86/loader/loader.c 2004-11-03 17:29:53.000000000 +0900
+--- programs/Xserver/hw/xfree86/loader/loader.c.orig 2004-08-30 06:06:00.000000000 +0900
++++ programs/Xserver/hw/xfree86/loader/loader.c 2005-02-21 10:39:41.000000000 +0900
@@ -472,6 +472,13 @@
#ifdef UseMMAP
unsigned long ret;
-+# if defined(__NetBSD__) && defined(__amd64__)
++# if defined(__NetBSD__) && defined(__amd64__) && defined(PassHintToMMAP)
+# define LOADER_MMAP_AREA_SIZE (256*1024*1024)
+# define LOADER_MMAP_AREA_START ((2U*1024*1024*1024) - LOADER_MMAP_AREA_SIZE)
+ static char *mm_addr = (char *)LOADER_MMAP_AREA_START;
@@ -21,14 +21,14 @@
new_size += pagesize;
ret = (unsigned long)mmap(0, new_size, MMAP_PROT, MAP_PRIVATE
-# ifdef __amd64__
-+# if defined(__amd64__) && !defined(__NetBSD__)
++# if defined(__amd64__) && !defined(PassHintToMMAP)
| MAP_32BIT
# endif
, fd, new_off);
if (ret == -1)
FatalError("mmap() failed: %s\n", strerror(errno));
+
-+# if defined(__amd64__) && defined(__NetBSD__)
++# if defined(__amd64__) && defined(__NetBSD__) && defined(PassHintToMMAP)
+ mm_addr += new_size:
+# endif
+
@@ -36,14 +36,14 @@
# else
ret = (unsigned long)mmap(0, size, MMAP_PROT, MAP_PRIVATE
-# ifdef __amd64__
-+# if defined(__amd64__) && !defined(__NetBSD__)
++# if defined(__amd64__) && !defined(PassHintToMMAP)
| MAP_32BIT
# endif
, fd, offset + offsetbias);
if (ret == -1)
FatalError("mmap() failed: %s\n", strerror(errno));
+
-+# if defined(__amd64__) && defined(__NetBSD__)
++# if defined(__amd64__) && defined(__NetBSD__) && defined(PassHintToMMAP)
+ mm_addr += (size + 4095) & ~4095;
+# endif
+
diff -r 8d729c0a3848 -r cb72c9b7a46e x11/xorg-libs/patches/patch-ay
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/xorg-libs/patches/patch-ay Mon Feb 21 16:45:40 2005 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-ay,v 1.1 2005/02/21 16:45:40 hira Exp $
+
+--- programs/Xserver/hw/xfree86/loader/elfloader.c.orig 2005-02-20 23:45:37.000000000 +0900
++++ programs/Xserver/hw/xfree86/loader/elfloader.c 2005-02-20 23:45:46.000000000 +0900
+@@ -922,7 +922,7 @@
+ ErrorF("ELFCreateGOT() Unable to reallocate memory!!!!\n");
+ return FALSE;
+ }
+-# if defined(linux) || defined(__OpenBSD__)
++# if defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__)
+ {
+ unsigned long page_size = getpagesize();
+ unsigned long round;
+@@ -1097,7 +1097,7 @@
+ ErrorF("ELFCreatePLT() Unable to allocate memory!!!!\n");
+ return;
+ }
+-# if defined(linux) || defined(__OpenBSD__)
++# if defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__)
+ {
+ unsigned long page_size = getpagesize();
+ unsigned long round;
+@@ -2775,7 +2775,7 @@
+ elffile->lsection[j].size = SecSize(i);
+ elffile->lsection[j].flags = flags;
+ switch (SecType(i)) {
+-#if defined(linux) || defined(__OpenBSD__)
++#if defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__)
+ case SHT_PROGBITS:
+ {
+ unsigned long page_size = getpagesize();
+@@ -2979,7 +2979,7 @@
+ ErrorF("Unable to allocate ELF sections\n");
+ return NULL;
+ }
+-# if defined(linux) || defined(__OpenBSD__)
++# if defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__)
+ {
+ unsigned long page_size = getpagesize();
+ unsigned long round;
Home |
Main Index |
Thread Index |
Old Index