Uglifyjs: infinite deep clone in function inlining

Created on 6 Nov 2017  Â·  3Comments  Â·  Source: mishoo/UglifyJS

Bug report or feature request?

bug

ES5 or ES6+ input?

both

Uglify version (uglifyjs -V)

3.1.7

JavaScript input

$ cat clone_bug.js 
!function() {
    function foo() {
        bar();
    }
    function bar() {
        foo();
    }
}();
$ bin/uglifyjs clone_bug.js -c
ERROR: Maximum call stack size exceeded



md5-f506ee0b40e01ec774b6aa4df6a8fdec



$ bin/uglifyjs clone_bug2.js -c
ERROR: Maximum call stack size exceeded
```

related issue: #2438

bug

Most helpful comment

Fixed in #2445
Fixed in #2446.

All 3 comments

@alexlamsl If we mark AST_Lambda instances that have already been inlined that ought to take care of this.

Thanks for isolating this – I now get to have a full head of hair for another decade.

Unfortunately I can only fix this later on this evening, so 3.1.8 will need to wait for (early) tomorrow.

Fixed in #2445
Fixed in #2446.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lhtdesignde picture lhtdesignde  Â·  3Comments

diegocr picture diegocr  Â·  3Comments

alexlamsl picture alexlamsl  Â·  5Comments

gabmontes picture gabmontes  Â·  5Comments

Havunen picture Havunen  Â·  5Comments