# HG changeset patch # User Matthias Grimmer # Date 1391593027 -3600 # Node ID 0d91d64b88f88e3a89d5bcdafb6066c1cff826f7 # Parent d04be74665fb24531b853c8e3067029019c2b4f4 GNFI: set invalid rtld_default in HotSpotVMConfig diff -r d04be74665fb -r 0d91d64b88f8 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java Wed Feb 05 09:32:30 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java Wed Feb 05 10:37:07 2014 +0100 @@ -840,9 +840,15 @@ @HotSpotVMField(name = "JavaThread::_vm_result", type = "oop", get = HotSpotVMField.Type.OFFSET) @Stable public int threadObjectResultOffset; @HotSpotVMField(name = "JavaThread::_graal_counters[0]", type = "jlong", get = HotSpotVMField.Type.OFFSET, optional = true) @Stable public int graalCountersThreadOffset; + // The native side (graalCompilerToVM.cpp) sets the rtldDefault if the + // platform is NOT Windows (Windows is currently not supported). + // AMD64NativeFunctionInterface checks if rtld_default handle is valid. + // Using 0 is not possible as it is a valid value for rtldDefault on some platforms. + public static final long INVALID_RTLD_DEFAULT_HANDLE = 0xDEADFACE; + @Stable public long libraryLoadAddress; @Stable public long functionLookupAddress; - @Stable public long rtldDefault; + @Stable public long rtldDefault = INVALID_RTLD_DEFAULT_HANDLE; /** * This field is used to pass exception objects into and out of the runtime system during diff -r d04be74665fb -r 0d91d64b88f8 src/share/vm/graal/graalCompilerToVM.cpp --- a/src/share/vm/graal/graalCompilerToVM.cpp Wed Feb 05 09:32:30 2014 +0100 +++ b/src/share/vm/graal/graalCompilerToVM.cpp Wed Feb 05 10:37:07 2014 +0100 @@ -562,11 +562,6 @@ set_long("functionLookupAddress", (jlong) os::dll_lookup); #if defined(TARGET_OS_FAMILY_bsd) || defined(TARGET_OS_FAMILY_linux) set_long("rtldDefault", (jlong) RTLD_DEFAULT); - #else - // Windows is not supported at the moment. - // On Java-side we do a check on 0xDEADFACE and crash if rtldDefault == 0xDEADFACE. - // Using 0 is not possible as it is a valid value for rtldDefault on some platforms. - set_long("rtldDefault", (jlong) 0xDEADFACE); #endif #undef set_boolean