Give an error message rather than logging the error and then crashing later 
because the JVM can't detect stack overflow.  In a resource exhausted 
situation, thread creation is also failing.  This is the vm_exit_out_of_memory 
message printed:

`$ java -XX:+UseNewCode -version
[0.003s][warning][os,thread] Attempt to protect stack guard pages failed 
(0x00007f606b249000-0x00007f606b24d000).

 There is insufficient memory for the Java Runtime Environment to continue.
 Native memory allocation (mprotect) failed to protect 16384 bytes for memory 
to guard stack pages
 An error report file with more information is saved as:
 /16mprotect/hs_err_pid30596.log`
`

-------------

Commit messages:
 - Made resexhaused001.004 manual tests.  You can't reliably run these tests.
 - 8253916: ResourceExhausted/resexhausted001 crashes on Linux-x64

Changes: https://git.openjdk.java.net/jdk/pull/1540/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1540&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8253916
  Stats: 15 lines in 6 files changed: 5 ins; 5 del; 5 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1540.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1540/head:pull/1540

PR: https://git.openjdk.java.net/jdk/pull/1540

Reply via email to