comparison src/os_cpu/linux_x86/vm/os_linux_x86.cpp @ 8883:b9a918201d47

Merge with hsx25
author Gilles Duboscq <duboscq@ssw.jku.at>
date Sat, 06 Apr 2013 20:04:06 +0200
parents b8f261ba79c6 9ef47379df20
children 836a62f43af9
comparison
equal deleted inserted replaced
8660:d47b52b0ff68 8883:b9a918201d47
303 } else if (thread->in_stack_red_zone(addr)) { 303 } else if (thread->in_stack_red_zone(addr)) {
304 // Fatal red zone violation. Disable the guard pages and fall through 304 // Fatal red zone violation. Disable the guard pages and fall through
305 // to handle_unexpected_exception way down below. 305 // to handle_unexpected_exception way down below.
306 thread->disable_stack_red_zone(); 306 thread->disable_stack_red_zone();
307 tty->print_raw_cr("An irrecoverable stack overflow has occurred."); 307 tty->print_raw_cr("An irrecoverable stack overflow has occurred.");
308
309 // This is a likely cause, but hard to verify. Let's just print
310 // it as a hint.
311 tty->print_raw_cr("Please check if any of your loaded .so files has "
312 "enabled executable stack (see man page execstack(8))");
308 } else { 313 } else {
309 // Accessing stack address below sp may cause SEGV if current 314 // Accessing stack address below sp may cause SEGV if current
310 // thread has MAP_GROWSDOWN stack. This should only happen when 315 // thread has MAP_GROWSDOWN stack. This should only happen when
311 // current thread was created by user code with MAP_GROWSDOWN flag 316 // current thread was created by user code with MAP_GROWSDOWN flag
312 // and then attached to VM. See notes in os_linux.cpp. 317 // and then attached to VM. See notes in os_linux.cpp.
333 } else if (sig == SIGBUS /* && info->si_code == BUS_OBJERR */) { 338 } else if (sig == SIGBUS /* && info->si_code == BUS_OBJERR */) {
334 // BugId 4454115: A read from a MappedByteBuffer can fault 339 // BugId 4454115: A read from a MappedByteBuffer can fault
335 // here if the underlying file has been truncated. 340 // here if the underlying file has been truncated.
336 // Do not crash the VM in such a case. 341 // Do not crash the VM in such a case.
337 CodeBlob* cb = CodeCache::find_blob_unsafe(pc); 342 CodeBlob* cb = CodeCache::find_blob_unsafe(pc);
338 nmethod* nm = cb->is_nmethod() ? (nmethod*)cb : NULL; 343 nmethod* nm = (cb != NULL && cb->is_nmethod()) ? (nmethod*)cb : NULL;
339 if (nm != NULL && nm->has_unsafe_access()) { 344 if (nm != NULL && nm->has_unsafe_access()) {
340 stub = StubRoutines::handler_for_unsafe_access(); 345 stub = StubRoutines::handler_for_unsafe_access();
341 } 346 }
342 } 347 }
343 else 348 else