Open Rush opened 8 months ago
This resulted in a real-world application issue:
[1] Assertion failed: (size <= imp::kMaxLength && "too large buffer"), function NewBuffer, file nan.h, line 939.
Buffers of 1GB are definitely realistic when dealing with >4k visual data.
The check is implemented here https://github.com/nodejs/nan/blob/e14bdcd1f72d62bca1d541b66da43130384ec213/nan.h#L896
The constant is defined here: https://github.com/nodejs/nan/blob/e14bdcd1f72d62bca1d541b66da43130384ec213/nan.h#L417
I believe it should be 4GB as reported by buffer.constants.MAX_LENGTH (https://nodejs.org/api/buffer.html#bufferkmaxlength)
buffer.constants.MAX_LENGTH
This resulted in a real-world application issue:
Buffers of 1GB are definitely realistic when dealing with >4k visual data.
The check is implemented here https://github.com/nodejs/nan/blob/e14bdcd1f72d62bca1d541b66da43130384ec213/nan.h#L896
The constant is defined here: https://github.com/nodejs/nan/blob/e14bdcd1f72d62bca1d541b66da43130384ec213/nan.h#L417
I believe it should be 4GB as reported by
buffer.constants.MAX_LENGTH
(https://nodejs.org/api/buffer.html#bufferkmaxlength)