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

Infinite recursion in Uint8ClampedArray.set

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 8, 9
    • core-libs
    • None
    • b142
    • generic
    • generic

      This is a bug that only manifests itself in specific settings, such as when running the following code in non-optimistic mode:

      var a = new Uint8ClampedArray(10);
      for (var i = 0; i < 10; i++) a[i] = i;

      This leads to endless recursion in NativeUint8ClampedArray.java:198. The problem is that the rint(double) method has double return type instead of int. As a side note, it's strange this bug hasn't been detected before, Uint8ClampedArray is probably not used a lot.

            hannesw Hannes Wallnoefer
            hannesw Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: