Closed
Description
Given this script:
var kMaxLength = process.binding('smalloc').kMaxLength;
console.log(kMaxLength, 'kMaxLength');
var len = 268435440;
var blob = new Buffer(len).toString('utf8');
console.log(len, 'ok');
len = 268435441;
blob = new Buffer(len).toString('utf8');
console.log(len, 'ok');
The output should be:
1073741823 'kMaxLength'
268435440 'ok'
268435441 'ok'
But it actually is:
1073741823 'kMaxLength'
268435440 'ok'
#
# Fatal error in ../deps/v8/src/handles.h, line 48
# CHECK(location_ != NULL) failed
#
==== C stack trace ===============================
1: ??
2: ??
3: ??
4: ??
5: ??
6: ??
7: ??
8: ??
9: ??
Illegal instruction: 4