--- old/./src/os/linux/vm/os_linux.cpp 2010-07-27 16:56:31.000000000 +0200 +++ new/./src/os/linux/vm/os_linux.cpp 2010-07-27 16:56:30.000000000 +0200 @@ -3845,6 +3845,11 @@ { Linux::fast_thread_clock_init(); + if (StackShadowPages <= 0) { + tty->print_cr("\nThe -XX:StackShadowPages parameter must be set to positive value!"); + return JNI_ERR; + } + // Allocate a single page and mark it as readable for safepoint polling address polling_page = (address) ::mmap(NULL, Linux::page_size(), PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); guarantee( polling_page != MAP_FAILED, "os::init_2: failed to allocate polling page" ); --- old/./src/os/solaris/vm/os_solaris.cpp 2010-07-27 16:56:31.000000000 +0200 +++ new/./src/os/solaris/vm/os_solaris.cpp 2010-07-27 16:56:31.000000000 +0200 @@ -4859,6 +4859,10 @@ } FLAG_SET_DEFAULT(UseLargePages, os::large_page_init()); + if (StackShadowPages <= 0) { + tty->print_cr("\nThe -XX:StackShadowPages parameter must be set to positive value!"); + return JNI_ERR; + } // Check minimum allowable stack size for thread creation and to initialize // the java system classes, including StackOverflowError - depends on page