RFR: 8247732: validate user-input intrinsic_ids in ControlIntrinsic [v9]

Xin Liu xliu at openjdk.java.net
Sun Dec 6 10:23:26 UTC 2020


On Fri, 4 Dec 2020 20:42:59 GMT, Xin Liu <xliu at openjdk.org> wrote:

>> `compiler/compilercontrol/mixed/RandomValidCommandsTest.java` fails as well:
>> java.lang.RuntimeException: CompileCommand: option *.*$method missing in output: expected true, was false
>> 	at jdk.test.lib.Asserts.fail(Asserts.java:594)
>> 	at jdk.test.lib.Asserts.assertTrue(Asserts.java:486)
>> 	at compiler.compilercontrol.share.processors.CommandProcessor.check(CommandProcessor.java:73)
>> 
>> You may need `-XX:CompileThreshold=100` to reproduce.
>
> take a look the failure.

**Analysis**

The failure of compiler/compilercontrol/commands/ControlIntrinsicTest.java is reproducible with `-XX:CompileThreshold=100`. RandomValidCommandsTest.java is a flaky test. Once it generates INTRINSIC commands in random test, it fails due to the same reason as  the first case. 

After JDK-8256508, the output message of option has changed. 
now it outputs  message such as `CompileCommand: ControlIntrinsic *Klass.-()V const char* ControlIntrinsic = '+_newArray -_minF +_copyOf'` even thought the input  is `-XX:Compilecommand=option,*Klass.-()V,ControlIntrinsic,ccstr,+_newArray,-_minF,+_copyOf`. 

**Solution**
I need to reformat CommandProcessor.getOutputString in test/hotspot/jtreg/compiler/compilercontrol/share/processors/CommandProcessor.java

-------------

PR: https://git.openjdk.java.net/jdk/pull/1179


More information about the hotspot-compiler-dev mailing list