[Mesa-dev] shared LLVM library causes program abortion

Jose Fonseca jfonseca at vmware.com
Tue May 17 12:27:26 PDT 2011



----- Original Message -----
> Dave,
> 
> This is a problem that popped up on our testing with Fedora 15 and
> swrast_dri.so, but I believe it can happen with any
> /usr/lib/dri/*_dri.so , and will like happen with any other distro
> that tries to dynamically link DRI drivers against LLVM 2.8.  Which
> is why I'm bring it up here instead of a bug report.
> 
> 
> The issue is that the *_dri.so are linking against a shared LLVM
> library. When XCloseDisplay is called, the *_dri.so to be unloaded,
> but misteriously /usr/lib/dri/libllvmcore-2.8.so is not.  A later
> attempt to use GL will cause
> 
>   prog: for the -disable-mmx option: may only occur zero or one
>   times!
> 
> Attached is a simple test program that illustrate this.
> 
> 
> I believe the best alternative here is to build  *_dri.so with -z
> nodelete when linking against a shared libLLVM*.
> 
> 
> Other alternatives are:
> - build *_dri.so with statically linked LLVM
> - get LLVM to unload (but I think it's a loosing battle, because it
> really relies on 

Missed some words here. LLVM relies on global data in several cases, so -z nodelete  is a good fit.

Jose

, it can install signal handlers in some cases, and
> it will likely cause leaks)



More information about the mesa-dev mailing list