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

buffer.kMaxLength returning different value than buffer.constants.MAX_LENGTH #14819

Closed
abegines opened this issue Aug 14, 2017 · 0 comments
Closed
Labels
buffer Issues and PRs related to the buffer subsystem. confirmed-bug Issues with confirmed bugs.

Comments

@abegines
Copy link

  • Version:
    v8.2.1

  • Platform:
    win32 (10.0.14393)

  • Subsystem:
    Buffer

The documentation says...

For buffer.kMaxLength
The largest size allowed for a single Buffer instance
An alias for buffer.constants.MAX_LENGTH

For buffer.constants.MAX_LENGTH:
The largest size allowed for a single Buffer instance
On 32-bit architectures, this value is (2^30)-1 (~1GB). On 64-bit architectures, this value is (2^31)-1 (~2GB).
This value is also available as buffer.kMaxLength.

But when you call the functions, they return different values...

buffer.kMaxLength
2147483647
buffer.constants.MAX_LENGTH
268435440

@vsemozhetbyt vsemozhetbyt added the buffer Issues and PRs related to the buffer subsystem. label Aug 14, 2017
addaleax added a commit to addaleax/node that referenced this issue Aug 14, 2017
This was a typo and accidentally returned the wrong value.

Fixes: nodejs#14819
Ref: nodejs#13467
@targos targos added the confirmed-bug Issues with confirmed bugs. label Aug 14, 2017
starkwang added a commit to starkwang/node that referenced this issue Aug 15, 2017
The value of buffer.constants.MAX_LENGTH is different from
buffer.kMaxLength.This change is to fix it.

Fixes: nodejs#14819
MylesBorins pushed a commit that referenced this issue Sep 10, 2017
This was a typo and accidentally returned the wrong value.

Fixes: #14819
Ref: #13467
PR-URL: #14821
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
MylesBorins pushed a commit that referenced this issue Sep 11, 2017
This was a typo and accidentally returned the wrong value.

Fixes: #14819
Ref: #13467
PR-URL: #14821
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
MylesBorins pushed a commit that referenced this issue Sep 12, 2017
This was a typo and accidentally returned the wrong value.

Fixes: #14819
Ref: #13467
PR-URL: #14821
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. confirmed-bug Issues with confirmed bugs.
Projects
None yet
3 participants