HoriSun / closure-compiler

Automatically exported from code.google.com/p/closure-compiler
0 stars 0 forks source link

Compile remove the body of a final block making a non-terminating program terminate #1182

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile the following code in simple mode:
try {
  throw {};
} catch (x_18) {
  throw x_18;
} finally {
  for (var x_37 = void x_37 in-Boolean) {
  }
  switch(3) {
    case this:
    ;
    case this:
    ;
    case this:
    ;
    case Number:
    ;
    case NaN:
    ;
    case NaN:
    ;
    case this:
    ;
    case 397:
    ;
    case this:
    ;
    case this:
    ;
    case String:
    ;
    case false:
    ;
    default:
    ;
    case this:
    ;
    case NaN:
    ;
    case x_37:
    ;
    case this:
    ;
    case this:
    ;
    case false:
    ;
    case Number:
    ;
  }
  for (Number;;) {
  }
  throw function x_38() {
    this;
    do {
    } while (x_22);
    for (var x_22 = this in undefined) {
    }
    (function x_39() {
      while (this) {
      }
    });
    while (x_38) {
    }
  };
}
2. Run the above code and the compiled code

What is the expected output? 
The compiled code should run into an infinite loop like the above code

What do you see instead?
The compiled code terminated with an error

Please use labels and text to provide additional information.

Original issue reported on code.google.com by zp...@google.com on 19 Dec 2013 at 1:33

GoogleCodeExporter commented 9 years ago
Issue tracking has been migrated to github. Please make any further comments on 
this issue through https://github.com/google/closure-compiler/issues

Original comment by blic...@google.com on 1 May 2014 at 6:31

GoogleCodeExporter commented 9 years ago

Original comment by blic...@google.com on 1 May 2014 at 6:34