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

introduce awaits #4495

Merged
merged 1 commit into from
Jan 2, 2021
Merged

introduce awaits #4495

merged 1 commit into from
Jan 2, 2021

Conversation

alexlamsl
Copy link
Collaborator

No description provided.

@alexlamsl
Copy link
Collaborator Author

@kzc okay this is officially puzzling:

$ node -v
v0.12.18
$ node test/compress

$

Some of the time it does this:

$ node test/compress


#
# Fatal error in ..\..\src\heap\incremental-marking.cc, line 681
# CHECK((0) < (delta)) failed
#

Now, if I do this:

--- a/tools/node.js
+++ b/tools/node.js
@@ -17,6 +17,7 @@ exports.FILES = [

 new Function("exports", function() {
     var code = exports.FILES.map(function(file) {
+console.error('READING', file);
         return fs.readFileSync(file, "utf8");
     });
     code.push("exports.describe_ast = " + describe_ast.toString());

Then it magically works 🤨

@alexlamsl
Copy link
Collaborator Author

alexlamsl commented Jan 2, 2021

$ node --no-incremental-marking test/compress
C:\UglifyJS\test\node.js:3
new Function("exports", require("../tools/node").FILES.map(function(file) {
                                                       ^
TypeError: undefined is not a function
    at Object.<anonymous>
$ node --gc-global test/compress

!!! Failed 363998478901 test case(s).
!!! arguments.js, arrays.js, arrows.js, asm.js, assignments.js, async.js, blocks.js, booleans.js, collapse_vars.js, comparisons.js, concat-strings.js, conditionals.js, const.js, dead-code.js, debugger.js, default-values.js, destructured.js, directives.js, drop-console.js, drop-unused.js, evaluate.js, functions.js, global_defs.js, hoist_props.js, hoist_vars.js, html_comments.js, ie8.js, if_return.js, issue-1034.js, issue-1041.js, issue-1052.js, issue-1105.js, issue-12.js, issue-1202.js, issue-126.js, issue-1261.js, issue-1275.js, issue-1321.js, issue-143.js, issue-1431.js, issue-1443.js, issue-1446.js, issue-1447.js, issue-1569.js, issue-1588.js, issue-1609.js, issue-1639.js, issue-1656.js, issue-1673.js, issue-1704.js, issue-1733.js, issue-1750.js, issue-1770.js, issue-1787.js, issue-1833.js, issue-1943.js, issue-208.js, issue-22.js, issue-2652.js, issue-267.js, issue-269.js, issue-2719.js, issue-281.js, issue-2871.js, issue-2989.js, issue-368.js, issue-3768.js, issue-44.js, issue-59.js, issue-597.js, issue-611.js, issue-637.js, issue-640.js, issue-747.js, issue-751.js, issue-782.js, issue-892.js, issue-913.js, issue-973.js, issue-976.js, issue-979.js, join_vars.js, keep_fargs.js, labels.js, let.js, loops.js, max_line_len.js, merge_vars.js, negate-iife.js, new.js, node_version.js, numbers.js, objects.js, preserve_line.js, properties.js, pure_funcs.js, pure_getters.js, reduce_vars.js, regexp.js, rename.js, return_undefined.js, sandbox.js, sequences.js, side_effects.js, spread.js, string-literal.js, switch.js, transform.js, typeof.js, unicode.js, varify.js, webkit.js, wrap_iife.js

@kzc
Copy link
Contributor

kzc commented Jan 2, 2021

I'm afraid I don't have any ideas except checking what changed in testing since v0.12.18 worked.

@alexlamsl
Copy link
Collaborator Author

The sequence of file sizes onto fs.readFileSync() that triggers some sort of buffer overflow and corrupts the v8 heap. Changing the pattern of heap allocation seems to work around it.

@alexlamsl alexlamsl merged commit 15ef272 into mishoo:master Jan 2, 2021
@alexlamsl alexlamsl deleted the awaits branch January 2, 2021 12:36
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 this pull request may close these issues.

2 participants