Re: Xlib contract for XEvent up/down-casting

2022-12-04 Thread Keith Packard
Jeremy Huddleston Sequoia writes: > So the problem is clear, but I'm not sure which side needs to change. Probably both? How about a simple hack in XPutBackEvent that uses _XEventToWire followed by _XWireToEvent? That would also clear out any unused bits from the event before inserting it into

Re: Xlib contract for XEvent up/down-casting

2022-12-04 Thread Po Lu
Jeremy Huddleston Sequoia writes: > I've been running XQuartz with ASan+UBSan to try to catch some issues > some users have reported, and I stumbled across something below GLUT > (specifically, freeglut 2.8.1), which does: > > XConfigureEvent fakeEvent = {0}; > ... >

Xlib contract for XEvent up/down-casting

2022-12-03 Thread Jeremy Huddleston Sequoia
I've been running XQuartz with ASan+UBSan to try to catch some issues some users have reported, and I stumbled across something below GLUT (specifically, freeglut 2.8.1), which does: XConfigureEvent fakeEvent = {0}; ... XPutBackEvent(fgDisplay.Display, (XEvent*)); and XPutBackEvent