Skip to content

buffer: buffer.constants.MAX_LENGTH is larger than expected #38093

Closed
@Ayase-252

Description

  • Version: v15.12.0
  • Platform: Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
  • Subsystem: buffer

What steps will reproduce the bug?

Run node, then

const buffer = require("buffer")
buffer.constants.MAX_LENGTH

It shows buffer.constants.MAX_LENGTH is 4294967296. (2 ** 32)

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior?

buffer.constants.MAX_LENGTH should be 2147483647. As relevent docs say

What do you see instead?

buffer.constants.MAX_LENGTH is 4294967296

Additional information

Maybe related to #38090
Possibily the impact of Bump TypedArray max length to 2**32-1 elements in v8

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bufferIssues and PRs related to the buffer subsystem.docIssues and PRs related to the documentations.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions