1. 25 Aug, 2020 1 commit
  2. 05 Jul, 2020 1 commit
  3. 19 Nov, 2019 1 commit
    • Aaron Plattner's avatar
      os: Don't crash in AttendClient if the client is gone · 4308f5d3
      Aaron Plattner authored
      If a client is in the process of being closed down, then its client->osPrivate
      pointer will be set to NULL by CloseDownConnection. This can cause a crash if
      freeing the client's resources results in a call to AttendClient. For example,
      if the client has a pending sync fence:
      
       Thread 1 "X" received signal SIGSEGV, Segmentation fault.
       AttendClient (client=0x5571c4aed9a0) at ../os/connection.c:942
       (gdb) bt
       #0  AttendClient (client=0x5571c4aed9a0) at ../os/connection.c:942
       #1  0x00005571c3dbb865 in SyncAwaitTriggerFired (pTrigger=<optimized out>) at ../Xext/sync.c:694
       #2  0x00005571c3dd5749 in miSyncDestroyFence (pFence=0x5571c5063980) at ../miext/sync/misync.c:120
       #3  0x00005571c3dbbc69 in FreeFence (obj=<optimized out>, id=<optimized out>) at ../Xext/sync.c:1909
       #4  0x00005571c3d7a01d in doFreeResource (res=0x5571c506e3d0, skip=skip@entry=0) at ../dix/resource.c:880
       #5  0x00005571c3d7b1dc in FreeClientResources (client=0x5571c4aed9a0) at ../dix/...
      4308f5d3
  4. 15 Oct, 2019 1 commit
  5. 02 May, 2019 1 commit
    • Adam Richter's avatar
      assert(a && b) --> assert(a); assert(b) · 9d25408a
      Adam Richter authored
      Separate each statement of the form "assert(a && b);" into "assert(a);"
      and "assert(b);" for more precise diagnostics, except for this clever
      use in drmmode_display.c where it was used to pass a hint to developers:
      
      	assert(num_infos <= 32 && "update return type");
      9d25408a
  6. 20 Mar, 2017 1 commit
  7. 01 Mar, 2017 1 commit
  8. 08 Mar, 2016 1 commit
  9. 21 Apr, 2015 1 commit
  10. 12 Nov, 2014 1 commit
  11. 12 Jan, 2014 2 commits
  12. 12 Nov, 2013 1 commit
  13. 10 Jul, 2012 4 commits
  14. 21 Mar, 2012 1 commit
    • Keith Packard's avatar
      Introduce a consistent coding style · 9838b703
      Keith Packard authored
      This is strictly the application of the script 'x-indent-all.sh'
      from util/modular. Compared to the patch that Daniel posted in
      January, I've added a few indent flags:
      
      	-bap
      	-psl
      	-T PrivatePtr
      	-T pmWait
      	-T _XFUNCPROTOBEGIN
      	-T _XFUNCPROTOEND
      	-T _X_EXPORT
      
      The typedefs were needed to make the output of sdksyms.sh match the
      previous output, otherwise, the code is formatted badly enough that
      sdksyms.sh generates incorrect output.
      
      The generated code was compared with the previous version and found to
      be essentially identical -- "assert" line numbers and BUILD_TIME were
      the only differences found.
      
      The comparison was done with this script:
      
      dir1=$1
      dir2=$2
      
      for dir in $dir1 $dir2; do
      	(cd $dir && find . -name '*.o' | while read file; do
      		dir=`dirname $file`
      		base=`basename $file .o`
      		dump=$dir/$base.dump
      		objdump -d $file > $dump
      	done)
      done
      
      find $dir1 -name '*.dump' | while read dump; do
      	otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
      	diff -u $dump $otherdump
      do...
      9838b703
  15. 01 Dec, 2011 1 commit
    • Keith Packard's avatar
      Save major/minor opcodes in ClientRec for RecordAReply · fb22a408
      Keith Packard authored
      
      
      The record extension needs the major and minor opcodes in the reply
      hook, but the request buffer may have been freed by the time the hook
      is invoked. Saving the request major and minor codes as the request is
      executed avoids fetching from the defunct request buffer.
      
      This patch also eliminates the public MinorOpcodeOfRequest function,
      inlining it into Dispatch. Usages of that function have been replaced
      with direct access to the new ClientRec field.
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Reviewed-by: Jamey Sharp's avatarJamey Sharp <jamey@minilop.net>
      fb22a408
  16. 18 Nov, 2011 1 commit
  17. 21 Sep, 2011 1 commit
  18. 03 May, 2011 1 commit
  19. 09 Mar, 2011 1 commit
  20. 25 Feb, 2011 1 commit
    • Erkki Seppälä's avatar
      record: avoid crash when calling RecordFlushReplyBuffer recursively · 0801afbd
      Erkki Seppälä authored
      
      
      RecordFlushReplyBuffer can call itself recursively through
      WriteClient->CallCallbacks->_CallCallbacks->RecordFlushAllContexts
      when the recording client's buffer cannot be completely emptied in one
      WriteClient. When a such a recursion occurs, it will not be broken out
      of which results in segmentation fault when the stack is exhausted.
      
      This patch adds a counter (a flag, really) that guards against this
      situation, to break out of the recursion.
      
      One alternative to this change would be to change _CallCallbacks to
      check the corresponding counter before the callback loop, but that
      might affect existing behavior, which may be relied upon.
      Reviewed-by: default avatarRami Ylimäki <rami.ylimaki@vincit.fi>
      Signed-off-by: default avatarErkki Seppälä <erkki.seppala@vincit.fi>
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      0801afbd
  21. 16 Feb, 2011 1 commit
  22. 22 Jun, 2010 1 commit
    • Rami Ylimäki's avatar
      record: Prevent a crash on recording client disconnect. · 8b65f2ed
      Rami Ylimäki authored
      
      
      Execute the following steps to reproduce the issue.
      
        1. Run at least two recording clients simultaneously.
           $ cnee --record --request-range 1-127 &
           $ cnee --record --request-range 1-127 &
        2. Kill the recording clients.
           $ killall cnee
        3. Give X server something to do so that the clients are closed.
           $ xinput list
           $ xinput list
      
      As a result RecordUninstallHooks accesses NullClient, because
      RecordAClientStateChange doesn't clean the recording clients up
      properly.
      
      Fix RecordUninstallHooks to fail locally on an assertion instead of
      much later in privates code, if NullClient is still accessed because
      of some other bug. Fix RecordAClientStateChange to iterate through all
      contexts so that modifications of the iterated array during iteration
      don't cause contexts to be skipped.
      Signed-off-by: default avatarRami Ylimäki <ext-rami.ylimaki@nokia.com>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      8b65f2ed
  23. 18 Jun, 2010 1 commit
  24. 11 Jun, 2010 1 commit
  25. 06 Jun, 2010 3 commits
  26. 03 Jun, 2010 2 commits
  27. 19 May, 2010 1 commit
  28. 14 May, 2010 1 commit
  29. 12 May, 2010 1 commit
  30. 22 Feb, 2010 1 commit
  31. 19 Dec, 2009 2 commits
  32. 21 Sep, 2009 1 commit