GL Programs SEGV on exit()

Konstantin Belousov kostikbel at
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/
> - Mesa-7.11.2/src/glsl/ralloc.c:ralloc_autofree_context() within
> calls atexit(autofree) - whics is also in
> - dri does dlclose( which unmaps the code
> - main thread calls exit()
> - atexit processing jumps to the address where autofree() used to be loaded.
> 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 :

More information about the freebsd-x11 mailing list