mirror of
https://github.com/X11Libre/xserver.git
synced 2026-11-15 05:23:40 +00:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
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>
|
||
| .. | ||
| kdrive | ||
| stubs | ||
| vfb | ||
| xfree86 | ||
| xnest | ||
| xquartz | ||
| xwin | ||
| meson.build | ||