Crash due to missing synchronization on 'gconf_client' in 'jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c'

Christian Schulte cs at schulte.it
Thu Aug 2 22:53:03 PDT 2012


Am 08/02/12 17:27, schrieb Chris Hegarty:
> Thanks for the cross post David. Yes, net-dev is the best place to
> discuss this issue ( bcc'ing off jdk7u-dev ).
>
> Thanks for reporting this issue Christian. I haven't looked at the
> proposed patch yet, but I agree we may want to simplify this if possible
> ( handling the synchronization at the Java level ). We also need to add
> support for gnome3 system proxies in the near future. We need to ensure
> we don't further complicate that.

The attached patch moves synchronization to the Java level for all 
platforms and also solves the issue here.

Regards,

-- 
Christian
-------------- next part --------------
--- jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java.orig	Fri Aug  3 06:05:21 2012
+++ jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java	Fri Aug  3 06:05:37 2012
@@ -339,6 +339,6 @@ public class DefaultProxySelector extends ProxySelecto
         }
     }
 
-    private native static boolean init();
-    private native Proxy getSystemProxy(String protocol, String host);
+    private synchronized native static boolean init();
+    private synchronized native Proxy getSystemProxy(String protocol, String host);
 }


More information about the jdk7u-dev mailing list