Regression: [PULL] mi, ChangeGC, clientErrorValue, noClientException cleanups

Jeremy Huddleston jeremyhu at apple.com
Thu May 13 23:24:16 PDT 2010


This pull introduced a regression.  XQuartz.app now crashes on initialization.  I bisected the problem to this commit:

2d7eb4a19b773d0406c0c2e018a7da97f3565fd5 is the first bad commit
commit 2d7eb4a19b773d0406c0c2e018a7da97f3565fd5
Author: Jamey Sharp <jamey at minilop.net>
Date:   Fri May 7 18:11:36 2010 -0700

    Pre-validate ChangeGC XIDs.
    
    In order to execute a wire-level ChangeGC request, we need to look up
    the resources named by any XIDs in the value-list. Various places in the
    server already have pointers to the resources they want to set into the
    GC, though, so over time the interface has evolved to accept either XIDs
    or pointers, with several different function call signatures used in
    different eras.
    
    This patch makes the existing code require pointers to resources rather
    than XIDs, and adds a simple wrapper that looks up any XIDs. The old
    dixChangeGC API is preserved by delegating to whichever implementation
    is appropriate.
    
    This affects error-handling: If any of the XIDs are invalid, then the GC
    is unchanged, and its ChangeGC callback is not invoked. This change is
    allowed by the protocol spec, which says, "The order in which components
    are verified and altered is server-dependent. If an error is generated,
    a subset of the components may have been altered."
    
    Signed-off-by: Jamey Sharp <jamey at minilop.net>
    Reviewed-by: Keith Packard <keithp at keithp.com>

:040000 040000 3a7d65e4e8c733d5b32bf7d20c85bdfd73df9547 0feb30071948f2a0f8c3be3ef5cfcfeaf473372f M	dix


Thread 3 Crashed:
0   libSystem.B.dylib             	0x00007fff876a5b6e __semwait_signal_nocancel + 10
1   libSystem.B.dylib             	0x00007fff876a5a70 nanosleep$NOCANCEL + 129
2   libSystem.B.dylib             	0x00007fff877023c6 usleep$NOCANCEL + 57
3   libSystem.B.dylib             	0x00007fff8772197c abort + 93
4   X11.bin                       	0x00000001001bc28a System + 0
5   X11.bin                       	0x00000001000122f3 xf86SetRootClip + 0
6   X11.bin                       	0x00000001001c6fc7 AbortServer + 29
7   X11.bin                       	0x00000001001c7534 FatalError + 357
8   X11.bin                       	0x00000001001b9a2a OsSigHandler + 214
9   libSystem.B.dylib             	0x00007fff8769335a _sigtramp + 26
10  X11.bin                       	0x0000000100198694 miPointerConstrainCursor + 138
11  X11.bin                       	0x00000001001506ce InitializeSprite + 1033
12  X11.bin                       	0x00000001001382ff EnableDevice + 196
13  X11.bin                       	0x0000000100138dea InitCoreDevices + 182
14  X11.bin                       	0x0000000100130039 dix_main + 1049
15  X11.bin                       	0x0000000100018d6f server_thread + 64
16  libSystem.B.dylib             	0x00007fff8766c456 _pthread_start + 331
17  libSystem.B.dylib             	0x00007fff8766c309 thread_start + 13


On May 13, 2010, at 17:26, Jamey Sharp wrote:

> Keith reviewed the rest of this series, so it's ready for merge now.
> Thanks to keithp, ajax, daniels, and Eamon for reviewing this series
> along the way!
> 
> The following changes since commit c9e7ca4404803fe44d4684e0bb2ca2ee10fd4bb3:
>  Eamon Walsh (1):
>        xselinux: Remove use of devPrivates init/free callbacks.
> 
> are available in the git repository at:
> 
>  git://people.freedesktop.org/~jamey/xserver cleanups
> 
> Jamey Sharp (11):
>      miwideline: Factor out span buffer allocation.
>      Simplify miFillPolyHelper and miLineArc.
>      Don't statically allocate the ChangeGC parameter array.
>      dixChangeGC callers: Use ChangeGCVal instead of XID almost everywhere.
>      Pre-validate ChangeGC XIDs.
>      Replace dixChangeGC with calls directly to the right variant.
>      Define GCAllBits as the union of all valid CreateGC masks.
>      Quit using clientErrorValue in dix/gc.c.
>      clientErrorValue is never used outside dix. Stop importing it.
>      Quit using clientErrorValue in dix/colormap.c.
>      Eliminate boilerplate around client->noClientException.
> 
> Xext/bigreq.c                         |    2 +-
> Xext/dpms.c                           |   16 +-
> Xext/geext.c                          |    2 +-
> Xext/panoramiX.c                      |   12 +-
> Xext/panoramiXprocs.c                 |   37 ++--
> Xext/saver.c                          |    6 +-
> Xext/security.c                       |    7 +-
> Xext/shape.c                          |    8 +-
> Xext/shm.c                            |   18 +-
> Xext/sync.c                           |   14 +-
> Xext/xcalibrate.c                     |    6 +-
> Xext/xcmisc.c                         |    6 +-
> Xext/xf86bigfont.c                    |    4 +-
> Xext/xres.c                           |    8 +-
> Xext/xselinux_ext.c                   |    6 +-
> Xext/xtest.c                          |    8 +-
> Xext/xvdisp.c                         |    4 +-
> Xext/xvmain.c                         |    2 -
> Xi/exevents.c                         |    2 +-
> composite/compalloc.c                 |    5 +-
> composite/compext.c                   |   10 +-
> damageext/damageext.c                 |   10 +-
> dbe/dbe.c                             |    8 +-
> dix/colormap.c                        |   26 +--
> dix/devices.c                         |    8 +-
> dix/dispatch.c                        |  377 +++++++++++----------------------
> dix/dixfonts.c                        |   14 +-
> dix/extension.c                       |    4 +-
> dix/gc.c                              |  253 ++++++++++------------
> dix/glyphcurs.c                       |    5 +-
> dix/property.c                        |   14 +-
> dix/selection.c                       |    8 +-
> dix/window.c                          |   21 +-
> fb/fbseg.c                            |    4 +-
> glx/glxdriswrast.c                    |   16 +-
> glx/glxext.c                          |    2 +-
> glx/xfont.c                           |    2 -
> hw/dmx/dmx.c                          |   28 ++--
> hw/dmx/dmxfont.c                      |    2 -
> hw/kdrive/ephyr/ephyr_draw.c          |   18 +-
> hw/kdrive/ephyr/ephyrdriext.c         |   24 +-
> hw/kdrive/src/kcmap.c                 |    2 +-
> hw/kdrive/src/kxv.c                   |    8 +-
> hw/vfb/InitOutput.c                   |    2 +-
> hw/xfree86/common/xf86xv.c            |   15 +-
> hw/xfree86/dixmods/extmod/xf86dga2.c  |   64 +++---
> hw/xfree86/dixmods/extmod/xf86vmode.c |   44 ++--
> hw/xfree86/dri/xf86dri.c              |   24 +-
> hw/xfree86/dri2/dri2ext.c             |   36 ++--
> hw/xfree86/vgahw/vgaCmap.c            |    2 +-
> hw/xfree86/xaa/xaaPCache.c            |    8 +-
> hw/xquartz/applewm.c                  |   26 ++--
> hw/xquartz/pseudoramiX.c              |   10 +-
> hw/xquartz/xpr/appledri.c             |   14 +-
> hw/xwin/winwindowswm.c                |   14 +-
> include/colormap.h                    |    6 +-
> include/gc.h                          |    9 +-
> include/gcstruct.h                    |    2 +
> mi/miarc.c                            |   36 ++--
> mi/mibitblt.c                         |   41 ++--
> mi/midispcur.c                        |   24 +-
> mi/miexpose.c                         |   11 +-
> mi/miglblt.c                          |   32 ++--
> mi/mipolypnt.c                        |   12 +-
> mi/miwideline.c                       |  203 ++++++------------
> mi/miwideline.h                       |    8 +-
> mi/mizerarc.c                         |    8 +-
> miext/cw/cw.c                         |   22 +-
> randr/rrcrtc.c                        |   14 +-
> randr/rrdispatch.c                    |    2 +-
> randr/rrmode.c                        |    2 +-
> randr/rroutput.c                      |    6 +-
> randr/rrproperty.c                    |   14 +-
> randr/rrscreen.c                      |    8 +-
> randr/rrxinerama.c                    |   12 +-
> record/record.c                       |    4 +-
> render/miindex.c                      |    2 +-
> render/mirect.c                       |   23 +-
> render/render.c                       |   50 ++---
> xfixes/cursor.c                       |   16 +-
> xfixes/region.c                       |   57 ++---
> xfixes/saveset.c                      |    6 +-
> xfixes/xfixes.c                       |    2 +-
> xkb/xkb.c                             |   50 +++---
> 84 files changed, 863 insertions(+), 1115 deletions(-)
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel



More information about the xorg-devel mailing list