crashes after building from most recent sources

John Rose john.r.rose at oracle.com
Sat Mar 19 21:33:11 PDT 2011


The change below in Defs-bsd.gmk causes the loading of the spurious copy of libjvm.  -- John

On Mar 19, 2011, at 7:02 PM, John Rose wrote:

> The root problem appears to be that libjvm is mapped twice.  The second mapping is used by native methods.  The first execution of Thread.currentThread() binds to the uninitialized second copy of JVM_CurrentThread (jvm.cpp) which accesses an uninitialized table _sp_map to get Thread::current().  A broken _sp_map drops the JVM.
> 
> There have been launcher changes in the last several weeks.  Perhaps they have caused the double mapping.  Or maybe that was happening all along, but now it has become problematic.
> 
> By the way, the double mapping does not happen with "gamma" (non-launcher debug executable), which is why I suspect the launcher.
> 
> -- John

diff --git a/make/common/Defs-bsd.gmk b/make/common/Defs-bsd.gmk
--- a/make/common/Defs-bsd.gmk
+++ b/make/common/Defs-bsd.gmk
@@ -297,7 +297,7 @@
 # the library itself should not.
 #
 VM_NAME         = server
-JVMLIB          = -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) -ljvm
+JVMLIB          = -Xlinker -rpath -Xlinker $(LIBDIR)/$(LIBARCH)/$(VM_NAME) -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) -ljvm
 JAVALIB         = -ljava $(JVMLIB)
 
 #


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/bsd-port-dev/attachments/20110319/89c8054b/attachment.html 


More information about the bsd-port-dev mailing list