F20 System Wide Change: Perl 5.18

Florian Weimer fweimer at redhat.com
Wed Jul 17 12:34:07 UTC 2013


On 06/13/2013 03:23 PM, Petr Pisar wrote:

 > AFAIK, ld-linux.so prevents from this by reusing the first libperl.so
> addreses. However I have no idea if this is true for dlopen(). Do we get
> two interpreters with two sets of global variables?

I'm not sure if it's good—it tends to cause random crashes if code from 
one copy is run on data generated by the other copy.  It's not even 
necessary to have inconsistent global state, even totally innocuous 
things like

   if (ptr != &global_constant)
     free(ptr);

break horribly.

That being said, I used to dlopen(RTLD_GLOBAL) the libperl DSO in a JNI 
library for Java, and it appeared to work.  But that was on Debian, and 
there, XS modules didn't link against libperl.so for performance reasons.

-- 
Florian Weimer / Red Hat Product Security Team


More information about the devel mailing list