Bug 7364

Summary: 'RenderBadGlyphSet (invalid GlyphSet parameter)' error on PPC64 with gtk applications
Product: xorg Reporter: o590694
Component: Server/GeneralAssignee: Eric Anholt <eric>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: major    
Priority: high CC: arvind.umrao, chainsaw, eric, matthieu.herrb
Version: 7.1 (2006.05)   
Hardware: Other   
OS: Linux (All)   
URL: http://bugs.gentoo.org/show_bug.cgi?id=112355
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 8888    

Description o590694 2006-06-29 09:02:07 UTC
Hello,

on PPC64 (most?) gtk applications crash on startup with the following error 
(for example the news reader pan):

The program 'pan' received an X Window System error. 
This probably reflects a bug in the program. 
The error was 'RenderBadGlyphSet (invalid GlyphSet parameter)'. 
  (Details: serial 2041 error_code 182 request_code 154 minor_code 23) 
  (Note to programmers: normally, X errors are reported asynchronously; 
   that is, you will receive the error a while after causing it. 
   To debug your program, run it with the --sync command line 
   option to change this behavior. You can then get a meaningful 
   backtrace from your debugger if you break on the gdk_x_error() function.) 


this would be a workaround:

##############################################################################
diff -Nur xorg-server-1.1.0.orig/render/render.c 
xorg-server-1.1.0/render/render.c
--- xorg-server-1.1.0.orig/render/render.c	2005-08-29 04:47:39.000000000 
+0900
+++ xorg-server-1.1.0/render/render.c	2006-04-29 18:11:54.596137060 +0900
@@ -1340,7 +1340,7 @@
 	{
 	    if (buffer + sizeof (GlyphSet) < end)
 	    {
-                memcpy(&gs, buffer, sizeof(GlyphSet));
+                gs = *(CARD32 *) buffer;
 		glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client,
 								 gs,
 								 GlyphSetType,
##############################################################################

[quote from http://bugs.gentoo.org/show_bug.cgi?id=112355 comment #14]
Michel Dänzer pointed out that 'typedef unsigned long GlyphSet' isn't the same
size on 32/64 bit architectures, so either the Render protocol or server code
isn't 32/64 clean.
[\quote]


This only happens with gtk applications. I've never seen this with an qt 
application or something else.
Comment 1 Markus Lude 2006-08-22 12:05:12 UTC
same problem with openbsd 3.9 on sparc64, the workaround worked for me so far.
Comment 2 Matthieu Herrb 2006-08-26 10:04:10 UTC
This matches Michael Lorenz analysis in bug #3794.
 
Comment 3 o590694 2007-02-20 00:42:37 UTC
running xorg 7.2.0 and this is still a problem.
Comment 4 Daniel Stone 2007-02-27 01:32:43 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 5 Keith Packard 2007-08-31 14:09:22 UTC
All protocol XID types should derive from CARD32 in the server; where that isn't happening, it needs to be fixed.
Comment 6 Eric Anholt 2007-08-31 15:16:30 UTC
fixed in renderproto-0.9.3 and server master.  Leaving open for merge of dependency to server-1.4-branch.
Comment 7 Julien Cristau 2010-01-15 10:41:08 UTC
*** Bug 26056 has been marked as a duplicate of this bug. ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.