[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem with libX11 in gcc4 archive



Andreas Jochens wrote:
>
> Thanks for tracking this down to libX11.so.6. Do you have an idea what
> is going on here? I really hope somebody will help me to fix this.
>

I would say it is a problem with the optimizer. In lib/X11/Font.c,
line 366 the function XEHeadOfExtension() (can be found in
lib/X11/InitExt.c) is called. At least on this function call the
passed function argument gets corrupted:

(gdb)
366         pData = XEHeadOfExtensionList(dpy_union);
(gdb) print dpy_union
$2 = {display = 0x509550, gc = 0x509550, visual = 0x509550, screen = 0x509550,
  pixmap_format = 0x509550, font = 0x509550}
(gdb) step
XEHeadOfExtensionList (object=
      {display = 0x84, gc = 0x84, visual = 0x84, screen = 0x84, pixmap_format = 0x84, font = 0x84}) at InitExt.c:124
124         return *(XExtData ***)&object;



If I build InitExt.o without -O2, then the problem is gone:


(gdb)
366         pData = XEHeadOfExtensionList(dpy_union);
(gdb) print dpy_union
$3 = {display = 0x509550, gc = 0x509550, visual = 0x509550, screen = 0x509550,
  pixmap_format = 0x509550, font = 0x509550}
(gdb) step
XEHeadOfExtensionList (object=
      {display = 0x509550, gc = 0x509550, visual = 0x509550, screen = 0x509550, pixmap_format = 0x509550, font = 0x509550}) at InitExt.c:124
124         return *(XExtData ***)&object;
(gdb)


But this workaround is not sufficient to solve the problem. Some
small applications seemed to work, but xterm doesn't.



Regards

Harri


Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: