-
Bug
-
Resolution: Fixed
-
P2
-
None
-
repo-lilliput-17
-
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);
}
```