GL Programs SEGV on exit()

Konstantin Belousov kostikbel at gmail.com
Mon May 7 12:14:11 UTC 2012


On Mon, May 07, 2012 at 09:49:24PM +1000, Peter Jeremy wrote:
> Since rebuilding WITH_NEW_XORG, I've been seeing segmentation
> violations in GL programs under some conditions.  As a case that is
> quick and easy to reproduce, "glxinfo -b" with software GL (which is
> easily forced by running glxinfo in a X11-over-SSH session) will
> core dump on exit.
> 
> I've tracked this particular issue down to the following sequence:
> - dri does dlopen(/usr/local/lib/dri/swrast_dri.so)
> - Mesa-7.11.2/src/glsl/ralloc.c:ralloc_autofree_context() within
>   swrast_dri.so calls atexit(autofree) - whics is also in swrast_dri.so
> - dri does dlclose(swrast_dri.so) which unmaps the code
> - main thread calls exit()
> - atexit processing jumps to the address where autofree() used to be loaded.
> 
> http://lists.freebsd.org/pipermail/freebsd-hackers/2007-December/022764.html
> covers as similar issue and notes that this approach is doomed to failure.
> 
> I'm not sure how this code could be expected to work.  My guess is that
> dlclose() doesn't unmap the object on some other operating systems.
> 
> More to the point, I'm not sure how to fix this.
Which OS version do you use ?
It was fixed in r211706 and some follow-up commits. The change is not in 8.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20120507/ce413ff0/attachment.pgp


More information about the freebsd-x11 mailing list