JDK-8186211 : Negative tests for CONSTANT_Dynamic
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-08-14
  • Updated: 2018-03-01
  • Resolved: 2018-02-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11 b03Fixed
Description
Negative tests need to be written to generate class files containing incorrect constant dynamic declarations and usages so as to test the verifier and related aspects of HotSpot. 
Comments
Updated status, majority of positive and negative testing for ConstantDynamic has been completed CondyBSMInvocation.java Wrong arity (WrongMethodTypeException wrapped into a BootstrapMethodError) Wrong # of expected static arguments (WrongMethodTypeException wrapped into a BootstrapMethodError) Poorly formed BSM signature (unexpected arguments & argument types in signature) Non-existent bootstrap method (NoSuchMethodError) CondyNameValidationTest.java CondtyTypeValidationTest.java ConstantDynamic_info structure whose name_and_type_index points to an invalid CONSTANT_NameAndType_info structure (invalid field name or field descriptor) CondyBSMValidationTest.java Syntactically poorly formed BSM signature in the bootstrap methods array of the bootstrap method table CondyNestedTest.java Recursive condy CondyWithGarbageTest.java Positive stress ldc test for verifying that JVM correctly manages oops maps CondyRepeatFailedResolution.java JVMS 5.4.3 Resolution, multiple ldcs of same ConstantDynamic_info structure to test continued failed resolution CondyStaticArgumentsTest.testIndyWithCondy Indy whose BSM array index is a BSM for a condy CondyBSMException.java Check for expected BSM thrown Exceptions (Throwable - see method testException, Error, BootstrapMethodError, RuntimeException) CondyReturnPrimitiveTest.java BSM return type for primitive values, null & correct return type conversions CondyWrongType.java BSM returning the wrong type Condy with a null static argument Remaining minor tests pending: Negative tests to use ldc when ldc_w is required and vice versa JVMTI RedefineClasses - redefine a method that contains a condy ConstantDynamic_info structure whose name_and_type_index does not point at a CONSTANT_NameAndType_info ConstantDynamic_info structure whose bootstrap_method_attr_index does points to an invalid index (an index that is not an index into the bootstrap methods array of the bootstrap method table) ConstantDynamic_info structure in < 54.0 class file ldc of a ConstantDynamic_info CP form where the class file does not contain a BootstrapMethods Array Condy whose BSM array index is a BSM for an indy (should throw BootstrapMethodError)
24-10-2017