-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b110
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
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