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

JFR: Parser skips too many bytes for fractional types

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 19
    • 14, 17, 19
    • hotspot
    • jfr
    • b11

      A program may only subscribe to events of type X, i.e. EventStream::onEvent("X", ...) and when the parser finds an event of any other type in the file, it doesn't read the contents of the event, instead it skips to the next event.

      The parser can also skip values, for example a String or an integer value, when reading constant data in check point events. This can happen when a constant with a certain ID is already known.

      Problem is that the amount of bytes to skip is incorrect for float and double values. This has gone unnoticed since only native can create constant types and I believe there is no such type today that uses fractional types.

      Today, Double.SIZE bytes (64) and Float.SIZE (32) are skipped instead of Double.BYTES (8) and Float.BYTES (4). The issue was found when implementing file scrubbing.

      We should consider backporting the fix.

            egahlin Erik Gahlin
            egahlin Erik Gahlin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: