Plugin crashes with Xulrunner 1.9.2/libpng/libjpeg
    Vlastimil Babka 
    caster at gentoo.org
       
    Sun Jan 24 09:58:25 PST 2010
    
    
  
On 01/24/2010 11:11 AM, Andreas Radke wrote:
> Am Sat, 23 Jan 2010 12:00:31 +0100
> Thanks. For 1.7 branch I've attached a patch.
--- patches/icedtea-libraries.patch	2010-01-22 19:57:38.000000000 +0000
+++ patches/icedtea-libraries.patch.new	2010-01-23 11:51:50.166950941 +0000
@@ -25052,8 +25052,8 @@
  +METHODDEF(void)
  +initIDs()
  +{
-+#if JPEG_LIB_VERSION >= 70
-+    void *handle = dlopen("libjpeg.so.7", RTLD_LAZY | RTLD_GLOBAL);
++#if JPEG_LIB_VERSION >= 80
++    void *handle = dlopen("libjpeg.so.8", RTLD_LAZY | RTLD_GLOBAL);
  +#else
  +    void *handle = dlopen("libjpeg.so.62", RTLD_LAZY | RTLD_GLOBAL);
  +#endif
@@ -25347,7 +25347,7 @@
   Java_sun_awt_image_JPEGImageDecoder_initIDs(JNIEnv *env, jclass cls,
                                               jclass InputStreamClass)
   {
-+    void *handle = dlopen("libjpeg.so.7", RTLD_LAZY | RTLD_GLOBAL);
++    void *handle = dlopen("libjpeg.so.8", RTLD_LAZY | RTLD_GLOBAL);
  +    if (handle == NULL) {
  +       handle = dlopen("libjpeg.so.62", RTLD_LAZY | RTLD_GLOBAL);
  +    }
Hm so 1.7 branch already tries to support multiple versions at build 
time? I wonder why the first part uses defines and dlopen just one 
version, and the other tries to dlopen one after another? Sounds quite 
dangerous to me, as the jpeg versions are ABI incompatible. So you could 
e.g. build against libjpeg-7, then install libjpeg-8 next to it and the 
second dlopen would open libjpeg-8 and try to call its functions with 
bad ABI.
It would make more sense to me to use the defines for both dlopen()'s.
Vlastimil
    
    
More information about the distro-pkg-dev
mailing list