Mon, 02 Apr 2012 16:05:56 -0700
7157141: crash in 64 bit with corrupted oops
Reviewed-by: kvn, iveresov
1.1 --- a/src/cpu/x86/vm/assembler_x86.cpp Fri Mar 30 14:18:17 2012 -0700 1.2 +++ b/src/cpu/x86/vm/assembler_x86.cpp Mon Apr 02 16:05:56 2012 -0700 1.3 @@ -528,10 +528,12 @@ 1.4 if (which == end_pc_operand) return ip + (is_64bit ? 8 : 4); 1.5 // these asserts are somewhat nonsensical 1.6 #ifndef _LP64 1.7 - assert(which == imm_operand || which == disp32_operand, ""); 1.8 + assert(which == imm_operand || which == disp32_operand, 1.9 + err_msg("which %d is_64_bit %d ip " INTPTR_FORMAT, which, is_64bit, ip)); 1.10 #else 1.11 assert((which == call32_operand || which == imm_operand) && is_64bit || 1.12 - which == narrow_oop_operand && !is_64bit, ""); 1.13 + which == narrow_oop_operand && !is_64bit, 1.14 + err_msg("which %d is_64_bit %d ip " INTPTR_FORMAT, which, is_64bit, ip)); 1.15 #endif // _LP64 1.16 return ip; 1.17
2.1 --- a/src/cpu/x86/vm/x86_64.ad Fri Mar 30 14:18:17 2012 -0700 2.2 +++ b/src/cpu/x86/vm/x86_64.ad Mon Apr 02 16:05:56 2012 -0700 2.3 @@ -3369,15 +3369,6 @@ 2.4 interface(CONST_INTER); 2.5 %} 2.6 2.7 -operand immP_poll() %{ 2.8 - predicate(n->get_ptr() != 0 && n->get_ptr() == (intptr_t)os::get_polling_page()); 2.9 - match(ConP); 2.10 - 2.11 - // formats are generated automatically for constants and base registers 2.12 - format %{ %} 2.13 - interface(CONST_INTER); 2.14 -%} 2.15 - 2.16 // Pointer Immediate 2.17 operand immN() %{ 2.18 match(ConN); 2.19 @@ -5726,16 +5717,6 @@ 2.20 ins_pipe(ialu_reg); 2.21 %} 2.22 2.23 -instruct loadConP_poll(rRegP dst, immP_poll src) %{ 2.24 - match(Set dst src); 2.25 - format %{ "movq $dst, $src\t!ptr" %} 2.26 - ins_encode %{ 2.27 - AddressLiteral polling_page(os::get_polling_page(), relocInfo::poll_type); 2.28 - __ lea($dst$$Register, polling_page); 2.29 - %} 2.30 - ins_pipe(ialu_reg_fat); 2.31 -%} 2.32 - 2.33 instruct loadConP31(rRegP dst, immP31 src, rFlagsReg cr) 2.34 %{ 2.35 match(Set dst src);
3.1 --- a/src/share/vm/memory/barrierSet.hpp Fri Mar 30 14:18:17 2012 -0700 3.2 +++ b/src/share/vm/memory/barrierSet.hpp Mon Apr 02 16:05:56 2012 -0700 3.3 @@ -181,6 +181,8 @@ 3.4 // within the heap, this function tells whether they are met. 3.5 virtual bool is_aligned(HeapWord* addr) = 0; 3.6 3.7 + // Print a description of the memory for the barrier set 3.8 + virtual void print_on(outputStream* st) const = 0; 3.9 }; 3.10 3.11 #endif // SHARE_VM_MEMORY_BARRIERSET_HPP
4.1 --- a/src/share/vm/memory/cardTableModRefBS.cpp Fri Mar 30 14:18:17 2012 -0700 4.2 +++ b/src/share/vm/memory/cardTableModRefBS.cpp Mon Apr 02 16:05:56 2012 -0700 4.3 @@ -711,6 +711,11 @@ 4.4 } 4.5 #endif 4.6 4.7 +void CardTableModRefBS::print_on(outputStream* st) const { 4.8 + st->print_cr("Card table byte_map: [" INTPTR_FORMAT "," INTPTR_FORMAT "] byte_map_base: " INTPTR_FORMAT, 4.9 + _byte_map, _byte_map + _byte_map_size, byte_map_base); 4.10 +} 4.11 + 4.12 bool CardTableModRefBSForCTRS::card_will_be_scanned(jbyte cv) { 4.13 return 4.14 CardTableModRefBS::card_will_be_scanned(cv) ||
5.1 --- a/src/share/vm/memory/cardTableModRefBS.hpp Fri Mar 30 14:18:17 2012 -0700 5.2 +++ b/src/share/vm/memory/cardTableModRefBS.hpp Mon Apr 02 16:05:56 2012 -0700 5.3 @@ -472,6 +472,9 @@ 5.4 return _byte_map + card_index; 5.5 } 5.6 5.7 + // Print a description of the memory for the barrier set 5.8 + virtual void print_on(outputStream* st) const; 5.9 + 5.10 void verify(); 5.11 void verify_guard(); 5.12
6.1 --- a/src/share/vm/utilities/vmError.cpp Fri Mar 30 14:18:17 2012 -0700 6.2 +++ b/src/share/vm/utilities/vmError.cpp Mon Apr 02 16:05:56 2012 -0700 6.3 @@ -685,6 +685,12 @@ 6.4 // extended (i.e., more detailed) version. 6.5 Universe::print_on(st, true /* extended */); 6.6 st->cr(); 6.7 + 6.8 + Universe::heap()->barrier_set()->print_on(st); 6.9 + st->cr(); 6.10 + 6.11 + st->print_cr("Polling page: " INTPTR_FORMAT, os::get_polling_page()); 6.12 + st->cr(); 6.13 } 6.14 6.15 STEP(195, "(printing code cache information)" )