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

VerifyError on valid code - arguments initialized as a local var confuses codegenerator

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 8
    • 8
    • core-libs
    • None
    • b108
    • generic
    • generic

    Description


      Thanks for the simplified test case. Even simpler test is as follows:

      function func(obj) {
          var arguments = obj;
          for (var i in arguments) {
          }
          return obj;
      }

      I suspect the issue has to do with handling of 'arguments' shadowing by local var of "magic" arguments. Renaming arguments fixes it. And looks like the loop over arguments is needed as well. I'll file a bug.

      Thanks again,
      -Sundar

       Tal Liron (of nashorn-dev) wrote:
      > Hm, I think the mailing list doesn't support attachments. Here is a link to the file that causes the VerifyError:
      >
      > http://sincerity.googlecode.com/git/components/plugins/javascript-nashorn/libraries/scripturian/plugins/javascript-nashorn.js
      >
      > On 09/13/2013 03:38 PM, Tal Liron wrote:
      >> Hi Attila, I am attaching the file. I didn't attach it originally, because I thought it would be impossible for you to test: it is normally run from within an embedded environment based on Scripturian/Sincerity. However, I am happy say that i tried anyway and the exact same exception is reproducible even with jjs. Note that "jjs --compile-only" completes without error.
      >>
      >> -Tal
      >

      Attachments

        Activity

          People

            attila Attila Szegedi
            sundar Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: