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

ZGC: SoftReferences not always cleared before throwing OOME

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 11
    • 11
    • hotspot
    • gc
    • b19
    • x86
    • linux

        The spec says "All soft references to softly-reachable objects are guaranteed to have been cleared before the virtual machine throws an OutOfMemoryError".

        We currently have a window/race in ZGC, where we can throw OOME before clearing all SoftReferences with a softly-reachable referent. The reason is that the current logic only guarantees that we wait with throwing OOME until the allocating thread have been part of a complete GC cycle, but there no guarantee that the last GC cycle also cleared SoftReferences.

              pliden Per Liden (Inactive)
              pliden Per Liden (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: