pre-xkb xserver implosion

Daniel Stone daniel at fooishbar.org
Fri Dec 8 02:24:52 PST 2006


On Fri, Dec 08, 2006 at 08:56:58AM +0000, Alan Hourihane wrote:
> Has anyone tried using the current xorg git repo without an xkb map ???
> 
> It implodes for me with this...
> 
> Program received signal SIGSEGV, Segmentation fault.
> XkbSendMap (client=0x836f1b8, xkb=0x820c758, rep=0xbfc57940) at
> xkb.c:1020
> 1020                        pwire->mask= preserve->mask;
> (gdb) bt
> #0  XkbSendMap (client=0x836f1b8, xkb=0x820c758, rep=0xbfc57940) at
> xkb.c:1020
> #1  0x081713db in ProcXkbGetMap (client=0x836f1b8) at xkb.c:1532
> #2  0x0817a8aa in ProcXkbDispatch (client=0x83accf8) at xkb.c:6197
> #3  0x0813adae in XaceCatchExtProc (client=0x836f1b8) at xace.c:299
> #4  0x0808875b in Dispatch () at dispatch.c:507
> #5  0x0806faca in main (argc=4, argv=0xbfc57ee4, envp=0x60006) at
> main.c:469

Aha!  Thanks for the backtrace.  I've had this reported once or twice, I
think, but never had a useful, complete, backtrace.  Turns out maps
without preserve are valid, but just never generated these days, so try
this patch?

Cheers,
Daniel
-------------- next part --------------
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 321bf2e..724b5a5 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -1144,6 +1144,9 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr
                         memcpy(dtype->map, stype->map,
                                stype->map_count * sizeof(XkbKTMapEntryRec));
                     }
+                    else {
+                        dtype->map = NULL;
+                    }
 
                     if (stype->preserve) {
                         if (stype->map_count != dtype->map_count &&
@@ -1168,6 +1171,9 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr
                         memcpy(dtype->preserve, stype->preserve,
                                stype->map_count * sizeof(XkbModsRec));
                     }
+                    else {
+                        dtype->preserve = NULL;
+                    }
 
                     dtype->map_count = stype->map_count;
                 }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20061208/31602d73/attachment.pgp>


More information about the xorg mailing list