Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2176751 | 7 | Paul Hohensee | P3 | Closed | Fixed | b03 |
JDK-2141243 | 6u1 | Paul Hohensee | P4 | Closed | Fixed | b01 |
JDK-2141244 | 5.0u11 | Paul Hohensee | P4 | Closed | Fixed | b01 |
JDK-2141245 | 1.4.2_14 | Chris Phillips | P4 | Closed | Fixed | b01 |
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'.
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'.
- backported by
-
JDK-2176751 icache invalidation code can segv
- Closed
-
JDK-2141243 icache invalidation code can segv
- Closed
-
JDK-2141244 icache invalidation code can segv
- Closed
-
JDK-2141245 icache invalidation code can segv
- Closed