RFR(S): 8247732: validate user-input intrinsic_ids in ControlIntrinsic

Liu, Xin xxinliu at amazon.com
Thu Aug 27 05:37:25 UTC 2020


Hi, Reviewers, 

May I ask to review the new revision of JDK-8247732?
Webrev:  http://cr.openjdk.java.net/~xliu/8247732/02/webrev/

Compared to the previous revision, I suppress invalid Intrinsic Ids in -XX:CompileCommand= and -XX:CompileCommandFile=.  This behavior conforms to Tobias and Nils comments before. 

I extent the testing framework to support a new CompileCommand 'INTRINSIC'. It actually represents ControlIntrinic= in both compiler command and compiler directive. 
The reason I don't test DisableIntrinsic because it will deprecate. 3 new ControlIntrinsicTest.java files are added to test ControlIntrinsic appears in -XX:CompileCommand=, -XX:CompilerDirectivesFile= and JCMD respectively.
As the following table described, only  -XX:CompilerDirectivesFile= will abort hotspot process with non-zero exit value. 

The current testing framework can't test vmflag case directly, I ran test manually like I did in comment before.
https://bugs.openjdk.java.net/browse/JDK-8247732?focusedCommentId=14349960&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14349960

Testing: 
hotspot tier1 test and gtest. 

thanks, 
--lx

________________________________________
From: hotspot-compiler-dev <hotspot-compiler-dev-retn at openjdk.java.net> on behalf of Liu, Xin <xxinliu at amazon.com>
Sent: Thursday, August 13, 2020 11:37 AM
To: Nils Eliasson; hotspot-compiler-dev at openjdk.java.net
Subject: Re: RFR(S): 8247732: validate user-input intrinsic_ids in ControlIntrinsic

hi, Nils,

Thank you to elaborate the answer with a table.

I don't know there are up to 4 approaches to affect compilation behaviors until this table!
I got it. I will work tests and make sure my next patch conform this spec.

thanks,
--lx

________________________________________
From: hotspot-compiler-dev <hotspot-compiler-dev-retn at openjdk.java.net> on behalf of Nils Eliasson <nils.eliasson at oracle.com>
Sent: Thursday, August 13, 2020 9:17 AM
To: hotspot-compiler-dev at openjdk.java.net
Subject: RE: [EXTERNAL] RFR(S): 8247732: validate user-input intrinsic_ids in ControlIntrinsic

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.



That table didn't come out right...

+-------------------------------------------------+-------+----------------------------------+
| ControlIntrinsics                               | valid |
invalid                          |
+-------------------------------------------------+-------+----------------------------------+
| vmflag                                          | ok    | print error
and don't start      |
+-------------------------------------------------+-------+----------------------------------+
| CompilerOracle: -XX:CompileCommand=             | ok    | print error
and continue         |
+-------------------------------------------------+-------+----------------------------------+
| CompilerDirectives: -XX:CompilerDirectivesFile= | ok    | print error
and don't start      |
+-------------------------------------------------+-------+----------------------------------+
| CompilerDirectives via jcmd                     | ok    | print error,
VM continues to run |
+-------------------------------------------------+-------+----------------------------------+

// Regards
Nils


On 2020-08-13 17:59, Nils Eliasson wrote:
>
> |+-------------------------------------------------+-------+----------------------------------+
> | ControlIntrinsics | valid | invalid |
> +-------------------------------------------------+-------+----------------------------------+
> | vmflag | ok | print error and don't start |
> +-------------------------------------------------+-------+----------------------------------+
> | CompilerOracle: -XX:CompileCommand= | ok | print error and continue
> |
> +-------------------------------------------------+-------+----------------------------------+
> | CompilerDirectives: -XX:CompilerDirectivesFile= | ok | print error
> and don't start |
> +-------------------------------------------------+-------+----------------------------------+
> | CompilerDirectives via jcmd | ok | print error, vm continues to run
> |
> +-------------------------------------------------+-------+----------------------------------+|



More information about the hotspot-compiler-dev mailing list