Date: Mon, 7 May 2012 15:13:52 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Peter Jeremy <peterjeremy@acm.org> Cc: freebsd-x11@freebsd.org Subject: Re: GL Programs SEGV on exit() Message-ID: <20120507121352.GM2358@deviant.kiev.zoral.com.ua> In-Reply-To: <20120507114924.GA19126@server.vk2pj.dyndns.org> References: <20120507114924.GA19126@server.vk2pj.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--p5kAXTFF7AV1gnsc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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 load= ed. >=20 > http://lists.freebsd.org/pipermail/freebsd-hackers/2007-December/022764.h= tml > covers as similar issue and notes that this approach is doomed to failure. >=20 > 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. >=20 > 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. --p5kAXTFF7AV1gnsc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+nvIAACgkQC3+MBN1Mb4jFQwCfUdhNaF7GdhspC6ePW0lHKh63 MlgAn0J6V+Fgp1JVYH7etJTLKLsOlke0 =rwjl -----END PGP SIGNATURE----- --p5kAXTFF7AV1gnsc--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120507121352.GM2358>