-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P2
-
None
-
Affects Version/s: repo-lilliput-17
-
Component/s: hotspot
-
generic
-
generic
There's a severe bug in OptoRuntime::new_array_nozero_C() where we could end up clearing other memory because we add a byte-sized offset to a pointer base:
```
HeapWord* obj = cast_from_oop<HeapWord*>(result);
if (aligned_hs_bytes > hs_bytes) {
Copy::zero_to_bytes(obj + hs_bytes, aligned_hs_bytes - hs_bytes);
}
```
```
HeapWord* obj = cast_from_oop<HeapWord*>(result);
if (aligned_hs_bytes > hs_bytes) {
Copy::zero_to_bytes(obj + hs_bytes, aligned_hs_bytes - hs_bytes);
}
```