ContinuationHandler generation crashes with null local variables in rest of function

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • 9
    • Affects Version/s: 8u40
    • Component/s: core-libs

      To reproduce:

      sync nashorn-staging to latest.

      remove the check

              if (compiler.getCompilationEnvironment().isCompileRestOf()) {
                  return false;
              }

      from undefinedCheck in CodeGenerator.java

      run

      function(x) {
         return undefined === x;
      }
      f(17);

      Kaboom! Nullpointer exception

            Assignee:
            Attila Szegedi
            Reporter:
            Marcus Lagergren
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: