Coverity is pretty good about finding these kinds of bugs. Is there a reason why a project as significant as Xorg isn't taking advantage of their gratis access for that tool?
I think the short story is that the people who develop Wayland are the people who used to develop Xorg.
And they’d rather spend their energy on giving you a compelling reason to switch, rather than using it to add to the reasons for staying on a project they now consider obsolete.
You may disagree with their assessment, but you can’t blame them for how they decide to prioritize.
I don’t think that is necessarily true. Most of the work goes way back (1984), done by people who have been retired for a long time now. Then in the late ‘00s redhat’s x11 maintainers (i.e. young people who were hired to fix bugs, not original developers) intimated that with DRI/DRM, x11 had become mostly obsolete, and that they needed to start over, so we got wayland. All I would add to that is that if they were correct, rather than conjuring an excuse to write their own thing, everyone would have jumped to wayland over a decade ago, but here we are, 17 years later, the benchmarks are still weak, and people are still squabbling. seems more like JWZ’s CADT than anything else.