src: Check for overflow when resizing AliasedBufferBase by amdoku · Pull Request #31740 · nodejs/node

@nodejs-github-bot added the c++

Issues and PRs that require attention from people who are familiar with C++.

label

Feb 11, 2020

addaleax

@addaleax addaleax added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Feb 11, 2020

devnexen

@addaleax addaleax removed the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Feb 12, 2020

addaleax

@amdoku

When resizing an aliased_buffer check if the new size will overflow.
Added native extension similar to
test/addons/stringbytes-external-exceeded-max.
Added an abort test to regression test the non overflow behaviour.
The Aliased*Array overflow check test introduced a dependency to a
compiled artifact. Add this artifact to the build process in a
similar fashion as test/addons and test/js-native-api do.

@addaleax addaleax added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Mar 29, 2020

addaleax pushed a commit that referenced this pull request

Mar 30, 2020
When resizing an aliased_buffer check if the new size will overflow.

PR-URL: #31740
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

addaleax pushed a commit that referenced this pull request

Mar 30, 2020
Added native extension similar to
test/addons/stringbytes-external-exceeded-max.
Added an abort test to regression test the non overflow behaviour.

PR-URL: #31740
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

addaleax pushed a commit that referenced this pull request

Mar 30, 2020
The Aliased*Array overflow check test introduced a dependency to a
compiled artifact. Add this artifact to the build process in a
similar fashion as test/addons and test/js-native-api do.

PR-URL: #31740
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

addaleax pushed a commit that referenced this pull request

Mar 30, 2020
When resizing an aliased_buffer check if the new size will overflow.

PR-URL: #31740
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

addaleax pushed a commit that referenced this pull request

Mar 30, 2020
Added native extension similar to
test/addons/stringbytes-external-exceeded-max.
Added an abort test to regression test the non overflow behaviour.

PR-URL: #31740
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

addaleax pushed a commit that referenced this pull request

Mar 30, 2020
The Aliased*Array overflow check test introduced a dependency to a
compiled artifact. Add this artifact to the build process in a
similar fashion as test/addons and test/js-native-api do.

PR-URL: #31740
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

addaleax added a commit to addaleax/node that referenced this pull request

Apr 2, 2020
`cp test/addons/.gitignore test/abort/.gitignore`, because the new
addon test in there leaves a build/ folder lying around and somebody
is bound to use `git add .` earlier or later.

Refs: nodejs#31740

richardlau added a commit to richardlau/node-1 that referenced this pull request

Apr 3, 2020
nodejs#31740 added an addon-style test to
`test/abort` that was never run because `test/abort/testcfg.py` uses the
AbortTestConfiguration which inherits from SimpleTestConfiguration which
only finds tests in the root of `test/abort`.

Make AbortTestConfiguration inherit from AddonTestConfiguration and
change AddonTestConfiguration to find the tests in the root of the test
bucket in addition to the subfolders.

Fixup `test-abort-aliased-buffer-overflow` so that it works as intended.

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

addaleax added a commit that referenced this pull request

Apr 5, 2020
`cp test/addons/.gitignore test/abort/.gitignore`, because the new
addon test in there leaves a build/ folder lying around and somebody
is bound to use `git add .` earlier or later.

Refs: #31740

PR-URL: #32624
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

BethGriggs pushed a commit that referenced this pull request

Apr 7, 2020
`cp test/addons/.gitignore test/abort/.gitignore`, because the new
addon test in there leaves a build/ folder lying around and somebody
is bound to use `git add .` earlier or later.

Refs: #31740

PR-URL: #32624
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

targos pushed a commit that referenced this pull request

Apr 12, 2020
`cp test/addons/.gitignore test/abort/.gitignore`, because the new
addon test in there leaves a build/ folder lying around and somebody
is bound to use `git add .` earlier or later.

Refs: #31740

PR-URL: #32624
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

targos pushed a commit that referenced this pull request

Apr 22, 2020
When resizing an aliased_buffer check if the new size will overflow.

PR-URL: #31740
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

targos pushed a commit that referenced this pull request

Apr 22, 2020
Added native extension similar to
test/addons/stringbytes-external-exceeded-max.
Added an abort test to regression test the non overflow behaviour.

PR-URL: #31740
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

targos pushed a commit that referenced this pull request

Apr 22, 2020
The Aliased*Array overflow check test introduced a dependency to a
compiled artifact. Add this artifact to the build process in a
similar fashion as test/addons and test/js-native-api do.

PR-URL: #31740
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

targos pushed a commit that referenced this pull request

Apr 22, 2020
`cp test/addons/.gitignore test/abort/.gitignore`, because the new
addon test in there leaves a build/ folder lying around and somebody
is bound to use `git add .` earlier or later.

Refs: #31740

PR-URL: #32624
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

richardlau added a commit to richardlau/node-1 that referenced this pull request

May 6, 2020
This reverts commit babeb58.

PR-URL: nodejs#33196
Refs: nodejs#31740
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

richardlau added a commit to richardlau/node-1 that referenced this pull request

May 6, 2020
This reverts commit e08ac09.

PR-URL: nodejs#33196
Refs: nodejs#31740
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

codebytere pushed a commit that referenced this pull request

May 7, 2020
This reverts commit babeb58.

PR-URL: #33196
Refs: #31740
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

codebytere pushed a commit that referenced this pull request

May 7, 2020
This reverts commit e08ac09.

PR-URL: #33196
Refs: #31740
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

@amdoku amdoku deleted the check-for-overflow branch

May 8, 2020 20:22

codebytere pushed a commit that referenced this pull request

Jun 7, 2020
This reverts commit babeb58.

PR-URL: #33196
Refs: #31740
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

codebytere pushed a commit that referenced this pull request

Jun 7, 2020
This reverts commit e08ac09.

PR-URL: #33196
Refs: #31740
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>