In `HeapRegion::oops_on_memregion_seq_iterate_careful`:
```
HeapWord* cur = block_start(start);
...
{
assert(cur <= start,
"cur: " PTR_FORMAT ", start: " PTR_FORMAT, p2i(cur), p2i(start));
HeapWord* next = cur + block_size(cur);
assert(start < next,
"start: " PTR_FORMAT ", next: " PTR_FORMAT, p2i(start), p2i(next));
}
```
Those assertions are checking postconditions of `block_start` (afterJDK-8283332).
However, the same checkings are already done inside `block_start(...)`.
```
assert(q <= addr, "wrong order for q and addr");
assert(addr < n, "wrong order for addr and n");
```
Remove the duplicate assertions in the caller.
```
HeapWord* cur = block_start(start);
...
{
assert(cur <= start,
"cur: " PTR_FORMAT ", start: " PTR_FORMAT, p2i(cur), p2i(start));
HeapWord* next = cur + block_size(cur);
assert(start < next,
"start: " PTR_FORMAT ", next: " PTR_FORMAT, p2i(start), p2i(next));
}
```
Those assertions are checking postconditions of `block_start` (after
However, the same checkings are already done inside `block_start(...)`.
```
assert(q <= addr, "wrong order for q and addr");
assert(addr < n, "wrong order for addr and n");
```
Remove the duplicate assertions in the caller.
- is blocked by
-
JDK-8283332 G1: Stricter assertion in G1BlockOffsetTablePart::forward_to_block_containing_addr
-
- Resolved
-