<p dir="ltr">Also this bit should be using rss in L72-73</p>
<p dir="ltr">System.out.print(&quot;Remaining stack size &quot; + rss + &quot;: &quot;);<br>
  72         if ( fss &lt; sso * 0.8 || fss &gt; sso * 1.2 ) {<br>
  73             throw new RuntimeException(&quot;getThreadRemainingStackSize value [&quot; + fss + &quot;] should be within 80%..120% of the value returned by HotSpotDiagnosticMXBean&quot;);<br>
  74         } else {<br>
  75             System.out.println(&quot;OK&quot;);<br>
  76         }</p>
<p dir="ltr">Sent from my phone</p>
<div class="gmail_quote">On Feb 4, 2014 7:46 PM, &quot;David Holmes&quot; &lt;<a href="mailto:david.holmes@oracle.com">david.holmes@oracle.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Not a full review but in the test:<br>
<br>
  45     static void recursive(long n) {<br>
  46         try {<br>
  47             recursive(n + 1);<br>
  48         } catch ( StackOverflowError e ) {<br>
  49             throw new SOE(wb.<u></u>getThreadRemainingStackSize())<u></u>;<br>
  50         }<br>
  51     }<br>
<br>
If the call at 47 triggers SOE there is a reasonable chance that the call to wb.<u></u>getThreadRemainingStackSize() will also trigger SOE, as might the &quot;new&quot; and invocation of the constructor. So this seems very fragile.<br>

<br>
David<br>
<br>
On 5/02/2014 12:15 AM, Kirill Shirokov wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Please review following webrev, which adds stack size checking methods<br>
to WhiteBox API:<br>
<br>
<a href="http://cr.openjdk.java.net/~iignatyev/kshirokov/8032970/webrev.00/" target="_blank">http://cr.openjdk.java.net/~<u></u>iignatyev/kshirokov/8032970/<u></u>webrev.00/</a><br>
&lt;<a href="http://cr.openjdk.java.net/%7Eiignatyev/kshirokov/8032970/webrev.00/" target="_blank">http://cr.openjdk.java.net/%<u></u>7Eiignatyev/kshirokov/8032970/<u></u>webrev.00/</a>&gt;<br>
<br>
Thank you,<br>
Kirill<br>
<br>
p.s.<br>
JPRT build:<br>
<a href="http://bus2001067.us.oracle.com/archives/2014/01/2014-01-29-142054.iignatye.8032970/JobStatus.txt" target="_blank">http://bus2001067.us.oracle.<u></u>com/archives/2014/01/2014-01-<u></u>29-142054.iignatye.8032970/<u></u>JobStatus.txt</a><br>

</blockquote>
</blockquote></div>