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

Don't use oop types for derived pointers

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 17
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Resolved In Build:
      b16

      Description

      The JIT compiler embeds pointers to addresses within an object. These are called derived pointers. When the GC moves objects, these pointers need to be updated explicitly, because the GC only deals with the real oops of the objects (base pointer).

      The code that deals with this uses oop* for the address containing the base pointer. This is fine, the address contains an oop. However, it also uses oop* for the interior pointer, even though the contents is not a valid oop.

      This creates temporary oops that does not conform to the normal requirements for oops. For example, the lower three bits could be set. This makes it problematic to write stricter verification code.

      I propose that we use intptr_t* instead of oop*, and only use oop* when the location is known to contain a valid oop.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stefank Stefan Karlsson
              Reporter:
              stefank Stefan Karlsson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: