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

Additional arguments to Function.prototype.apply messes up actual arguments passed

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 8u40, 9
    • 9
    • core-libs
    • None
    • b30
    • generic
    • generic

    Backports

      Description

        Script:

        function func(x, y, z) {
           print(x, y, z);
        }

        function g() {
            func.apply(this, arguments, 23);
        }

        g(3, 54, 3);

        Expected: 3 54 3
        Actual: [Ljava.lang.Object;@417213 23 undefined

        8u20 works fine. jdk8u-dev and jdk9-dev have this issue.

        Attachments

          Issue Links

            Activity

              People

                lagergren Marcus Lagergren
                sundar Sundararajan Athijegannathan
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: