xserver: Branch 'master' - 6 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Aug 19 23:44:17 UTC 2025


 .gitlab-ci.yml     |    2 
 Xext/xf86bigfont.c |  108 ++++++++++++++++++++++++++---------------------------
 os/log.c           |   21 ++++++++++
 os/osdep.h         |    2 
 os/utils.c         |   17 --------
 5 files changed, 76 insertions(+), 74 deletions(-)

New commits:
commit e6ec0bfde8e75b0e20a53becfb47a4448f79f435
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun Aug 10 10:07:42 2025 -0700

    xf86bigfont: fix -Werror=unused-variable build failure
    
    ../Xext/xf86bigfont.c: In function ‘SProcXF86BigfontQueryVersion’:
    ../include/dix.h:65:12: error: unused variable ‘stuff’
     [-Werror=unused-variable]
       65 |     type * stuff = (type *)client->requestBuffer;
          |            ^~~~~
    ../Xext/xf86bigfont.c:654:5: note: in expansion of macro ‘REQUEST’
      654 |     REQUEST(xXF86BigfontQueryVersionReq);
          |     ^~~~~~~
    
    Fixes: 776efd3cf ("Xext: xf86bigfont: drop swapping request length fields")
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2053>

diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index 347dc82bf..0608da19a 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -651,7 +651,7 @@ ProcXF86BigfontDispatch(ClientPtr client)
 static int _X_COLD
 SProcXF86BigfontQueryVersion(ClientPtr client)
 {
-    REQUEST(xXF86BigfontQueryVersionReq);
+    /* REQUEST(xXF86BigfontQueryVersionReq); */
     return ProcXF86BigfontQueryVersion(client);
 }
 
commit d56c84852385e18816e0aedd503671443cbe93fb
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun Aug 10 10:01:54 2025 -0700

    xf86bigfont: Fix -Werror=missing-prototypes build failure
    
    ../Xext/xf86bigfont.c: At top level:
    ../Xext/xf86bigfont.c:683:1: error: no previous prototype for
     ‘XFree86BigfontExtensionInit’ [-Werror=missing-prototypes]
      683 | XFree86BigfontExtensionInit(void)
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Fixes: 33350ef8f ("include: move private definitions out of extinit.h")
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2053>

diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index 94efe0d58..347dc82bf 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -66,7 +66,7 @@
 #include "gcstruct.h"
 #include "dixfontstr.h"
 #include "extnsionst.h"
-#include "extinit.h"
+#include "extinit_priv.h"
 #include "protocol-versions.h"
 
 #include "xf86bigfontsrv.h"
commit 4ca8b9a47459d0e0827556da48cc5f1bfe873952
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun Aug 10 09:54:08 2025 -0700

    ci: enable xf86bigfont in one set of builds
    
    Hopefully this will avoid us accepting more changesets that break it
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2053>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b20b527b6..deaaee60f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -184,7 +184,7 @@ meson:
       BUILD_XORG: true
       BUILD_XVFB: true
       BUILD_XWAYLAND: true
-      MESON_EXTRA_ARGS: ${MESON_DDX_BUILD_ARGS}
+      MESON_EXTRA_ARGS: -Dxf86bigfont=true ${MESON_DDX_BUILD_ARGS}
 
 meson-noglamor:
     extends: meson
commit 0617f6075b6a867c90912ccaf9de2200d06a5419
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun Aug 10 09:43:33 2025 -0700

    xf86bigfont: fix -Wimplicit-function-declaration error
    
    Build breaks with gcc 14 & later when xf86bigfont is enabled:
    
    ../Xext/xf86bigfont.c: In function ‘XFree86BigfontExtensionInit’:
    ../Xext/xf86bigfont.c:709:28: error: implicit declaration of function
     ‘xfont2_allocate_font_private_index’;
     did you mean ‘AllocateFontPrivateIndex’? [-Wimplicit-function-declaration]
      709 |         FontShmdescIndex = xfont2_allocate_font_private_index();
          |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                            AllocateFontPrivateIndex
    
    Fixes: 05a793f5b ("dix: Switch to the libXfont2 API (v2)")
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2053>

diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index 13ac685ed..94efe0d58 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -57,6 +57,8 @@
 #include <X11/X.h>
 #include <X11/Xproto.h>
 #include <X11/extensions/xf86bigfproto.h>
+#include <X11/fonts/fontstruct.h>
+#include <X11/fonts/libxfont2.h>
 
 #include "misc.h"
 #include "os.h"
commit faa511117d6f927b0dda805e14fddd70533188f8
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun Aug 10 09:33:22 2025 -0700

    Revert "os: move AbortServer() to os/utils.c"
    
    This reverts commit 8e8bf639087f38dc6b24c4d55c1369acfe511a65.
    
    It failed to build if xf86bigfont was enabled:
    ../os/utils.c: In function ‘AbortServer’:
    ../os/utils.c:1555:5: error: implicit declaration of function
     ‘XF86BigfontCleanup’ [-Wimplicit-function-declaration]
     1555 |     XF86BigfontCleanup();
          |     ^~~~~~~~~~~~~~~~~~
    
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2053>

diff --git a/os/log.c b/os/log.c
index 7f6e818f6..8aff8f40d 100644
--- a/os/log.c
+++ b/os/log.c
@@ -91,6 +91,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
 #include "dix/dix_priv.h"
 #include "dix/input_priv.h"
 #include "os/audit.h"
+#include "os/client_priv.h"
 #include "os/ddx_priv.h"
 #include "os/fmt.h"
 #include "os/osdep.h"
@@ -815,6 +816,26 @@ LogHdrMessageVerb(MessageType type, int verb, const char *msg_format,
     va_end(hdr_args);
 }
 
+void
+AbortServer(void)
+    _X_NORETURN;
+
+void
+AbortServer(void)
+{
+#ifdef XF86BIGFONT
+    XF86BigfontCleanup();
+#endif
+    CloseWellKnownConnections();
+    OsCleanup(TRUE);
+    AbortDevices();
+    ddxGiveUp(EXIT_ERR_ABORT);
+    fflush(stderr);
+    if (CoreDump)
+        OsAbort();
+    exit(1);
+}
+
 #define AUDIT_PREFIX "AUDIT: %s: %ld: "
 #ifndef AUDIT_TIMEOUT
 #define AUDIT_TIMEOUT ((CARD32)(120 * 1000))    /* 2 mn */
diff --git a/os/osdep.h b/os/osdep.h
index 9ed8a3623..c8702855a 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -178,8 +178,6 @@ int xthread_sigmask(int how, const sigset_t *set, sigset_t *oldest);
 extern void (*OsVendorVErrorFProc) (const char *, va_list args)
     _X_ATTRIBUTE_PRINTF(1, 0);
 
-void AbortServer(void) _X_NORETURN;
-
 void MakeClientGrabPervious(ClientPtr client);
 void MakeClientGrabImpervious(ClientPtr client);
 
diff --git a/os/utils.c b/os/utils.c
index 23f15bf4a..57c21a448 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -78,7 +78,6 @@ __stdcall unsigned long GetTickCount(void);
 #include <X11/Xtrans/Xtrans.h>
 
 #include "os/audit.h"
-#include "os/client_priv.h"
 
 #include "input.h"
 #include "dixfont.h"
@@ -1548,22 +1547,6 @@ os_move_fd(int fd)
 }
 #endif
 
-void
-AbortServer(void)
-{
-#ifdef XF86BIGFONT
-    XF86BigfontCleanup();
-#endif
-    CloseWellKnownConnections();
-    OsCleanup(TRUE);
-    AbortDevices();
-    ddxGiveUp(EXIT_ERR_ABORT);
-    fflush(stderr);
-    if (CoreDump)
-        OsAbort();
-    exit(1);
-}
-
 /* Exported version for binary compatibility with modules which call it */
 #undef Ones
 _X_EXPORT int Ones(unsigned long);
commit cbe118373d2a919a28227cf7a78e188556b94e44
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun Aug 10 09:05:19 2025 -0700

    Revert "Xext: xf86bigfont: split reply header and payload"
    
    This commit doesn't compile, but wasn't noticed since xf86bigfont
    isn't enabled by default, so wasn't being built in our CI builds.
    (The ".type = X_Reply;" line needs to end with a , not a ;)
    
    This reverts commit b5a3ac952712324a328d44bc718fe5961f537994.
    
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2053>

diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index e7cc99fd9..13ac685ed 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -530,59 +530,60 @@ ProcXF86BigfontQueryFont(ClientPtr client)
 
     {
         int nfontprops = pFont->info.nprops;
-        int rlength = nfontprops * sizeof(xFontProp)
+        int rlength = sizeof(xXF86BigfontQueryFontReply)
+            + nfontprops * sizeof(xFontProp)
             + (nCharInfos > 0 && shmid == -1
                ? nUniqCharInfos * sizeof(xCharInfo)
                + (nCharInfos + 1) / 2 * 2 * sizeof(CARD16)
                : 0);
+        xXF86BigfontQueryFontReply *reply = calloc(1, rlength);
+        char *p;
 
-        xXF86BigfontQueryFontReply rep = {
-            .type = X_Reply;
-            .length = bytes_to_int32(buflength),
-            .sequenceNumber = client->sequence,
-            .minBounds = pFont->info.ink_minbounds,
-            .maxBounds = pFont->info.ink_maxbounds,
-            .minCharOrByte2 = pFont->info.firstCol,
-            .maxCharOrByte2 = pFont->info.lastCol,
-            .defaultChar = pFont->info.defaultCh,
-            .nFontProps = pFont->info.nprops,
-            .drawDirection = pFont->info.drawDirection,
-            .minByte1 = pFont->info.firstRow,
-            .maxByte1 = pFont->info.lastRow,
-            .allCharsExist = pFont->info.allExist,
-            .fontAscent = pFont->info.fontAscent,
-            .fontDescent = pFont->info.fontDescent,
-            .nCharInfos = nCharInfos,
-            .nUniqCharInfos = nUniqCharInfos,
-            .shmid = shmid,
-        };
-
-        if (client->swapped) {
-            swaps(&rep.sequenceNumber);
-            swapl(&rep.length);
-            swapCharInfo(&rep.minBounds);
-            swapCharInfo(&rep.maxBounds);
-            swaps(&rep.minCharOrByte2);
-            swaps(&rep.maxCharOrByte2);
-            swaps(&rep.defaultChar);
-            swaps(&rep.nFontProps);
-            swaps(&rep.fontAscent);
-            swaps(&rep.fontDescent);
-            swapl(&rep.nCharInfos);
-            swapl(&rep.nUniqCharInfos);
-            swapl(&rep.shmid);
-            swapl(&rep.shmsegoffset);
+        if (!reply) {
+            if (nCharInfos > 0) {
+                if (shmid == -1)
+                    free(pIndex2UniqIndex);
+                if (!pDesc)
+                    free(pCI);
+            }
+            return BadAlloc;
         }
-
-        int rc = Success;
-        char *buf = calloc(1, rlength);
-        if (!buf) {
-            rc = BadAlloc;
-            goto out;
+        reply->type = X_Reply;
+        reply->length = bytes_to_int32(rlength - sizeof(xGenericReply));
+        reply->sequenceNumber = client->sequence;
+        reply->minBounds = pFont->info.ink_minbounds;
+        reply->maxBounds = pFont->info.ink_maxbounds;
+        reply->minCharOrByte2 = pFont->info.firstCol;
+        reply->maxCharOrByte2 = pFont->info.lastCol;
+        reply->defaultChar = pFont->info.defaultCh;
+        reply->nFontProps = pFont->info.nprops;
+        reply->drawDirection = pFont->info.drawDirection;
+        reply->minByte1 = pFont->info.firstRow;
+        reply->maxByte1 = pFont->info.lastRow;
+        reply->allCharsExist = pFont->info.allExist;
+        reply->fontAscent = pFont->info.fontAscent;
+        reply->fontDescent = pFont->info.fontDescent;
+        reply->nCharInfos = nCharInfos;
+        reply->nUniqCharInfos = nUniqCharInfos;
+        reply->shmid = shmid;
+        reply->shmsegoffset = 0;
+        if (client->swapped) {
+            swaps(&reply->sequenceNumber);
+            swapl(&reply->length);
+            swapCharInfo(&reply->minBounds);
+            swapCharInfo(&reply->maxBounds);
+            swaps(&reply->minCharOrByte2);
+            swaps(&reply->maxCharOrByte2);
+            swaps(&reply->defaultChar);
+            swaps(&reply->nFontProps);
+            swaps(&reply->fontAscent);
+            swaps(&reply->fontDescent);
+            swapl(&reply->nCharInfos);
+            swapl(&reply->nUniqCharInfos);
+            swapl(&reply->shmid);
+            swapl(&reply->shmsegoffset);
         }
-
-        char *p = buf;
-
+        p = (char *) &reply[1];
         {
             FontPropPtr pFP;
             xFontProp *prFP;
@@ -618,18 +619,15 @@ ProcXF86BigfontQueryFont(ClientPtr client)
                 }
             }
         }
-
-        WriteToClient(client, sizeof(xXF86BigfontQueryFontReply), &rep);
-        WriteToClient(client, rlength, buf);
-        free(buf);
-out:
+        WriteToClient(client, rlength, reply);
+        free(reply);
         if (nCharInfos > 0) {
             if (shmid == -1)
                 free(pIndex2UniqIndex);
             if (!pDesc)
                 free(pCI);
         }
-        return rc;
+        return Success;
     }
 }
 


More information about the xorg-commit mailing list