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

Compressed code throws "Maximum call stack size exceeded" on Chrome #1038

Closed
yurydelendik opened this issue Apr 11, 2016 · 3 comments · Fixed by ember-cli/broccoli-terser-sourcemap#35

Comments

@yurydelendik
Copy link

While it's V8's issue (see https://bugs.chromium.org/p/chromium/issues/detail?id=602262), it's recommended to split really long sequence operators expression (,) so Chrome could consume the output.

Originally reported at mozilla/pdf.js#7044 . Workaround is to use sequences: false option for compressor.

@mishoo
Copy link
Owner

mishoo commented Apr 11, 2016

We already have something like this in place. That allows at most 2000 statements to be joined in a sequence. Should we lower the number? Is there some safe limit?

@yurydelendik
Copy link
Author

Here is output https://gist.github.com/yurydelendik/6b4e578fe080802bac7d554fde3d57f9 of https://github.com/mozilla/pdf.js/blob/master/src/core/glyphlist.js#L29 . There are more than 4000 commas (,) and no ';' in the function body.

@kzc
Copy link
Contributor

kzc commented Apr 11, 2016

Duplicate of bug: #823 Chrome x64 crashes when "sequences" switch ON

The uglify sequence generation limit could conceivably be user settable via sequences=n where n the maximum number of elements in a sequence. This could remain compatible with true and false.

But the thing is this is actually a serious Chrome/V8 bug that could potentially lead to an exploit. I'm at a loss why Google is not addressing this problem in their browser.

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

Successfully merging a pull request may close this issue.

3 participants