<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">On Jun 29, 2015, at 10:48 AM, Doug Simon <<a href="mailto:doug.simon@oracle.com" class="">doug.simon@oracle.com</a>> wrote:<br class=""><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">As I understand it, part of this change is to split intrinsification into one method that does the checks that then calls a second method which the VM may intrinsify on the assumption all checks have been performed by the first method. What’s to prevent a direct call to the latter via reflection that by-passes the first method?</span></div></blockquote><div><br class=""></div><div>The answer is simple:  We mark the dangerous method private.</div><div><br class=""></div><div>I assume you are thinking about setAccessible, but if that's allowed there's nothing to prevent people from taking whole system down in a hundred different ways.  At that point having a surprising intrinsic is the least of our problems.</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><span style="font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">I understand that writing the checking logic in Java is desirable.<span class="Apple-converted-space"> </span></span></div></blockquote></div><br class=""><div class="">Indeed, that is the key compromise here.  Coding the required checks in assembly code or compiler IR is (as we all know) a losing battle.  You need Maxine/Graal snippets or real Java code to get it right.</div><div class=""><br class=""></div><div class="">— John</div></body></html>