Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of stack space error in IE 11 when loading shim.min.js from core-js 2.6.0 #463

Closed
theodorejb opened this issue Dec 10, 2018 · 8 comments

Comments

@theodorejb
Copy link

I have an Angular app, and it works fine in all browsers when loading shim.min.js from core-js v2.5.7. However, after updating to core-js v2.6.0, I get an "Out of stack space" error in shim.min.js in IE 11.

I tried switching to the non-minified file and got the same error, on the following line:

return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);

@nicolo-ribaudo
Copy link
Contributor

I'll check it tomorrow

@zloirock
Copy link
Owner

@theodorejb could you add a reproducible example?

@nicolo-ribaudo
Copy link
Contributor

The problem is that $split refers to the function which calls it, I stead of the original $split

@georgechr
Copy link

georgechr commented Dec 11, 2018

+1
Having the same problem.

Looking at the original uncompiled file https://github.com/zloirock/core-js/blob/v2.5.7/modules/es6.regexp.split.js which doesn't have the issue makes me suspect that when it's built the assignment to $split gets optimized out and thus we get this issue

@zloirock a reproducible example is as simple as running 'a'.split('') on the JS console of IE11

@nicolo-ribaudo
Copy link
Contributor

You are right

@lenny1806
Copy link

We are getting the same issue, downgrading to 2.5.7 fixed it for now.

@vytautas-pranskunas-
Copy link

Same issue here

nicolo-ribaudo added a commit to nicolo-ribaudo/core-js that referenced this issue Dec 17, 2018
The minifier correctly inlines an overwritten function, leading to a call
stack overflow error. This commit refactors the code a bit to prevent
the mifnier from inlining that variable.
zloirock added a commit that referenced this issue Dec 17, 2018
@nicolo-ribaudo
Copy link
Contributor

The fix has been merged and it will be released in 2.6.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants