nanogui@linuxhacker.org
nanogui@linuxhacker.org
: and kill the helldrawing window of "demo" -- "demo" as client exits
: gracefully [using my GR_CLOSE_FIX] but the server is trashed by SIGNAL_11
: (a trade mark of Linus, huh?).
:
: Gdb says:
: #0 0x8050a36 in GrGetWMPropertiesWrapper (r=0x0) at srvnet.c:891
: 891 textlen = strlen(props.title) + 1;
OK. I've fixed the error, finally, as well as now the server
frees all gc, region and font resources on a client exit, which
was buggy before.
The problem is that if GrGetWMProperties is sent an invalid window
id, then srvfunc.c just sets a GsError and returns, without filling
out the props structure that was placed on the stack in srvnet.c.
Then, the wrapper function proceeds to inspect props.title, and
guess what? Depending on the architecture and machine, there's
various crap in the structure, and the server crashes. I've fixed
all GrGet* calls to zero-fill any structure rather on an invalid return.
(To fix this w/o waiting for my pre4, just do a
memset(props, 0, sizeof(GR_WM_PROPERTIES)); instead
of the GsError(BAD_WINDOW_ID) in GrGetWMProperties().
Regards,
Greg
nanogui@linuxhacker.org