@jann probably the safest fix is to find and fix all the code in X11 that assumes malloc(0) returns a valid pointer, such as https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/86e71472bc826ac5c850e200cb3820485b5689cf and gcc's -Walloc-zero warnings may help there, but X11 is large and full of cruft.