Uh oh!
There was an error while loading. Please reload this page.
assert: Fix deepEqual/deepStrictEqual on equivalent typed arrays - #8002
assert: Fix deepEqual/deepStrictEqual on equivalent typed arrays#8002feross wants to merge 2 commits into
Conversation
feross
commented
Aug 6, 2016
For some reason, I'm getting the following test error after this change: Any ideas? |
addaleax
commented
Aug 7, 2016
That test failure looks unrelated and it doesn’t happen for me, does it persist or was it just a one-off? (/cc @ofrobots@pavelfeldman@eugeneo? Maybe you would want to create a @nodejs/v8-inspector team or something for easier pinging?) The code change itself looks good to me (thanks for noticing this!). You might want to use something like a trailing |
ofrobots
commented
Aug 7, 2016
I can reproduce the failure on |
addaleax
commented
Aug 7, 2016
@ofrobots |
princejwesley
commented
Aug 7, 2016
I can reproduce the failure on |
The typed array's underlying ArrayBuffer is used in `Buffer.from`. Let's respect it's .byteOffset or .byteLength (i.e. position within the parent ArrayBuffer). Fixes: #8001
Let's test typed arrays which have a .byteOffset and .byteLength (i.e. typed arrays that are slices of parent typed arrays).
feross
commented
Aug 7, 2016
I fixed up the commit message and added a regression test. Thanks, @addaleax! Since the test failures look unrelated, is this ready to merge? |
addaleax
commented
Aug 7, 2016
@feross I obviously can’t speak for everyone here, but this LGTM! The commits will be squashed and the subject line shortened to something at most 50 characters in length; that can be done by you or when landing the PR, though. |
princejwesley
commented
Aug 8, 2016
LGTM |
jasnell
commented
Aug 8, 2016
This is a great catch @feross ... LGTM |
cjihrig
commented
Aug 8, 2016
LGTM |
jasnell
commented
Aug 8, 2016
Another CI run since there was a (seemingly unrelated) failure in the last one, just to be safe: https://ci.nodejs.org/job/node-test-pull-request/3569/ |
The typed array's underlying ArrayBuffer is used in `Buffer.from`. Let's respect it's .byteOffset or .byteLength (i.e. position within the parent ArrayBuffer). Fixes: #8001 PR-URL: #8002 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Let's test typed arrays which have a .byteOffset and .byteLength (i.e. typed arrays that are slices of parent typed arrays). PR-URL: #8002 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
jasnell
commented
Aug 9, 2016
The typed array's underlying ArrayBuffer is used in `Buffer.from`. Let's respect it's .byteOffset or .byteLength (i.e. position within the parent ArrayBuffer). Fixes: #8001 PR-URL: #8002 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Let's test typed arrays which have a .byteOffset and .byteLength (i.e. typed arrays that are slices of parent typed arrays). PR-URL: #8002 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins
commented
Oct 10, 2016
v4.x appears to have the same problem with the example provided in #8001. Buffer.from does not exist in v4.x, but we can replicate this fix with the original buffer interface. Unfortunately there are still failures when the patch is applied @feross or @jasnell would you be willing to look into backporting? |
feross
commented
Oct 10, 2016
@thealphanerd I'd love to, but I don't have the time at the moment. If this doesn't get addressed in a few weeks, feel free to ping me again and I'll do my best :) |
MylesBorins
commented
Nov 14, 2016
@feross any more time lately? |
feross
commented
Nov 23, 2016
@thealphanerd Unfortunately, no. Hopefully someone else can pick this up. |
The typed array's underlying ArrayBuffer is used in `Buffer.from`. Let's respect it's .byteOffset or .byteLength (i.e. position within the parent ArrayBuffer). Fixes: nodejs#8001 PR-URL: nodejs#8002 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Let's test typed arrays which have a .byteOffset and .byteLength (i.e. typed arrays that are slices of parent typed arrays). PR-URL: nodejs#8002 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The typed array's underlying ArrayBuffer is used in `Buffer.from`. Let's respect it's .byteOffset or .byteLength (i.e. position within the parent ArrayBuffer). Fixes: #8001 PR-URL: #8002 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Let's test typed arrays which have a .byteOffset and .byteLength (i.e. typed arrays that are slices of parent typed arrays). PR-URL: #8002 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The typed array's underlying ArrayBuffer is used in `Buffer.from`. Let's respect it's .byteOffset or .byteLength (i.e. position within the parent ArrayBuffer). Fixes: #8001 PR-URL: #8002 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Let's test typed arrays which have a .byteOffset and .byteLength (i.e. typed arrays that are slices of parent typed arrays). PR-URL: #8002 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Checklist
make -j4 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
assert
Description of change
Fix#8001.
The typed array's underlying ArrayBuffer is used in
Buffer.from.Let's respect it's .byteOffset or .byteLength (i.e. position within the
parent ArrayBuffer).