Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8310662

[Lilliput/JDK17] Fix OptoRuntime::new_array_nozero_C

XMLWordPrintable

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

            rkennke Roman Kennke
            rkennke Roman Kennke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: