xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 28 12:08:40 UTC 2025


 os/log.c |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 628e94b1640f51e0f1752777776ccfa7b2978210
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Feb 28 12:46:41 2025 +0100

    os: let vpnprintf() accept %X
    
    Several pieces of the code, as well as drivers are using %X, which
    we don't support, so leading to error messages like this:
    
    [2025-02-27 14:28:44] BUG: 'if (f[f_idx])'
    [2025-02-27 14:28:44] BUG: ../xserver/os/log.c:538 in vpnprintf()
    [2025-02-27 14:28:44] Unsupported printf directive 'X'
    [2025-02-27 14:28:44]
    [2025-02-27 14:28:44] Backtrace:
    [2025-02-27 14:28:44] unw_get_proc_name failed: no unwind info found [-10]
    [2025-02-27 14:28:44] 0: /usr/lib/Xorg (?+0x0) [0x5f4d1261bc47]
    [2025-02-27 14:28:44] 1: /usr/lib/Xorg (LogVHdrMessageVerb+0x10f) [0x5f4d1261ca3f]
    [2025-02-27 14:28:44] 2: /usr/lib/Xorg (LogHdrMessageVerb+0x85) [0x5f4d1261cae5]
    [2025-02-27 14:28:44] 3: /usr/lib/Xorg (xf86VDrvMsgVerb+0x54) [0x5f4d12636604]
    [2025-02-27 14:28:44] 4: /usr/lib/Xorg (xf86DrvMsg+0x97) [0x5f4d126367d7]
    [2025-02-27 14:28:44] 5: /usr/lib/Xorg (xf86PrintEDID+0x545) [0x5f4d12654315]
    [2025-02-27 14:28:44] 6: /usr/lib/Xorg (xf86OutputSetEDID+0x1bd) [0x5f4d12657e0d]
    
    In the longer run, we'll have to decide whether we actually want to
    implement the upper-case directive or change all callers to lower-case.
    
    But for now it's better to just accept %X and interpret it as lower-case,
    in order to fix those error messages. Whether it's printed as upper or
    lower case is more or less an aesthetic matter.
    
    Reported-By: guido iodice <guido.iodice at gmail.com>
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1846>

diff --git a/os/log.c b/os/log.c
index 3301c4b58..779615e57 100644
--- a/os/log.c
+++ b/os/log.c
@@ -499,6 +499,7 @@ vpnprintf(char *string, int size_in, const char *f, va_list args)
             break;
 
         case 'x':
+        case 'X': // not actually upper case, but at least accepting '%X'
             if (length_modifier & LMOD_LONGLONG)
                 ui = va_arg(args, unsigned long long);
             else if (length_modifier & LMOD_LONG)


More information about the xorg-commit mailing list