8054008: Using -XX:-LazyBootClassLoader crashes with ACCESS_VIOLATION on Win 64bit.
authorjiangli
Wed, 12 Nov 2014 13:12:35 -0500
changeset 27649 0e79b173cc5e
parent 27648 9ac73e5f4c18
child 27650 199cbba2f8f9
8054008: Using -XX:-LazyBootClassLoader crashes with ACCESS_VIOLATION on Win 64bit. Summary: Only enable the assert for current_stack_pointer after stub routines become available. Reviewed-by: dholmes, roland, lfoltan
hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp
--- a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp	Tue Nov 11 14:52:50 2014 -0500
+++ b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp	Wed Nov 12 13:12:35 2014 -0500
@@ -635,7 +635,11 @@
 #ifndef PRODUCT
 void os::verify_stack_alignment() {
 #ifdef AMD64
-  assert(((intptr_t)os::current_stack_pointer() & (StackAlignmentInBytes-1)) == 0, "incorrect stack alignment");
+  // The current_stack_pointer() calls generated get_previous_sp stub routine.
+  // Only enable the assert after the routine becomes available.
+  if (StubRoutines::code1() != NULL) {
+    assert(((intptr_t)os::current_stack_pointer() & (StackAlignmentInBytes-1)) == 0, "incorrect stack alignment");
+  }
 #endif
 }
 #endif