Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6463096
Votes 0
Synopsis icache invalidation code can segv
Category hotspot:runtime_system
Reported Against
Release Fixed hs10(b03), 6u1(b01) (Bug ID:2141243) , 5.0u11(b01) (Bug ID:2141244) , 1.4.2_14(b01) (Bug ID:2141245) , 7(b03) (Bug ID:2176751)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs 4809532
Submit Date 23-AUG-2006
Description
The code to invalidate a word (defined to be 4 bytes) in the icache in icache.cpp
can segv if

1. The word is the last word in it's line.

2. The line is the last one in its mapped memory segment (e.g., the code cache).

The bad code is in

void AbstractICache::invalidate_word(address addr) {
  // Because this is called for instruction patching on the fly,
  // long after bootstrapping, we execute the stub directly.
  // Account for a 4-byte word spanning two cache lines.
  intptr_t start_line = ((intptr_t)addr + 0) & ~(ICache::line_size - 1);
  intptr_t end_line   = ((intptr_t)addr + 4) & ~(ICache::line_size - 1);
  (*_flush_icache_stub)((address)start_line, start_line == end_line ? 1 : 2, 0);
}

'4' should be '3'.
Posted Date : 2006-08-23 15:13:29.0
Work Around
N/A
Evaluation
Ok.
Posted Date : 2006-08-23 15:13:29.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang