[Xcb] Adding pthread stubs into libxcb

Eric Anholt eric at anholt.net
Tue Nov 7 11:12:44 PST 2006


On Tue, 2006-11-07 at 20:03 +0100, Diego 'Flameeyes' Pettenò wrote:
> I'm trying to get libxcb to behave on FreeBSD by adding the (in)famous pthread 
> stubs as weak symbols. I've taken most of the code from libX11 stubs, but 
> cleaned it up not to have the strange conditionals for now, and added an 
> autoconf check to see if the compiler supports __attribute__(weak, alias) so 
> that it should be mostly fine.
> 
> What's the problem now then? Well, for some reason xinit(1) and the rest of 
> the xorg utils work fine, but stuff like fluxbox and KDE dies of segmentation 
> fault:
> 
> (gdb) bt
> #0  0x00630000 in ?? ()
> #1  0x2832b282 in _XCBUnlockDisplay (dpy=0x8180000) at xcb_lock.c:36
> #2  0x283028ca in XCreateGC (dpy=0x8180000, d=67, valuemask=<value optimized 
> out>, values=0xbfbfdc20) at CrGC.c:101
> #3  0x28314661 in XOpenDisplay (display=0x0) at OpenDis.c:662
> #4  0x08112a0e in App (this=0x817f000, displayname=0x8180000 "") at App.cc:49
> #5  0x08066a7e in Fluxbox (this=0x817f000, argc=1, argv=0xbfbfe314, 
> dpy_name=0x8177e8c "", rcfilename=0x8177e8c "") at fluxbox.cc:233
> #6  0x08077a8d in main (argc=1, argv=0xbfbfe314) at main.cc:277
> #7  0x0804df45 in _start (ap=0xbfbfe458 "/usr/bin/fluxbox") at crt1.c:111
> (gdb) up
> #1  0x2832b282 in _XCBUnlockDisplay (dpy=0x8180000) at xcb_lock.c:36
> 36      xcb_lock.c: No such file or directory.
>         in xcb_lock.c
> Current language:  auto; currently c
> (gdb) print dpy->xcb->lock_fns
> $1 = {lock_display = 0, unlock_display = 0x630000}
> (gdb) print _XInitDisplayLock_fn
> $2 = (int (*)(Display *)) 0

I believe I fixed this bug yesterday.

-- 
Eric Anholt                             anholt at FreeBSD.org
eric at anholt.net                         eric.anholt at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/xcb/attachments/20061107/78e87a2e/attachment.pgp


More information about the Xcb mailing list