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

Missing range checks in Marlin for JavaFX

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx25
    • javafx
    • None

      During the review of the Unsafe --> FFM conversion in JavaFX a few preexisting issues around range checking were noted. Specifically:

      1. OffHeapArray uses a long for allocating the number of bytes and an int for "used" bytes. Consider whether to change used to be a long. If not, the additional range checking may be needed. Even leaving this aside, we should check both setUsed and incrementUsed to ensure that used <= length.

      2. There is this TODO comment in Renderer.java and RendererAA.java:

                  // suppose _edges.length > _SIZEOF_EDGE_BYTES
                  // so doubling size is enough to add needed bytes
                  // note: throw IOOB if neededSize > 2Gb:

      As Andy noted, this is unclear - is this a TODO to throw IOOBE or a description of what would happen?

            lbourges Laurent Bourgès
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: