When the X server can support BIG-REQUEST extension, all TOO_LONG tests of
XProto* section will fail. The reason comes from two ways:
1. X server cannot process the big request correctly. See detail for bugid 4550
2. It should set the rp->length field to be 0 if the request is TOO_LONG type
and the X server can support BIG-REQUEST extension.
Created attachment 3375 [details] [review]
proposed patch of src/libproto/MakeReq.c
*** Bug 4550 has been marked as a duplicate of this bug. ***
Tagging for patch; will triage later.
This should be fixed as of this commit:
Author: Aaron Plattner <firstname.lastname@example.org>
Date: Fri Aug 27 10:20:29 2010 -0700
os: Return BadLength instead of disconnecting BigReq clients (#4565)
If a client sends a big request that's too big (i.e. bigger than
maxBigRequestSize << 2 bytes), the server just disconnects it. This makes the
client receive SIGPIPE the next time it tries to send something.
The X Test Suite sends requests that are too big when the test specifies the
TOO_LONG test type. When the client receives SIGPIPE, XTS marks it as
UNRESOLVED, which counts as a failure.
Instead, remember how long the request is supposed to be and then return that
size. Dispatch() checks the length and sends BadLength to the client. Then,
whenever oci->ignoreBytes is nonzero, ignore the data read instead of trying to
process it as a request.
Signed-off-by: Aaron Plattner <email@example.com>
Reviewed-by: Keith Packard <firstname.lastname@example.org>
Signed-off-by: Keith Packard <email@example.com>
os/io.c | 27 ++++++++++++++++++++++++---
os/osdep.h | 1 +
2 files changed, 25 insertions(+), 3 deletions(-)