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: coerce slice parameters consistenly #9101

Closed
wants to merge 1 commit into
base: master
from

Conversation

@thefourtheye
Contributor

thefourtheye commented Oct 14, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

buffer

Description of change

As shown in #9096, the offset and
end value of the slice call are just coerced to numbers and then
passed to FastBuffer, which internally truncates the mantissa part
if the number is actually a floating point number. This actually
affects the new length of the slice calculation. For example,

> const original = Buffer.from('abcd');
undefined
> original.slice(original.length / 3).toString()
'bc'

This happens because, starting value of the slice is 4 / 3, which is
1.33 (approximately). Now, the length of the slice is calculated as
the difference between the actual length of the buffer and the starting
offset. So, it becomes 2.67 (4 - 1.33). Now, a new FastBuffer is
constructed, with these values, actual buffer object, starting value
which is 1.33 and the the length 2.67. The underlying C++ code
truncates the numbers and they become 1 and 2. That is why the result
is just bc.

This patch makes sure that all the offsets are coerced to an integer.

Fixes: #9096


cc @nodejs/buffer

@jasnell

LGTM if CI is green

lib/buffer.js Outdated
@@ -807,7 +807,7 @@ Buffer.prototype.toJSON = function() {
function adjustOffset(offset, length) {
offset = +offset;
offset = ~~offset;

This comment has been minimized.

@cjihrig

cjihrig Oct 14, 2016

Contributor

It looks like | 0 is used more frequently than ~~ throughout the lib/ code.

This comment has been minimized.

@thefourtheye

thefourtheye Oct 14, 2016

Contributor

@cjihrig Sure. Changed it now.

@thefourtheye thefourtheye force-pushed the thefourtheye:make-buffer-slice-offset-integer branch Oct 14, 2016

lib/buffer.js Outdated
@@ -807,7 +807,7 @@ Buffer.prototype.toJSON = function() {
function adjustOffset(offset, length) {
offset = +offset;
offset = offset | 0;

This comment has been minimized.

@jasnell

jasnell Oct 14, 2016

Member

extremely minor nit... offset |= 0; is even more concise ;-)

@targos

targos approved these changes Oct 14, 2016

LGTM

test/parallel/test-buffer-slice.js Outdated
{
// Test included in https://github.com/nodejs/node/issues/9096
// If the offset or ending value provided is a floating point number, it
// should be coerced to integer consistenly. Otherwise the actual length of

This comment has been minimized.

@targos

targos Oct 14, 2016

Member

typo: consistently

@thefourtheye thefourtheye force-pushed the thefourtheye:make-buffer-slice-offset-integer branch Oct 14, 2016

@thefourtheye

This comment has been minimized.

Contributor

thefourtheye commented Oct 14, 2016

@jasnell @targos Changed according to your suggestions..

lib/buffer.js Outdated
@@ -807,7 +807,7 @@ Buffer.prototype.toJSON = function() {
function adjustOffset(offset, length) {
offset = +offset;
offset |= 0;
if (offset === 0 || Number.isNaN(offset)) {

This comment has been minimized.

@mscdex

mscdex Oct 14, 2016

Contributor

The Number.isNaN(offset) portion of this conditional should be able to be removed with this change since | will cause invalid inputs to always be zero (whereas + will not).

@addaleax

LGTM with @mscdex’ suggestion

test/parallel/test-buffer-slice.js Outdated
// the slice calculation will be messed up.
const original = Buffer.from('1234567890ABCDEFG', 'ascii');
const chunk1 = original.slice(0, original.length / 3);
const chunk2 = original.slice(original.length / 3, 17);

This comment has been minimized.

@addaleax

addaleax Oct 14, 2016

Member

nit: 17 can probably be original.length.

test/parallel/test-buffer-slice.js Outdated
// Test included in https://github.com/nodejs/node/issues/9096
// If the offset or ending value provided is a floating point number, it
// should be coerced to integer consistently. Otherwise the actual length of
// the slice calculation will be messed up.

This comment has been minimized.

@mscdex

mscdex Oct 15, 2016

Contributor

This comment seems a little confusing to me. The offsets are consistently converted to integers (in C++). The real problem is that the end value is calculated in javascript land before it gets passed to C++. If the length calculation (used to determine end) was done inside C++ this wouldn't be an issue.

It's also possible to use floating point numbers with slice() and still get a reasonable result. The only time it becomes an issue is when the end argument is not supplied and start is a floating point number.

This comment has been minimized.

@thefourtheye

thefourtheye Oct 15, 2016

Contributor

You mean to say the slice implementation would be better done in C++?

Honestly, I would prefer to throw an error if the input is not an integer, which would avoid all this.

This comment has been minimized.

@thefourtheye

thefourtheye Oct 15, 2016

Contributor

I removed the text in the comments now and improved the commit log a little.

@thefourtheye thefourtheye force-pushed the thefourtheye:make-buffer-slice-offset-integer branch Oct 15, 2016

buffer: coerce slice parameters consistently
As shown in #9096, the offset and
end value of the `slice` call are coerced to numbers and then passed to
`FastBuffer`, which internally truncates the mantissa part if the number
is actually a floating point number. This actually affects the new
length of the slice calculation. For example,

    > const original = Buffer.from('abcd');
    undefined
    > original.slice(original.length / 3).toString()
    'bc'

This happens because, starting value of the slice is 4 / 3, which is
1.33 (approximately). Now, the length of the slice is calculated as
the difference between the actual length of the buffer and the starting
offset. So, it becomes 2.67 (4 - 1.33). Now, a new `FastBuffer` is
constructed, with the following values as parameters,

 1. actual buffer object,
 2. starting value, which is 1.33 and
 3. the length 2.67.

The underlying C++ code truncates the numbers and they become 1 and 2.
That is why the result is just `bc`.

This patch makes sure that all the offsets are coerced to integers
before any calculations are done.

Fixes: #9096

@thefourtheye thefourtheye force-pushed the thefourtheye:make-buffer-slice-offset-integer branch to 9fc562c Oct 15, 2016

@mscdex

This comment has been minimized.

Contributor

mscdex commented Oct 15, 2016

@trevnorris

This comment has been minimized.

Contributor

trevnorris commented Oct 17, 2016

For any gage how this should work, would be most similar to String#slice().

@thefourtheye

This comment has been minimized.

Contributor

thefourtheye commented Oct 17, 2016

@trevnorris String's slice also works like this only

> const str = "abcd"
undefined
> str.slice(str.length / 3)
'bcd'
> str.slice(str.length / 3, str.length)
'bcd'
@jasnell

This comment has been minimized.

Member

jasnell commented Oct 17, 2016

What would the semver-iness of this change be?

@lpinca

lpinca approved these changes Oct 17, 2016

LGTM

@lpinca

This comment has been minimized.

Member

lpinca commented Oct 17, 2016

I think it's a bugfix.

@cjihrig

This comment has been minimized.

Contributor

cjihrig commented Oct 17, 2016

@jasnell I'd classify it as a bug fix, but if anything substantial relies on the old behavior a lot of angry people could show up :-P

@ChALkeR

This comment has been minimized.

Member

ChALkeR commented Oct 17, 2016

+1 for a bugfix.

@addaleax

This comment has been minimized.

Member

addaleax commented Oct 18, 2016

+1 to considering this a bugfix, too.

CITGM to account for the “but if anything substantial relies on the old behavior” part: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/425

@rvagg rvagg force-pushed the nodejs:master branch 2 times, most recently to 83c7a88 Oct 18, 2016

@jasnell jasnell self-assigned this Oct 18, 2016

@jasnell

This comment has been minimized.

Member

jasnell commented Oct 18, 2016

Landing as a semver-patch!

jasnell added a commit that referenced this pull request Oct 18, 2016

buffer: coerce slice parameters consistently
As shown in #9096, the offset and
end value of the `slice` call are coerced to numbers and then passed to
`FastBuffer`, which internally truncates the mantissa part if the number
is actually a floating point number. This actually affects the new
length of the slice calculation. For example,

    > const original = Buffer.from('abcd');
    undefined
    > original.slice(original.length / 3).toString()
    'bc'

This happens because, starting value of the slice is 4 / 3, which is
1.33 (approximately). Now, the length of the slice is calculated as
the difference between the actual length of the buffer and the starting
offset. So, it becomes 2.67 (4 - 1.33). Now, a new `FastBuffer` is
constructed, with the following values as parameters,

 1. actual buffer object,
 2. starting value, which is 1.33 and
 3. the length 2.67.

The underlying C++ code truncates the numbers and they become 1 and 2.
That is why the result is just `bc`.

This patch makes sure that all the offsets are coerced to integers
before any calculations are done.

Fixes: #9096
PR-URL: #9101
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
@jasnell

This comment has been minimized.

Member

jasnell commented Oct 18, 2016

Landed in ee14690

@jasnell jasnell closed this Oct 18, 2016

jasnell added a commit that referenced this pull request Oct 18, 2016

buffer: coerce slice parameters consistently
As shown in #9096, the offset and
end value of the `slice` call are coerced to numbers and then passed to
`FastBuffer`, which internally truncates the mantissa part if the number
is actually a floating point number. This actually affects the new
length of the slice calculation. For example,

    > const original = Buffer.from('abcd');
    undefined
    > original.slice(original.length / 3).toString()
    'bc'

This happens because, starting value of the slice is 4 / 3, which is
1.33 (approximately). Now, the length of the slice is calculated as
the difference between the actual length of the buffer and the starting
offset. So, it becomes 2.67 (4 - 1.33). Now, a new `FastBuffer` is
constructed, with the following values as parameters,

 1. actual buffer object,
 2. starting value, which is 1.33 and
 3. the length 2.67.

The underlying C++ code truncates the numbers and they become 1 and 2.
That is why the result is just `bc`.

This patch makes sure that all the offsets are coerced to integers
before any calculations are done.

Fixes: #9096
PR-URL: #9101
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>

jasnell added a commit that referenced this pull request Oct 19, 2016

buffer: coerce slice parameters consistently
As shown in #9096, the offset and
end value of the `slice` call are coerced to numbers and then passed to
`FastBuffer`, which internally truncates the mantissa part if the number
is actually a floating point number. This actually affects the new
length of the slice calculation. For example,

    > const original = Buffer.from('abcd');
    undefined
    > original.slice(original.length / 3).toString()
    'bc'

This happens because, starting value of the slice is 4 / 3, which is
1.33 (approximately). Now, the length of the slice is calculated as
the difference between the actual length of the buffer and the starting
offset. So, it becomes 2.67 (4 - 1.33). Now, a new `FastBuffer` is
constructed, with the following values as parameters,

 1. actual buffer object,
 2. starting value, which is 1.33 and
 3. the length 2.67.

The underlying C++ code truncates the numbers and they become 1 and 2.
That is why the result is just `bc`.

This patch makes sure that all the offsets are coerced to integers
before any calculations are done.

Fixes: #9096
PR-URL: #9101
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>

@thefourtheye thefourtheye deleted the thefourtheye:make-buffer-slice-offset-integer branch Oct 19, 2016

@trevnorris

This comment has been minimized.

Contributor

trevnorris commented Oct 27, 2016

@jasnell Did my comment about introducing another bug by using |=, and the test that accompanied that, get overlooked?

@cjihrig

This comment has been minimized.

Contributor

cjihrig commented Oct 27, 2016

@trevnorris it looks like there is a good chance of that. What comment are you referring to? This is the only old comment I'm seeing on this thread.

@@ -807,11 +807,10 @@ Buffer.prototype.toJSON = function() {
function adjustOffset(offset, length) {
offset = +offset;
if (offset === 0 || Number.isNaN(offset)) {
offset |= 0;

This comment has been minimized.

@trevnorris

trevnorris Oct 28, 2016

Contributor

If you want the floor then please use Math.floor(). Using | allows wrap around. One reason why + was used before.

This comment has been minimized.

@trevnorris

trevnorris Oct 28, 2016

Contributor

@thefourtheye

String's slice also works like this only

This fails edge cases. For example:

'abcdefg'.slice(-(-1 >>> 0) - 1) === 'abcdefg';

But as this currently stands offset will be coerced to 2 with the above example.

return 0;
}
if (offset < 0) {
} else if (offset < 0) {

This comment has been minimized.

@trevnorris

trevnorris Oct 28, 2016

Contributor

Here's where the problem lies. There's no range check before the int32 coercion. A large number could fail this.

assert.strictEqual(
buf.slice(buf.length / 3, buf.length).toString(),
'bcd'
);

This comment has been minimized.

@trevnorris

trevnorris Oct 28, 2016

Contributor

If we're making the change to operate like String#slice() then edge case tests should be included. e.g.:

const b = Buffer.from('abcdefg');
assert.strictEqual(b.slice(-(-1 >>> 0) + 1).toString(), b.toString());
@trevnorris

This comment has been minimized.

Contributor

trevnorris commented Oct 28, 2016

@cjihrig oh shiet. this was my first time using the review thing before, and didn't realize I needed to properly submit it before the notes could be seen. just did, and that'll show the regression this introduced.

@cjihrig

This comment has been minimized.

Contributor

cjihrig commented Oct 28, 2016

The old "forgot to submit the review" problem. Got me on multiple PRs the first day I used it :-)

@cjihrig cjihrig referenced this pull request Oct 28, 2016

Merged

buffer: coerce offset using Math.trunc() #9341

3 of 3 tasks complete
@cjihrig

This comment has been minimized.

Contributor

cjihrig commented Oct 28, 2016

@trevnorris reverted the lib/buffer.js changes and used Math.floor() in #9341.

cjihrig added a commit to cjihrig/node-1 that referenced this pull request Nov 5, 2016

buffer: coerce offset using Math.trunc()
This is a partial revert of
14d1a8a, which coerced the offset
of Buffer#slice() using the | operator. This causes some edge
cases to be handled incorrectly. This commit restores the old
behavior, but converts offsets to integers using Math.trunc().
This commit does not revert any tests, and adds an additional
regression test.

Refs: nodejs#9096
Refs: nodejs#9101
PR-URL: nodejs#9341
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>

evanlucas added a commit that referenced this pull request Nov 7, 2016

buffer: coerce offset using Math.trunc()
This is a partial revert of
14d1a8a, which coerced the offset
of Buffer#slice() using the | operator. This causes some edge
cases to be handled incorrectly. This commit restores the old
behavior, but converts offsets to integers using Math.trunc().
This commit does not revert any tests, and adds an additional
regression test.

Refs: #9096
Refs: #9101
PR-URL: #9341
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>

MylesBorins added a commit that referenced this pull request Nov 18, 2016

buffer: coerce slice parameters consistently
As shown in #9096, the offset and
end value of the `slice` call are coerced to numbers and then passed to
`FastBuffer`, which internally truncates the mantissa part if the number
is actually a floating point number. This actually affects the new
length of the slice calculation. For example,

    > const original = Buffer.from('abcd');
    undefined
    > original.slice(original.length / 3).toString()
    'bc'

This happens because, starting value of the slice is 4 / 3, which is
1.33 (approximately). Now, the length of the slice is calculated as
the difference between the actual length of the buffer and the starting
offset. So, it becomes 2.67 (4 - 1.33). Now, a new `FastBuffer` is
constructed, with the following values as parameters,

 1. actual buffer object,
 2. starting value, which is 1.33 and
 3. the length 2.67.

The underlying C++ code truncates the numbers and they become 1 and 2.
That is why the result is just `bc`.

This patch makes sure that all the offsets are coerced to integers
before any calculations are done.

Fixes: #9096
PR-URL: #9101
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>

MylesBorins added a commit that referenced this pull request Nov 18, 2016

buffer: coerce offset using Math.trunc()
This is a partial revert of
14d1a8a, which coerced the offset
of Buffer#slice() using the | operator. This causes some edge
cases to be handled incorrectly. This commit restores the old
behavior, but converts offsets to integers using Math.trunc().
This commit does not revert any tests, and adds an additional
regression test.

Refs: #9096
Refs: #9101
PR-URL: #9341
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>

MylesBorins added a commit that referenced this pull request Nov 19, 2016

buffer: coerce slice parameters consistently
As shown in #9096, the offset and
end value of the `slice` call are coerced to numbers and then passed to
`FastBuffer`, which internally truncates the mantissa part if the number
is actually a floating point number. This actually affects the new
length of the slice calculation. For example,

    > const original = Buffer.from('abcd');
    undefined
    > original.slice(original.length / 3).toString()
    'bc'

This happens because, starting value of the slice is 4 / 3, which is
1.33 (approximately). Now, the length of the slice is calculated as
the difference between the actual length of the buffer and the starting
offset. So, it becomes 2.67 (4 - 1.33). Now, a new `FastBuffer` is
constructed, with the following values as parameters,

 1. actual buffer object,
 2. starting value, which is 1.33 and
 3. the length 2.67.

The underlying C++ code truncates the numbers and they become 1 and 2.
That is why the result is just `bc`.

This patch makes sure that all the offsets are coerced to integers
before any calculations are done.

Fixes: #9096
PR-URL: #9101
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>

MylesBorins added a commit that referenced this pull request Nov 19, 2016

buffer: coerce offset using Math.trunc()
This is a partial revert of
14d1a8a, which coerced the offset
of Buffer#slice() using the | operator. This causes some edge
cases to be handled incorrectly. This commit restores the old
behavior, but converts offsets to integers using Math.trunc().
This commit does not revert any tests, and adds an additional
regression test.

Refs: #9096
Refs: #9101
PR-URL: #9341
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>

@MylesBorins MylesBorins referenced this pull request Nov 22, 2016

Merged

v6.9.2 proposal #9735

MylesBorins added a commit that referenced this pull request Dec 6, 2016

2016-12-06, Version 6.9.2 'Boron' (LTS) Release
This LTS release comes with 144 commits. This includes 47 that are docs
related, 46 that are test related, 15 which are build / tools related,
and 9 commits which are updates to dependencies

Notable Changes:

* buffer:
  - coerce slice parameters consistently
    (Sakthipriyan Vairamani (thefourtheye))
    #9101
* deps:
    - *npm*:
      - upgrade npm to 3.10.9 (Kat Marchán)
       #9286
    - *V8*:
      - Various fixes to destructuring edge cases
        - cherry-pick 3c39bac from V8 upstream (Cristian Cavalli)
          #9138
        - cherry pick 7166503 from upstream v8 (Cristian Cavalli)
          #9173
* gtest:
  - the test reporter now outputs tap comments as yamlish
    (Johan Bergström) #9262
* inspector:
  - inspector now prompts user to use 127.0.0.1 rather than localhost
    (Eugene Ostroukhov) #9451
* tls:
  - fix memory leak when writing data to TLSWrap instance during
    handshake (Fedor Indutny)
    #9586

PR-URL: #9735

MylesBorins added a commit that referenced this pull request Dec 6, 2016

2016-12-06, Version 6.9.2 'Boron' (LTS) Release
This LTS release comes with 144 commits. This includes 47 that are docs
related, 46 that are test related, 15 which are build / tools related,
and 9 commits which are updates to dependencies

Notable Changes:

* buffer:
  - coerce slice parameters consistently
    (Sakthipriyan Vairamani (thefourtheye))
    #9101
* deps:
    - *npm*:
      - upgrade npm to 3.10.9 (Kat Marchán)
       #9286
    - *V8*:
      - Various fixes to destructuring edge cases
        - cherry-pick 3c39bac from V8 upstream (Cristian Cavalli)
          #9138
        - cherry pick 7166503 from upstream v8 (Cristian Cavalli)
          #9173
* gtest:
  - the test reporter now outputs tap comments as yamlish
    (Johan Bergström) #9262
* inspector:
  - inspector now prompts user to use 127.0.0.1 rather than localhost
    (Eugene Ostroukhov) #9451
* tls:
  - fix memory leak when writing data to TLSWrap instance during
    handshake (Fedor Indutny)
    #9586

PR-URL: #9735

MylesBorins added a commit that referenced this pull request Dec 6, 2016

2016-12-06, Version 6.9.2 'Boron' (LTS) Release
This LTS release comes with 144 commits. This includes 47 that are docs
related, 46 that are test related, 15 which are build / tools related,
and 9 commits which are updates to dependencies

Notable Changes:

* buffer:
  - coerce slice parameters consistently
    (Sakthipriyan Vairamani (thefourtheye))
    #9101
* deps:
    - *npm*:
      - upgrade npm to 3.10.9 (Kat Marchán)
       #9286
    - *V8*:
      - Various fixes to destructuring edge cases
        - cherry-pick 3c39bac from V8 upstream (Cristian Cavalli)
          #9138
        - cherry pick 7166503 from upstream v8 (Cristian Cavalli)
          #9173
* gtest:
  - the test reporter now outputs tap comments as yamlish
    (Johan Bergström) #9262
* inspector:
  - inspector now prompts user to use 127.0.0.1 rather than localhost
    (Eugene Ostroukhov) #9451
* tls:
  - fix memory leak when writing data to TLSWrap instance during
    handshake (Fedor Indutny)
    #9586

PR-URL: #9735

imyller added a commit to imyller/meta-nodejs that referenced this pull request Dec 7, 2016

2016-12-06, Version 6.9.2 'Boron' (LTS) Release
    This LTS release comes with 144 commits. This includes 47 that are docs
    related, 46 that are test related, 15 which are build / tools related,
    and 9 commits which are updates to dependencies

    Notable Changes:

    * buffer:
      - coerce slice parameters consistently
        (Sakthipriyan Vairamani (thefourtheye))
        nodejs/node#9101
    * deps:
        - *npm*:
          - upgrade npm to 3.10.9 (Kat Marchan)
           nodejs/node#9286
        - *V8*:
          - Various fixes to destructuring edge cases
            - cherry-pick 3c39bac from V8 upstream (Cristian Cavalli)
              nodejs/node#9138
            - cherry pick 7166503 from upstream v8 (Cristian Cavalli)
              nodejs/node#9173
    * gtest:
      - the test reporter now outputs tap comments as yamlish
        (Johan Bergstrom) nodejs/node#9262
    * inspector:
      - inspector now prompts user to use 127.0.0.1 rather than localhost
        (Eugene Ostroukhov) nodejs/node#9451
    * tls:
      - fix memory leak when writing data to TLSWrap instance during
        handshake (Fedor Indutny)
        nodejs/node#9586

    PR-URL: nodejs/node#9735

Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>

imyller added a commit to imyller/meta-nodejs that referenced this pull request Dec 7, 2016

2016-12-06, Version 6.9.2 'Boron' (LTS) Release
    This LTS release comes with 144 commits. This includes 47 that are docs
    related, 46 that are test related, 15 which are build / tools related,
    and 9 commits which are updates to dependencies

    Notable Changes:

    * buffer:
      - coerce slice parameters consistently
        (Sakthipriyan Vairamani (thefourtheye))
        nodejs/node#9101
    * deps:
        - *npm*:
          - upgrade npm to 3.10.9 (Kat Marchan)
           nodejs/node#9286
        - *V8*:
          - Various fixes to destructuring edge cases
            - cherry-pick 3c39bac from V8 upstream (Cristian Cavalli)
              nodejs/node#9138
            - cherry pick 7166503 from upstream v8 (Cristian Cavalli)
              nodejs/node#9173
    * gtest:
      - the test reporter now outputs tap comments as yamlish
        (Johan Bergstrom) nodejs/node#9262
    * inspector:
      - inspector now prompts user to use 127.0.0.1 rather than localhost
        (Eugene Ostroukhov) nodejs/node#9451
    * tls:
      - fix memory leak when writing data to TLSWrap instance during
        handshake (Fedor Indutny)
        nodejs/node#9586

    PR-URL: nodejs/node#9735

Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment