crashes after building from most recent sources

Greg Lewis glewis at eyesbeyond.com
Sun Mar 20 11:07:35 PDT 2011


On Sat, Mar 19, 2011 at 09:33:11PM -0700, John Rose wrote:
> The change below in Defs-bsd.gmk causes the loading of the spurious copy of libjvm.  -- John

Thanks John!  Unfortunately it looks like this is needed on FreeBSD or the
new shared library validation breaks.  I've committed a change that undoes
the rpath addition on MacOS X only.  Works for me.

> 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)
>  
>  #
> 
> 

> 


-- 
Greg Lewis                          Email   : glewis at eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : glewis at FreeBSD.org



More information about the bsd-port-dev mailing list