Skip to content

Loop with computed name crash node 6.2.0 without message #6883

@todojs

Description

@todojs
  • Version: 6.2.0
  • Platform: Windows 10

This code crash node without notice:

"use strict";

var test = function () {
    var random = 0 | Math.random()*1000;
    var today = Date.now();
    var o = {
        ['prop_' + random] : today,
        random,
        today
    };
};
console.time('test');
for (var n = 0; n < 100000; n++) {
    test();
}
console.timeEnd('test');

When run this simple code, node 6.2.0 end without message. If I reduce the loop from 100.000 to 10.000, the code run perfectly and show

test: 14.188ms

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions