16395936 x11perf exits with BadWindow error on Solaris 11 TX s12_39
authorNiveditha Rau <Niveditha.Rau@Oracle.COM>
Thu, 02 Jan 2014 10:16:23 -0800
changeset 1428 08d73e56964f
parent 1427 efaf0868998f
child 1429 78381bca7f32
16395936 x11perf exits with BadWindow error on Solaris 11 TX 17950657 vnc crashes if compression level is set to levels 1-4 17951414 update to the latest stable 1.14.5 xorg version 17295023 compiz doesn't work with s12_28 on intel graphics 17951734 increase MAX_CLIENT to 256 - the X part of the bug fix for 16794838 16398494 fail to get a session after enabling Xinerama on TX_SPARC Solaris 11.1
open-src/common/Makefile.init
open-src/lib/mesa/Makefile
open-src/lib/mesa/mapfile.externs
open-src/lib/mesa/mesa9-port.patch
open-src/xserver/xorg/Makefile
open-src/xserver/xorg/glx-mesa.patch
open-src/xserver/xorg/patch-list
open-src/xserver/xorg/sun-src/tsol/tsolinfo.h
open-src/xserver/xorg/sun-src/tsol/tsolpolicy.c
open-src/xserver/xvnc/17950657.patch
open-src/xserver/xvnc/Makefile
--- a/open-src/common/Makefile.init	Mon Dec 23 17:31:54 2013 -0800
+++ b/open-src/common/Makefile.init	Thu Jan 02 10:16:23 2014 -0800
@@ -388,7 +388,7 @@
 # referenced in multiple places, so it's kept here for easy sharing.
 # 
 # Current Xorg server source tarball to use sources from:
-XORGSERVER_VERS=1.14.4
+XORGSERVER_VERS=1.14.5
 # Minimum Xorg server version that we expect to be ABI compatible with.
 # Usually .99 of the previous minor release series, as that's the convention
 # for the development snapshots of the next release series.
--- a/open-src/lib/mesa/Makefile	Mon Dec 23 17:31:54 2013 -0800
+++ b/open-src/lib/mesa/Makefile	Thu Jan 02 10:16:23 2014 -0800
@@ -102,6 +102,8 @@
 MODULE_LDFLAGS= -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
 		-R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
 
+MODULE_LD_OPTIONS += -M $(PWD)/mapfile.externs
+
 # Merge in additional sources from sun-src directory
 ADDITIONAL_SOURCE_DIR=sun-src
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/mesa/mapfile.externs	Thu Jan 02 10:16:23 2014 -0800
@@ -0,0 +1,16 @@
+# Functions which are allowed to be unresolved when building libdricore
+
+{
+  global:
+	_glapi_add_dispatch     	= FUNCTION extern;
+	_glapi_get_dispatch            	= FUNCTION extern; 
+	_glapi_get_context         	= FUNCTION extern;     
+	_glapi_set_context              = FUNCTION extern; 
+	_glapi_Dispatch                 = DATA extern;
+	_glapi_set_dispatch             = FUNCTION extern;
+	_glapi_Context                  = DATA extern;
+	_glapi_get_dispatch_table_size 	= FUNCTION extern;
+	_glthread_GetID		 	= FUNCTION extern;
+	_glapi_check_multithread	= FUNCTION extern;
+};
+
--- a/open-src/lib/mesa/mesa9-port.patch	Mon Dec 23 17:31:54 2013 -0800
+++ b/open-src/lib/mesa/mesa9-port.patch	Thu Jan 02 10:16:23 2014 -0800
@@ -1,132 +1,3 @@
---- src/mesa/drivers/dri/intel/intel_screen.c   Mon Mar 25 09:22:16 2013
-+++ src/mesa/drivers/dri/intel/intel_screen.c   Mon Mar 25 10:14:00 2013
-@@ -36,6 +36,7 @@
- #include "main/mfeatures.h"
- #include "main/version.h"
- #include "swrast/s_renderbuffer.h"
-+#include "../../../../../include/GL/internal/dri_interface.h"
-
- #include "utils.h"
- #include "xmlpool.h"
---- src/mesa/drivers/dri/i965/brw_context.c     Mon Mar 25 10:57:00 2013
-+++ src/mesa/drivers/dri/i965/brw_context.c     Mon Mar 25 10:58:40 2013
-@@ -395,8 +395,10 @@
-    if ((flags & __DRI_CTX_FLAG_FORWARD_COMPATIBLE) != 0)
-       ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT;
-
-+#ifdef GL_VERSION_4_3
-    if ((flags & __DRI_CTX_FLAG_DEBUG) != 0)
-       ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT;
-+#endif
-
-    return true;
- }
---- src/glx/dri2_glx.c  Thu Feb 21 06:25:41 2013
-+++ src/glx/dri2_glx.c  Mon Mar 25 13:48:18 2013
-@@ -54,6 +54,11 @@
- #define DRI_CONF_VBLANK_DEF_INTERVAL_1 2
- #define DRI_CONF_VBLANK_ALWAYS_SYNC 3
-
-+#define __DRI_CTX_RESET_NO_NOTIFICATION         0
-+#define __DRI_CTX_ATTRIB_RESET_STRATEGY         3
-+#define __DRI2_ROBUSTNESS "DRI_Robustness"
-+
-+
- #undef DRI2_MINOR
- #define DRI2_MINOR 1
-
---- src/glx/dri_common.c        Thu Feb 21 01:25:29 2013
-+++ src/glx/dri_common.c        Mon Mar 25 13:45:06 2013
-@@ -48,6 +48,11 @@
- #define RTLD_GLOBAL 0
- #endif
-
-+#define __DRI_CTX_RESET_NO_NOTIFICATION         0
-+#define __DRI_CTX_RESET_LOSE_CONTEXT            1
-+#define __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS     0x00000004
-+
-+
- /**
-  * Print informational message to stderr if LIBGL_DEBUG is set to
-  * "verbose".
---- src/glx/drisw_glx.c Thu Feb 21 01:25:29 2013
-+++ src/glx/drisw_glx.c Mon Mar 25 13:40:31 2013
-@@ -28,6 +28,9 @@
- #include <dlfcn.h>
- #include "dri_common.h"
-
-+#define __DRI_CTX_RESET_NO_NOTIFICATION         0
-+
-+
- struct drisw_display
- {
-    __GLXDRIdisplay base;
-
---- src/mesa/drivers/dri/i915/Makefile.am	Tue Jun 18 13:26:19 2013
-+++ src/mesa/drivers/dri/i915/Makefile.am	Tue Jun 18 13:26:34 2013
-@@ -53,6 +53,7 @@
- i915_dri_la_LDFLAGS = -module -avoid-version -shared
- i915_dri_la_LIBADD = \
- 	../common/libdricommon.la \
-+	../../../../mapi/shared-glapi/libglapi.la \
- 	$(DRI_LIB_DEPS) \
- 	$(INTEL_LIBS)
- 
---- src/mesa/drivers/dri/radeon/Makefile.am	Tue Jun 18 13:27:05 2013
-+++ src/mesa/drivers/dri/radeon/Makefile.am	Tue Jun 18 13:27:22 2013
-@@ -51,6 +51,7 @@
- radeon_dri_la_LDFLAGS = -module -avoid-version -shared
- radeon_dri_la_LIBADD = \
- 	../common/libdricommon.la \
-+	../../../../mapi/shared-glapi/libglapi.la \
- 	$(DRI_LIB_DEPS) \
- 	$(RADEON_LIBS)
- 
---- src/mesa/drivers/dri/swrast/Makefile.am	Tue Jun 18 13:27:34 2013
-+++ src/mesa/drivers/dri/swrast/Makefile.am	Tue Jun 18 13:27:52 2013
-@@ -48,6 +48,7 @@
- 
- swrast_dri_la_LDFLAGS = -module -avoid-version -shared
- swrast_dri_la_LIBADD = \
-+	../../../../mapi/shared-glapi/libglapi.la \ 
- 	$(DRI_LIB_DEPS)
- 
- # Provide compatibility with scripts for the old Mesa build system for
---- src/mesa/drivers/dri/r200/Makefile.am	Tue Jun 18 13:27:56 2013
-+++ src/mesa/drivers/dri/r200/Makefile.am	Tue Jun 18 13:28:03 2013
-@@ -51,6 +51,7 @@
- r200_dri_la_LDFLAGS = -module -avoid-version -shared
- r200_dri_la_LIBADD = \
- 	../common/libdricommon.la \
-+	../../../../mapi/shared-glapi/libglapi.la \
- 	$(DRI_LIB_DEPS) \
- 	$(RADEON_LIBS)
-
---- src/mesa/drivers/dri/i965/Makefile.am	Tue Jun 18 13:45:59 2013
-+++ src/mesa/drivers/dri/i965/Makefile.am	Tue Jun 18 13:39:37 2013
-@@ -54,6 +54,7 @@
- i965_dri_la_LDFLAGS = -module -avoid-version -shared
- i965_dri_la_LIBADD = \
- 	../common/libdricommon.la \
-+	../../../../mapi/shared-glapi/libglapi.la \
- 	$(DRI_LIB_DEPS) \
- 	$(INTEL_LIBS)
-
-diff -rupN Mesa-9.0.3.ori/src/mesa/libdricore/Makefile.am Mesa-9.0.3/src/mesa/libdricore/Makefile.am
---- src/mesa/libdricore/Makefile.am	2013-03-21 23:26:42.497508661 +0800
-+++ src/mesa/libdricore/Makefile.am	2013-03-22 00:23:31.688844257 +0800
-@@ -45,8 +45,9 @@ libdricore@VERSION@_la_SOURCES = \
- 	$(LIBGLSL_CXX_FILES) \
- 	$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
- 	$(top_builddir)/src/glsl/builtin_function.cpp
--libdricore@VERSION@_la_LDFLAGS = -version-number 1:0
--libdricore@VERSION@_la_LIBADD = libdricore-asm.la
-+libdricore@VERSION@_la_LDFLAGS = ../../mapi/shared-glapi/libglapi.la -version-number 1:0
-+#libdricore@VERSION@_la_LIBADD = libdricore-asm.la
-+libdricore@VERSION@_la_LIBADD = 
- 
- # This is separated from libdricore to avoid conflics in object
- # outputs between main/clip.c and sparc/clip.c.  The documented way to
 --- configure.ac Thu Aug  1 09:21:32 2013
 +++ configure.ac Mon Aug 12 15:50:47 2013
 @@ -1064,7 +1064,7 @@
@@ -139,3 +10,15 @@
      cygwin*)
          DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
 
+--- src/mesa/libdricore/Makefile.am	Fri Dec  6 13:14:32 2013
++++ src/mesa/libdricore/Makefile.am	Fri Dec  6 13:16:01 2013
+@@ -46,7 +46,7 @@
+ 	$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
+ 	$(top_builddir)/src/glsl/builtin_function.cpp
+ libdricore@VERSION@_la_LDFLAGS = -version-number 1:0
+-libdricore@VERSION@_la_LIBADD = libdricore-asm.la
++#libdricore@VERSION@_la_LIBADD =
+ 
+ # This is separated from libdricore to avoid conflics in object
+ # outputs between main/clip.c and sparc/clip.c.  The documented way to
+
--- a/open-src/xserver/xorg/Makefile	Mon Dec 23 17:31:54 2013 -0800
+++ b/open-src/xserver/xorg/Makefile	Thu Jan 02 10:16:23 2014 -0800
@@ -35,9 +35,9 @@
 MODULE_VERSION=$(XORGSERVER_VERS)
 
 # Checksums for upstream tarball
-TARBALL_MD5   = 9d68a30258c67faa3c036a4a85e8bf97
-TARBALL_SHA1  = 5ee112b52f0cec043aa68bd909457b2ea2a11380
-TARBALL_SHA256= 608ccfaafb845f6e559884a30f946d365209172416710d687b190e9e1ff65dc3
+TARBALL_MD5   = 89a9e2cbcf2be3bfe3da96f19100c978
+TARBALL_SHA1  = 3891522665195ac722403e34840ec94b0b5cc5bc
+TARBALL_SHA256= 8d0f06bf1416487a5170318477088826a8d737d4a201e996b2dc1ecff47461d1
 
 # Patches to apply to source after unpacking, in order
 # *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
@@ -147,6 +147,9 @@
 MODULE_BUILD_ENV = XORG_EXTERNS_FLAG='$(XORG_EXTERNS_FLAG)'
 MODULE_LD_SHARED_OPTIONS += -M $(PWD)/$(XORG_EXTERNS_FILE)
 
+# Disable direct binding in shared objects, since it breaks libglx.so
+MODULE_BUILD_ENV += LD_SHARED_UNSET="-B direct"
+
 # Optimization doesn't always remove unused inline functions, leaving many 
 # binaries referencing pixman symbols that normally don't need them.  The
 # $(ZDISCARD_UNUSED_DEP) in LD_OPTIONS should avoid adding it when
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/xserver/xorg/glx-mesa.patch	Thu Jan 02 10:16:23 2014 -0800
@@ -0,0 +1,37 @@
+# Remove this patch once Mesa is updated to the latest release
+--- a/glx/glxdricommon.c	Fri Dec 13 16:15:57 2013
++++ b/glx/glxdricommon.c	Fri Dec 13 16:22:22 2013
+@@ -209,6 +209,7 @@
+ 
+ static const char dri_driver_path[] = DRI_DRIVER_PATH;
+ 
++#if 0
+ /* Temporary define to allow building without a dri_interface.h from
+  * updated Mesa.  Some day when we don't care about Mesa that old any
+  * more this can be removed.
+@@ -216,6 +217,7 @@
+ #ifndef __DRI_DRIVER_GET_EXTENSIONS
+ #define __DRI_DRIVER_GET_EXTENSIONS "__driDriverGetExtensions"
+ #endif
++#endif
+ 
+ void *
+ glxProbeDriver(const char *driverName,
+@@ -238,6 +240,7 @@
+         goto cleanup_failure;
+     }
+ 
++#if 0
+     if (asprintf(&get_extensions_name, "%s_%s",
+                  __DRI_DRIVER_GET_EXTENSIONS, driverName) != -1) {
+         const __DRIextension **(*get_extensions)(void);
+@@ -249,7 +252,8 @@
+     }
+ 
+     if (!extensions)
+-        extensions = dlsym(driver, __DRI_DRIVER_EXTENSIONS);
++#endif
++    extensions = dlsym(driver, __DRI_DRIVER_EXTENSIONS);
+     if (extensions == NULL) {
+         LogMessage(X_ERROR, "AIGLX error: %s exports no extensions (%s)\n",
+                    driverName, dlerror());
--- a/open-src/xserver/xorg/patch-list	Mon Dec 23 17:31:54 2013 -0800
+++ b/open-src/xserver/xorg/patch-list	Thu Jan 02 10:16:23 2014 -0800
@@ -31,3 +31,4 @@
 add-input-dev-in-multi-session.patch,-p1
 create-multi-session-built-in-config.patch,-p1
 17465391.patch,-p1
+glx-mesa.patch,-p1
--- a/open-src/xserver/xorg/sun-src/tsol/tsolinfo.h	Mon Dec 23 17:31:54 2013 -0800
+++ b/open-src/xserver/xorg/sun-src/tsol/tsolinfo.h	Thu Jan 02 10:16:23 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -91,8 +91,8 @@
 #define XAUDIT_OFFSET     9102
 #define XAUDIT_EXTENSION  128
 
-#define MAX_CLIENT        16
-#define MAX_SLS           16            /* used in atom */
+#define MAX_CLIENT        256
+#define MAX_SLS           256           /* used in atom */
 #define MAX_POLYPROPS     128           /* used in property */
 #define DEF_UID           (uid_t)0      /* uid used for default objects */
 #define INVALID_UID       (uid_t)0xFFFF /* invalid uid */
@@ -291,7 +291,7 @@
 }
 
 
-#define NODE_SLSIZE	16	/* increase sl array by this amount */
+#define NODE_SLSIZE	256	/* increase sl array by this amount */
 typedef struct _TsolNodeRec {
 	unsigned int flags;
 	int slcount; 		/* no. of SLs referenced */
--- a/open-src/xserver/xorg/sun-src/tsol/tsolpolicy.c	Mon Dec 23 17:31:54 2013 -0800
+++ b/open-src/xserver/xorg/sun-src/tsol/tsolpolicy.c	Thu Jan 02 10:16:23 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -342,6 +342,13 @@
 		break;
 	}
 
+	/* Ignore unlabeled resources */
+	if (tsolres->sl == NULL) {
+		tsolres->sl= tsolinfo->sl;
+		tsolres->uid = tsolinfo->uid;
+		tsolres->pid = tsolinfo->pid;
+	}
+
 	switch (reqtype) {
 	case X_GetImage:
 	case X_CopyArea:
@@ -372,6 +379,7 @@
 	case X_UngrabKey:
 	case X_GrabButton:
 	case X_UngrabButton:
+	case X_WarpPointer:
 		/*
 		 * Allow pointer grab on root window, as long as
 		 * pointer is currently in a window owned by
@@ -771,7 +779,8 @@
 
 	/* change/set access requires privilege */
 	modes = (DixFreezeAccess | DixGrabAccess | DixManageAccess |
-		 DixSetAttrAccess | DixSetFocusAccess | DixForceAccess);
+		 DixSetAttrAccess | DixSetFocusAccess | DixForceAccess |
+		 DixWriteAccess);
 	if (check_mode & modes) {
 		if (priv_win_devices ||
 		    client_has_privilege(tsolinfo, pset_win_devices))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/xserver/xvnc/17950657.patch	Thu Jan 02 10:16:23 2014 -0800
@@ -0,0 +1,80 @@
+--- a/common/rdr/ZlibOutStream.h	Thu Dec 12 14:31:34 2013
++++ b/common/rdr/ZlibOutStream.h	Thu Dec 12 14:31:41 2013
+@@ -46,7 +46,6 @@
+   private:
+ 
+     int overrun(int itemSize, int nItems);
+-    void checkCompressionLevel();
+ 
+     OutStream* underlying;
+     int compressionLevel;
+--- a/common/rdr//ZlibOutStream.cxx	Thu Dec 12 14:28:19 2013
++++ b/common/rdr/ZlibOutStream.cxx	Thu Dec 12 14:31:28 2013
+@@ -68,6 +68,11 @@
+     level = -1;                 // Z_DEFAULT_COMPRESSION
+ 
+   newLevel = level;
++  if (newLevel != compressionLevel) {
++    if (deflateParams (zs, newLevel, Z_DEFAULT_STRATEGY) != Z_OK)
++      throw Exception("ZlibOutStream: deflateParams failed");
++    compressionLevel = newLevel;
++  }
+ }
+ 
+ int ZlibOutStream::length()
+@@ -94,11 +99,9 @@
+ 
+ //        fprintf(stderr,"zos flush: calling deflate, avail_in %d, avail_out %d\n",
+ //                zs->avail_in,zs->avail_out);
+-      checkCompressionLevel();
+-      if (zs->avail_in != 0) {
+-        int rc = deflate(zs, Z_SYNC_FLUSH);
+-        if (rc != Z_OK) throw Exception("ZlibOutStream: deflate failed");
+-      }
++      int rc = deflate(zs, Z_SYNC_FLUSH);
++      if (rc != Z_OK)
++        throw Exception("ZlibOutStream: deflate failed");
+ 
+ //        fprintf(stderr,"zos flush: after deflate: %d bytes\n",
+ //                zs->next_out-underlying->getptr());
+@@ -133,11 +136,9 @@
+ //        fprintf(stderr,"zos overrun: calling deflate, avail_in %d, avail_out %d\n",
+ //                zs->avail_in,zs->avail_out);
+ 
+-      checkCompressionLevel();
+-      if (zs->avail_in != 0) {
+-        int rc = deflate(zs, 0);
+-        if (rc != Z_OK) throw Exception("ZlibOutStream: deflate failed");
+-      }
++      int rc = deflate(zs, Z_SYNC_FLUSH);
++      if (rc != Z_OK)
++        throw Exception("ZlibOutStream: deflate failed");
+ 
+ //        fprintf(stderr,"zos overrun: after deflate: %d bytes\n",
+ //                zs->next_out-underlying->getptr());
+@@ -164,25 +165,4 @@
+     nItems = (end - ptr) / itemSize;
+ 
+   return nItems;
+-}
+-
+-void ZlibOutStream::checkCompressionLevel()
+-{
+-  if (newLevel != compressionLevel) {
+-
+-    // This is a horrible hack, but after many hours of trying, I couldn't find
+-    // a better way to make this class work properly with both Zlib 1.2.3 and
+-    // 1.2.5.  1.2.3 does a Z_PARTIAL_FLUSH in the body of deflateParams() if
+-    // the compression level has changed, and 1.2.5 does a Z_BLOCK flush.
+-
+-    if (newBehavior) {
+-      int rc = deflate(zs, Z_SYNC_FLUSH);
+-      if (rc != Z_OK) throw Exception("ZlibOutStream: deflate failed");
+-    }
+-
+-    if (deflateParams (zs, newLevel, Z_DEFAULT_STRATEGY) != Z_OK) {
+-      throw Exception("ZlibOutStream: deflateParams failed");
+-    }
+-    compressionLevel = newLevel;
+-  }
+ }
--- a/open-src/xserver/xvnc/Makefile	Mon Dec 23 17:31:54 2013 -0800
+++ b/open-src/xserver/xvnc/Makefile	Thu Jan 02 10:16:23 2014 -0800
@@ -78,6 +78,7 @@
 SOURCE_PATCHES += vnc-nohttpd.patch,-p1
 SOURCE_PATCHES += solaris-port.patch,-p1
 SOURCE_PATCHES += solaris-audit.patch,-p1
+SOURCE_PATCHES += 17950657.patch,-p1
 
 # Need to regenerate autoconf/automake files after patching
 AUTORECONF=yes