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

Tobias Hartmann tobias.hartmann at oracle.com
Mon Jul 20 08:23:58 UTC 2020


On 08.07.20 10:26, Liu, Xin wrote:
> 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 don't think a guarantee should be used here, i.e. the VM shouldn't crash but we should exit
gracefully with an error message. Isn't it possible to piggy-back on the error mechanism in

> I added Method::external_name_short() which only returns the shorter method name in the form of  "classname::method".
> Probably hotspot has had similar code, but I failed to discover. please let me know and I will remove it.

I would just use name_and_sig_as_C_string().

- Wrong indentation

- Maybe change the error message to "Unrecognized intrinsic detected in DisableIntrinsic [...]"

Best regards,

More information about the hotspot-runtime-dev mailing list