[PATCH 1/1] dix/dispatch: Fix SmartScheduleClient interval adjustment to use best rather than pClient

Jeremy Huddleston Sequoia jeremyhu at apple.com
Sun Sep 11 10:07:44 UTC 2016


pClient does not contain a live value after the transition to lists

https://bugs.freedesktop.org/show_bug.cgi?id=97765

Application Specific Information:
X.Org X Server 1.18.99.1 Build Date: 20160910
=================================================================
==16921==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000108ce3834 at pc 0x000108880766 bp 0x7000045f76c0 sp 0x7000045f76b8
READ of size 4 at 0x000108ce3834 thread T6
    #0 0x108880765 in SmartScheduleClient dispatch.c:365
    #1 0x10887ecc5 in Dispatch dispatch.c:422
    #2 0x1088c05f1 in dix_main main.c:301
    #3 0x1082aabba in server_thread quartzStartup.c:66
    #4 0x7fffc5f16aaa in _pthread_body (libsystem_pthread.dylib+0x3aaa)
    #5 0x7fffc5f169f6 in _pthread_start (libsystem_pthread.dylib+0x39f6)
    #6 0x7fffc5f161fc in thread_start (libsystem_pthread.dylib+0x31fc)

Regressed-in: 8f1edf4bd3a1f050ce9eeb5eac45dd1a8f7a6d5e
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
---
 dix/dispatch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dix/dispatch.c b/dix/dispatch.c
index 3b9600e..f1a074d 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -360,7 +360,7 @@ SmartScheduleClient(void)
          * has run, bump the slice up to get maximal
          * performance from a single client
          */
-        if ((now - pClient->smart_start_tick) > 1000 &&
+        if ((now - best->smart_start_tick) > 1000 &&
             SmartScheduleSlice < SmartScheduleMaxSlice) {
             SmartScheduleSlice += SmartScheduleInterval;
         }
-- 
2.9.3



More information about the xorg-devel mailing list