Print this page
rev 4509 : 7196277: JSR 292: Two jck/runtime tests crash on java.lang.invoke.MethodHandle.invokeExact
Reviewed-by: jrose, kvn

Split Split Close
Expand all
Collapse all
          --- old/src/share/vm/prims/nativeLookup.cpp
          +++ new/src/share/vm/prims/nativeLookup.cpp
↓ open down ↓ 373 lines elided ↑ open up ↑
 374  374    if (entry != NULL) return entry;
 375  375  
 376  376    // Native function not found, throw UnsatisfiedLinkError
 377  377    THROW_MSG_0(vmSymbols::java_lang_UnsatisfiedLinkError(),
 378  378                method->name_and_sig_as_C_string());
 379  379  }
 380  380  
 381  381  
 382  382  address NativeLookup::lookup(methodHandle method, bool& in_base_library, TRAPS) {
 383  383    if (!method->has_native_function()) {
 384      -    address entry =
 385      -        method->intrinsic_id() == vmIntrinsics::_invokeGeneric ?
 386      -            SharedRuntime::native_method_throw_unsupported_operation_exception_entry() :
 387      -            lookup_base(method, in_base_library, CHECK_NULL);
      384 +    address entry = lookup_base(method, in_base_library, CHECK_NULL);
 388  385      method->set_native_function(entry,
 389  386        methodOopDesc::native_bind_event_is_interesting);
 390  387      // -verbose:jni printing
 391  388      if (PrintJNIResolving) {
 392  389        ResourceMark rm(THREAD);
 393  390        tty->print_cr("[Dynamic-linking native method %s.%s ... JNI]",
 394  391          Klass::cast(method->method_holder())->external_name(),
 395  392          method->name()->as_C_string());
 396  393      }
 397  394    }
↓ open down ↓ 22 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX