xf86-video-armsoc: causes X server crash in IgnoreClient upon VT switch (patch drafted)
Submitted by Alexei Colin
Assigned to Paul Geary
Created attachment 112112 Proposed patch that makes the problem go away
X server dies with a segfault when attempting to switch VT out of the X session into a console with Ctrl-Alt-Fn, after having started xserver from a VT with 'startx'.
Xserver version: 1.16.3, armsoc driver: latest git 459fcb44, hardware: Hardkernel Odroid U3 (Exynos 4412). This happened for 'awesome' window manager, but not for other root clients (e.g. xterm), for the reason explained below. A patch is attached.
Upon VT enter/leave, the armsoc driver calls AttendClient/IgnoreClient for all clients present in the clients array. Some of these clients may be 'gone', ie. for which CloseDownConnection had been called, which cleared their private osPrivate pointer to NULL. IgnoreClient will dereference this pointer if called on a gone client.
The reason this manifested with 'awesome' WM is because it creates two connections to the server: one long lived, and another one only for setting the wallpaper. The latter one is closed and becomes the 'gone' client. As a confirmation, disabling wallpaper in user config script, disables this bug.
The attached patch adds a check of the client state before calling AttendClient/IgnoreClient. The patched version switches between VTs fine.
Attachment 112112, "Proposed patch that makes the problem go away":