RFR(S): 8247732: validate user-input intrinsic_ids in ControlIntrinsic
Liu, Xin
xxinliu at amazon.com
Fri Jun 26 02:15:15 UTC 2020
hi, Reviewers,
Could you review this patch?
bug: https://bugs.openjdk.java.net/browse/JDK-8247732
webrev: http://cr.openjdk.java.net/~xliu/8247732/00/webrev/
The core logic is class ControlIntrinsicValidator in compilerDirectives.hpp
It iterates the ccstrlist option and makes sure user-input intrinsic ids are all valid. It stops and take a record when it meets the first unrecognized intrinsic.
I used constraints to validate the global options ControlIntrinsic and DisableIntrinsic.
ControlIntrinsic/DisableIntrinsic in compiler directives are more complex. The matched directive is only parsed when hotspot attempts to compile the corresponding method.
I validate at that time and JVM will crash if it doesnot meet guarantee() statement.
I added Method::external_name_short() which returns a shorter method name in the form of "class::method".
Probably hotspot has had similar code, but I failed to discover. please let me know and I will remove mine.
Test:
passed hotspot:tier1 and gtest:all
Wrong cases and error messages can be found here:
https://bugs.openjdk.java.net/browse/JDK-8247732?focusedCommentId=14349960&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14349960
thanks,
--lx
More information about the hotspot-compiler-dev
mailing list