xserver/hw
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sergey Fedorov 00ae45d4ac xquartz: xpr: fix window id truncation on LP64 (ppc64)
xprCreateFrame() passed &pFrame->wid, a (void *), straight to
xp_create_window() through a (xp_window_id *) cast.  xp_window_id is
32 bits, so only half of the 64-bit RootlessFrameID word was written;
the other half was left uninitialized.  window_hash is created with
x_hash_table_new(NULL, NULL, NULL, NULL), so keys are compared by exact
pointer identity -- a dirty high word therefore makes subsequent
lookups miss, and also trips the

    assert(sv == uv);

in x_cvt_vptr_to_uint().  On a big-endian LP64 target (ppc64) it is
worse still: the 32-bit id is written into the high half of the word,
so the truncating conversions used everywhere else (MAKE_WINDOW_ID(),
x_cvt_vptr_to_uint()) read the wrong half entirely.

This is invisible on ILP32 (32-bit ppc/i386), where void * and
unsigned int are the same width and the raw store and the converted
value have identical bit patterns -- which is why 10.6/ppc worked while
10.5/ppc64 crashed launching a client.

Write the id through a real xp_window_id and zero-extend it into
pFrame->wid, so the word is fully defined regardless of ABI or byte
order, and key window_hash consistently in both the libdispatch and
non-libdispatch paths.  With pFrame->wid clean at its single point of
origin, the downstream MAKE_WINDOW_ID()/x_cvt_vptr_to_uint()
truncations are correct and the assert no longer needs to be disabled
on ppc64.

Signed-off-by: Sergey Fedorov <vital.had@gmail.com>
2026-10-13 15:32:39 +02:00
..
kdrive xfree86: seatd-libseat: release the GPU on platform device removal 2026-10-13 13:50:16 +02:00
stubs license: add X11 OR MIT OR AGPL-3.0-or-later to Enrico Weigelt's source files 2026-07-29 10:02:59 +02:00
vfb test/pyxtest: allow for extra arguments in the xserver fixture 2026-10-02 15:48:32 +02:00
xfree86 meson_options: disable XvMC build by default 2026-10-13 14:16:38 +02:00
xnest xnest: replace global arrays by devPrivate's 2026-09-23 18:30:53 +02:00
xquartz xquartz: xpr: fix window id truncation on LP64 (ppc64) 2026-10-13 15:32:39 +02:00
xwin xwin: don't use pScreen->myNum as global array index anymore 2026-09-22 12:26:05 +02:00
meson.build kdrive: move ephyr build option check into kdrive's meson.build 2025-08-04 12:57:16 +02:00