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

src: fix ArrayBuffer size for zero fill flag #7142

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

@addaleax addaleax commented Jun 3, 2016

Checklist
  • tests and code linting passes
  • the commit message follows commit guidelines
Affected core subsystem(s)

buffer

Description of change

Use sizeof() of the zero fill flag as the byte length of the zeroFill array buffer rather than 1.

This fixes running debug builds, which have boundary checks for typed array creations from native code enabled.

Fixes: #7140

Labelling this this as dont-land-* like #7082 itself.

Use `sizeof()` of the zero fill flag as the byte length of the
`zeroFill` array buffer rather than `1`.

This fixes running debug builds, which have boundary checks for
typed array creations from native code enabled.

Fixes: nodejs#7140
@addaleax addaleax added buffer Issues and PRs related to the buffer subsystem. c++ Issues and PRs that require attention from people who are familiar with C++. dont-land-on-v5.x labels Jun 3, 2016
@addaleax
Copy link
Member Author

addaleax commented Jun 3, 2016

CI: https://ci.nodejs.org/job/node-test-commit/3642/

/cc @nodejs/buffer

@cjihrig
Copy link
Contributor

cjihrig commented Jun 3, 2016

LGTM

@addaleax addaleax mentioned this pull request Jun 4, 2016
4 tasks
@indutny
Copy link
Member

indutny commented Jun 4, 2016

LGTM

@bnoordhuis
Copy link
Member

Ai, glaringly obvious in hindsight. LGTM.

@seishun
Copy link
Contributor

seishun commented Jun 4, 2016

LGTM

seishun pushed a commit that referenced this pull request Jun 4, 2016
Use `sizeof()` of the zero fill flag as the byte length of the
`zeroFill` array buffer rather than `1`.

This fixes running debug builds, which have boundary checks for
typed array creations from native code enabled.

PR-URL: #7142
Fixes: #7140
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
@seishun
Copy link
Contributor

seishun commented Jun 4, 2016

Landed in ac0665c.

@seishun seishun closed this Jun 4, 2016
@addaleax addaleax deleted the fix-7140 branch June 4, 2016 18:09
@gibfahn gibfahn mentioned this pull request Jun 15, 2017
3 tasks
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. c++ Issues and PRs that require attention from people who are familiar with C++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Fatal error in ..\..\src\factory.cc, line 1837" in Debug build on Windows
5 participants