Bug#1130867: xvfb: Reproducible segfault on s390x when running PyQt6 app testsuite

Pranav P <[email protected]> Thu, 30 Apr 2026 11:37:49 +0000
Newsgroups gmane.linux.debian.devel.x
Message-ID <SA1PR15MB483755E0160254D396F70711A0352__8637.15309403546$1777549165$gmane$org@SA1PR15MB4837.namprd15.prod.outlook.com>
Hi Roland,

I was just looking into this issue recently.
I can see that the visual masks are hardcoded.
The following patch seems to fix the issue:

diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index c8ae0adc9..226536d0d 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -1006,10 +1006,17 @@ vfbScreenInit(ScreenPtr pScreen, int argc, char **argv)
                                  8, TrueColor, 0xf800, 0x07e0, 0x001f);
         break;
     case 24:
+#if X_BYTE_ORDER == X_BIG_ENDIAN
+        miSetVisualTypesAndMasks(24,
+                                 ((1 << TrueColor) |
+                                  (1 << DirectColor)),
+                                 8, TrueColor, 0x0000ff00, 0x00ff0000, 0xff000000);
+#else
         miSetVisualTypesAndMasks(24,
                                  ((1 << TrueColor) |
                                   (1 << DirectColor)),
                                  8, TrueColor, 0xff0000, 0x00ff00, 0x0000ff);
+#endif
         break;
     case 30:
         miSetVisualTypesAndMasks(30,


But I haven't tested this thoroughly yet. I will raise a Merge Request with this upstream
and will notify you afterwards. I just wanted to let you know that I was looking into this and
had an update on this.

Thanks,
Pranav