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

[Lilliput/JDK17] Fix OptoRuntime::new_array_nozero_C

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • None
    • repo-lilliput-17
    • hotspot
    • generic
    • generic

    Description

      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);
          }
      ```

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: