Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8151100

Test java/lang/instrument/NativeMethodPrefixAgent.java can't attempt to do CheckIntrinsics

XMLWordPrintable

      The java/lang/instrument/NativeMethodPrefixAgent.java modifies (wraps) the names of native methods.
      If a class is loaded that contain the @HotSpotIntrinsicCandidate annotation on a native method, one step of the class file parser is an attempt to validate the method name against a registered intrinsic in the VM.

      By default, the flag CheckIntrinsics is true, which will yield:

      “Method [<class>.wrapped_tr0_wrapped_tr1_wrapped_tr2_<original_method_name>()<return>] is annotated with @HotSpotIntrinsicCandidate, but no compiler intrinsic is defined for the method. Exiting.”

      This "wrapped" prepending to the method name invalidates the intrinsic check.

      In order for the test to pass even when loading a class with a native method containing the @HotSpotIntrinsicCandidate, the test should explicitly disable the CheckIntrinsics flag:

      -XX:-CheckIntrinsics


            mgronlun Markus Grönlund
            mgronlun Markus Grönlund
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: