Bug in xorg-xserver - missing declaration!

Dr.-Ing. Dieter Jurzitza dieter.jurzitza at t-online.de
Sun Feb 19 19:29:22 UTC 2017


Dear listmembers,
I found the problem and I think I fixed it. Please validate & give a feedback

OS: openSUSE Leap 42.2
Result: server crash

Due to the similarity of this problem and the one that had had been found (and 
fixed!) by Michel Dänzer I was capable to provide a fix that solves the issue 
(for me...)
Due to my limited capabilities with regard to C-Programming someone more 
experienced than I am ought to look over that (and probably improve!)

Please consider the following patch:

--- glamor/glamor_dash.c.original       2016-03-11 19:43:16.000000000 +0100
+++ glamor/glamor_dash.c        2017-02-19 20:00:11.883218927 +0100
@@ -32,6 +32,7 @@

 static const char dash_vs_exec[] =
     "       dash_offset = primitive.z / dash_length;\n"
+    "       vec2 pos = vec2(0,0);\n"
     GLAMOR_POS(gl_Position, primitive.xy);

 static const char dash_fs_vars[] =

Thank you for looking into this. The source filename is xorg-x11-
server-7.6_1.18.3-10.1.src.rpm

Take care,




Dieter Jurzitza

Am Freitag, 17. Februar 2017, 15:58:53 schrieb dieter.jurzitza at t-online.de:
> OS: openSUSE Leap 42.2
> Condition: start tgif with the file attached
> Result: server crash
> 
> 
> When tgif is started on my machine with the attached file, the X-server
> crashes badly, ending at the login - screen.
> 
> The logfile Xorg.log.old states:
> 
> 
> fred at djunix-office:~/x11-crash> cat errorlog2
> [ 10168.529] Failed to compile VS: 0:13(43): error: `pos' undeclared
> 0:13(14): error: operands to arithmetic operators must be numeric
> 0:13(13): error: operands to arithmetic operators must be numeric
> 
> [ 10168.529] Program source:
> #version 130
> attribute vec3 primitive;
> varying float dash_offset;
> uniform vec2 fill_offset;
> uniform vec2 fill_size_inv;
> varying vec2 fill_pos;
> uniform float dash_length;
> uniform vec4 v_matrix;
> void main() {
>        dash_offset = primitive.z / dash_length;
>        gl_Position.xy = primitive.xy.xy * v_matrix.xz + v_matrix.yw;
>        gl_Position.zw = vec2(0.0,1.0);
>        fill_pos = (fill_offset + primitive.xy + pos) * fill_size_inv;
> }
> [ 10168.529] (EE)
> Fatal server error:
> [ 10168.529] (EE) GLSL compile failure
> [ 10168.529] (EE)
> [ 10168.529] (EE)
> Please consult the The X.Org Foundation support
>          at http://wiki.x.org
>  for help.
> [ 10168.529] (EE) Please also check the log file at "/var/log/Xorg.0.log"
> for additional information. [ 10168.529] (EE)
> [ 10168.529] (II) AIGLX: Suspending AIGLX clients for VT switch
> [ 10168.903] (EE) Server terminated with error (1). Closing log file.
> 
> This resembled me to the bug fixed by Michel Dänzer (see Bug 97300)
> --- glamor/glamor_composite_glyphs.c
> +++ glamor/glamor_composite_glyphs.c
> @@ -199,7 +199,8 @@  static const glamor_facet
> glamor_facet_composite_glyphs_12 .vs_vars = ("attribute vec2 primitive;\n"
>                  "attribute vec2 source;\n"
>                  "varying vec2 glyph_pos;\n"),
> -    .vs_exec = (GLAMOR_POS(gl_Position, primitive)
> +    .vs_exec = ("       vec2 pos = vec2(0,0);\n"
> +                GLAMOR_POS(gl_Position, primitive.xy)
>                  "       glyph_pos = source.xy * ATLAS_DIM_INV;\n"),
>      .fs_vars = ("varying vec2 glyph_pos;\n"),
>      .fs_exec = ("       vec4 mask = texture2D(atlas, glyph_pos);\n"),
> 
> however, this did not fix the issue. What is somewhat strange is the fact
> that the error states "primitive.xy.xy", please note the double
> referencing. I could track this down to the line 81 in the (suse -patched
> ...) file glamor_program.c, where the line with "fill_pos = ...." orignates
> from - but my knowledge on x11 and C does not bring me further.
> 
> Mr. Anholt: Michel Dänzer told me to probably CC you, so I did ....
> 
> Thank you very much for looking into this,
> best regards
> 
> 
> 
> 
> 
> Dieter Jurzitza

-- 
-----------------------------------------------------------
Dr.-Ing. Dieter Jurzitza                    76131 Karlsruhe



More information about the xorg-devel mailing list