Skip to content

'illegal hardware instruction' / core dump on Node v0.10.18 #2

@msiebuhr

Description

@msiebuhr
var g = require('node-gc');

g.on('scavenge', function (i) { console.log('scavenge', i); });
g.on('marksweep', function (i) { console.log('marksweep', i); });

for (var j = 0; j <= 1000; j += 1) {
    var x = new Array(10000);
    for (var i = 0; i < x.length; i += 1) { x[i] = i; }
    for (var i = 0; i < x.length; i += 1) { delete x[i]; }
    process.stdout.write('\r' + j);
}
console.log('\ndone');

Executing it on my local machine always yields

1000
done
scavenge { duration: 18, heapBefore: 5084096, heapAfter: 4965976 }
zsh: illegal hardware instruction (core dumped)  node ./gc-test.js

If I copy/paste it into an interactive Node-session, it dies with the same message at the same point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions