GL Programs SEGV on exit()
peterjeremy at acm.org
Mon May 7 11:49:37 UTC 2012
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.
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20120507/2c54e634/attachment.pgp
More information about the freebsd-x11