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

Nashorn: Uint8ClampedArray - Incorrect ToUint8Clamp implementation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • core-libs
    • b10
    • linux_ubuntu

        FULL PRODUCT VERSION :


        A DESCRIPTION OF THE PROBLEM :
        The ToUint8Clamp implementation for Uint8ClampedArray instances does not correctly clamp input values to [0, 255].

        Nashorn version: hg tip 18edd7a1b166

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        jjs> ta = new Uint8ClampedArray(1), ta[0] = 4294967296, ta[0]

        Expected: 255
        Actual: 0


        REPRODUCIBILITY :
        This bug can be reproduced always.

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

                Created:
                Updated:
                Resolved: