openjdk6
  1. openjdk6
  2. OPENJDK6-29

JDK fails to zero jdk_version_info correctly

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: b28, b29, b30
    • Fix Version/s: b31
    • Labels:
      None

      Description

      Function JDK_GetVersionInfo0 is suppose to memset the incoming jdk_version_info struct, info, using the supplied size_t value, info_size, as the byte count. The current code calls

      memset(info, 0, sizeof(info_size));

      i.e. it only zeroes 8 bytes. It should be

      memset(info, 0, info_size);

      This can cause mayhem in the JVM because the flag fields at the end of the struct end up taking values determined by the contents of the stack frame where info is allocated. In particular, it can cause the post-jdk6-b28 GC to enqueue discovered References using the wrong link field which means that no reference processing (including finalization) occurs.

        Activity

          People

          • Assignee:
            andrewhaley
            Reporter:
            andrewdinn
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: