Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
assert: Fix deepEqual/deepStrictEqual on equivalent typed arrays#8002
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
feross commented Aug 6, 2016 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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 |
ofrobots commented Aug 7, 2016 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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 <[email protected]> Reviewed-By: Prince John Wesley <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
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 <[email protected]> Reviewed-By: Prince John Wesley <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
jasnell commented Aug 9, 2016
Landed in 387ab62 and a8438a0 |
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 <[email protected]> Reviewed-By: Prince John Wesley <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
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 <[email protected]> Reviewed-By: Prince John Wesley <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
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 <[email protected]> Reviewed-By: Prince John Wesley <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
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 <[email protected]> Reviewed-By: Prince John Wesley <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
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 <[email protected]> Reviewed-By: Prince John Wesley <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
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 <[email protected]> Reviewed-By: Prince John Wesley <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
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 <[email protected]> Reviewed-By: Prince John Wesley <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
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 <[email protected]> Reviewed-By: Prince John Wesley <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
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).