[PATCH] record: Register client private to prevent crash.

Rami Ylimäki ext-rami.ylimaki at nokia.com
Fri Jun 18 02:40:58 PDT 2010


Running the following command causes an assertion to fail:
        cnee --record --request-range 1-127

3  in dixGetPrivateAddr       at ../../include/privates.h:122
4  in dixGetPrivate           at ../../include/privates.h:137
5  in dixLookupPrivate        at ../../include/privates.h:167
6  in RecordInstallHooks      at ../../record/record.c:911
7  in ProcRecordEnableContext at ../../record/record.c:2377
8  in ProcRecordDispatch      at ../../record/record.c:2571
9  in Dispatch                at ../../dix/dispatch.c:432
10 in main                    at ../../dix/main.c:289

Signed-off-by: Rami Ylimäki <ext-rami.ylimaki at nokia.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden at nokia.com>
Reviewed-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
There is also a bug in Xlib preventing recorded data from reaching
clients: https://bugs.freedesktop.org/show_bug.cgi?id=28595.

 record/record.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/record/record.c b/record/record.c
index 4117a5a..06006f7 100644
--- a/record/record.c
+++ b/record/record.c
@@ -2895,6 +2895,9 @@ RecordExtensionInit(void)
     if (!RTContext)
 	return;
 
+    if (!dixRegisterPrivateKey(RecordClientPrivateKey, PRIVATE_CLIENT, 0))
+        return;
+
     ppAllContexts = NULL;
     numContexts = numEnabledContexts = numEnabledRCAPs = 0;
 
-- 
1.6.3.3



More information about the xorg-devel mailing list