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

Nashorn: Uint8ClampedArray - Incorrect ToUint8Clamp implementation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b10
    • OS:
      linux_ubuntu

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved: