X server bug?
Mouse <[email protected]> Thu, 4 Dec 2025 16:07:07 -0500 (EST)
| Newsgroups | gmane.os.netbsd.devel.x11 |
|---|---|
| Message-ID | <[email protected]> |
I've just run into what I consider to be a bug in an X server. I first saw with a relatively recent Ubuntu on a work machine, which prompted me to look for it elsewhere. I do not see it with the MIT server I use on 1.4T. I do not see it with the server built from 5.2's /usr/xsrc. But I *do* see it with the server built from 9.1's /usr/xsrc. The bug is that, when a client issues a ChangeGC request trying to set a clip-mask pixmap with 0x2000001a as the pixmap ID (not a valid ID; X resource IDs never have any of the top three bits set), the invalid ID value in the resulting error is 0 instead of 0x2000001a. (This presumably will happen with various other invalid IDs as well; that just happens to be what ended up in that spot when I first discovered it, and I see little value in probing the exact envelope of the bug.) I'm wondering if people running various NetBSD versions can perhaps try it to see how widespread it is, and, if anyone is feeling ambitious, perhaps try to get it fixed upstream. I wrote a tiny little test program, which is on ftp.rodents-montreal.org in /mouse/X/test-err-1.c for interested parties. Just compile it and run it (of course, reading it over first is recommended; it's small). The correct output looks like this (the serial numbers may vary): X Error of failed request: BadPixmap (invalid Pixmap parameter) Major opcode of failed request: 56 (X_ChangeGC) Resource id in failed request: 0x2000001a Serial number of failed request: 6 Current serial number in output stream: 8 On a buggy server, the error instead has a zero in the resource ID field: X Error of failed request: BadPixmap (invalid Pixmap parameter) Major opcode of failed request: 56 (X_ChangeGC) Resource id in failed request: 0x0 Serial number of failed request: 8 Current serial number in output stream: 10 /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML [email protected] / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B