Print this page
rev 6904 : 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

Split Split Close
Expand all
Collapse all
          --- old/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp
          +++ new/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp
↓ open down ↓ 627 lines elided ↑ open up ↑
 628  628  void os::setup_fpu() {
 629  629  #ifndef AMD64
 630  630    int fpu_cntrl_word = StubRoutines::fpu_cntrl_wrd_std();
 631  631    __asm fldcw fpu_cntrl_word;
 632  632  #endif // !AMD64
 633  633  }
 634  634  
 635  635  #ifndef PRODUCT
 636  636  void os::verify_stack_alignment() {
 637  637  #ifdef AMD64
 638      -  assert(((intptr_t)os::current_stack_pointer() & (StackAlignmentInBytes-1)) == 0, "incorrect stack alignment");
      638 +  // The current_stack_pointer() calls generated get_previous_sp stub routine.
      639 +  // Only enable the assert after the routine becomes available.
      640 +  if (StubRoutines::code1() != NULL) {
      641 +    assert(((intptr_t)os::current_stack_pointer() & (StackAlignmentInBytes-1)) == 0, "incorrect stack alignment");
      642 +  }
 639  643  #endif
 640  644  }
 641  645  #endif
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX