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
Cherry-pick patch from V8 upstream that fixes instanceof problem#7638
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
addaleax commented Jul 9, 2016
I think you may want to switch the order of the commits here, so that there is no point in the history in which |
fhinkel commented Jul 9, 2016
Oh, you're totally right. Done. |
test/parallel/test-instanceof.js Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use const here and below?
bnoordhuis commented Jul 10, 2016
fhinkel commented Jul 10, 2016
I changed the commit message and the test. @bnoordhuis can you have another look, please? |
addaleax commented Jul 10, 2016
LGTM |
bnoordhuis commented Jul 10, 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.
MylesBorins commented Jul 10, 2016
@bnoordhuis I started playing with making a backport / cherry-pick guide. Is there any other "unwritten rules" you can think of? |
bnoordhuis commented Jul 11, 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.
@thealphanerd "Run the V8 and node.js test suite on the CI". That's about it. EDIT: "Don't forget to bump the patchlevel..." |
Fishrock123 commented Jul 11, 2016
FreeBSD has an 'interesting' error: Not sure what's up with that. Looks like ppc little-endian ubuntu is failing though, and the v8 CI also seems to have some failures. |
bnoordhuis commented Jul 11, 2016
I think it's because it's missing the PPC changes from v8/v8@3a903c4. |
mhdawson commented Jul 11, 2016
Quite possible that there are similar changes for s390 as well. Will look at adding s390 to the v8 test job as well. |
bnoordhuis commented Jul 11, 2016
It doesn't matter for this particular patch (no s390 in v6) but it would be good in general. |
fhinkel commented Jul 11, 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.
Thanks for running the CI. I'll add the PPC and X87 patches. |
fhinkel commented Jul 11, 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.
I cherry-picked the patches for the remaining architectures (not for s390 because it's not in v6). Can you have another look, please? |
addaleax commented Jul 11, 2016
fhinkel commented Jul 11, 2016
Do I need to bump the patch level or are we only doing that for 5.1? |
bnoordhuis commented Jul 11, 2016
Yes, please bump the patchlevel. |
92345b7 to 6657bd3Comparefhinkel commented Jul 11, 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.
Bumped and rebased, so test is added after cherry-picks. |
ofrobots commented Jul 15, 2016
LGTM. |
Original commit message: InstanceOfStub incorrectly interprets the hole as a prototype. Repair this to match what the runtime correctly does, by first checking if the function is a constructor before we access the prototype. [email protected] BUG= Committed: https://crrev.com/2aa070be4fd2960df98905b254f12ed801ef26cd Cr-Commit-Position: refs/heads/master@{#34863} This fixes the behavior of instanceof when the second parameter is not a constructor. Fixes: #7592 PR-URL: #7638 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Original commit message: PPC: InstanceOfStub incorrectly interprets the hole as a prototype. Port 2aa070b Original commit message: Repair this to match what the runtime correctly does, by first checking if the function is a constructor before we access the prototype. [email protected], [email protected], [email protected], [email protected] BUG= Review URL: https://codereview.chromium.org/1811013002 Cr-Commit-Position: refs/heads/master@{#34869} Fixes: #7592 for PPC PR-URL: #7638 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Original commit message: port 2aa070b (r34863) original commit message: Repair this to match what the runtime correctly does, by first checking if the function is a constructor before we access the prototype. BUG= Review URL: https://codereview.chromium.org/1809333002 Cr-Commit-Position: refs/heads/master@{#34880} Fixes: #7592 for X87 PR-URL: #7638 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Ref: #7592. PR-URL: #7638 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]>
PR-URL: #7638 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Notable changes: * **buffer**: * Improve performance of Buffer.from(str, 'hex') and Buffer#write(str, 'hex'). (Christopher Jeffrey) #7602 * Fix creating from zero-length ArrayBuffer. (Ingvar Stepanyan) #7176 * **deps**: * Upgrade to V8 5.0.71.xx. (Ben Noordhuis) #7531 * Backport V8 instanceof bugfix (Franziska Hinkelmann) #7638 * **repl**: Fix issue with function redeclaration. (Prince J Wesley) #7794 * **util**: Fix inspecting of boxed symbols. (Anna Henningsen) #7641 PR-URL: #7782
evanlucas commented Jul 21, 2016
landed in v6.x in 71f84b5...164981a. Thanks! |
Notable changes: * **buffer**: * Improve performance of Buffer.from(str, 'hex') and Buffer#write(str, 'hex'). (Christopher Jeffrey) #7602 * Fix creating from zero-length ArrayBuffer. (Ingvar Stepanyan) #7176 * **deps**: * Upgrade to V8 5.0.71.xx. (Ben Noordhuis) #7531 * Backport V8 instanceof bugfix (Franziska Hinkelmann) #7638 * **repl**: Fix issue with function redeclaration. (Prince J Wesley) #7794 * **util**: Fix inspecting of boxed symbols. (Anna Henningsen) #7641 PR-URL: #7782
bnoordhuis commented Jul 22, 2016
I would have preferred it if this PR had landed as a single commit. We now have commits in our history where the build is known broken on some architectures, making things like git-bisect more difficult. |
fhinkel commented Jul 22, 2016
@bnoordhuis I'm not sure I understand your concern. The test is added after the three cherry-picks, I don't think the build is broken in any of the revisions. Should bumping the patch level be a separate commit or squashed? @thealphanerd where's your cherry-pick guide? |
bnoordhuis commented Jul 22, 2016
Sorry, I must have been thinking of another PR. You're right, here it was just the test that was failing without the PPC changes. I have a preference for bumping the patch level in the same commit. It makes it an atomic unit, easy to roll back. |
Original commit message: InstanceOfStub incorrectly interprets the hole as a prototype. Repair this to match what the runtime correctly does, by first checking if the function is a constructor before we access the prototype. [email protected] BUG= Committed: https://crrev.com/2aa070be4fd2960df98905b254f12ed801ef26cd Cr-Commit-Position: refs/heads/master@{#34863} This fixes the behavior of instanceof when the second parameter is not a constructor. Fixes: nodejs/node#7592 PR-URL: nodejs/node#7638 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Original commit message: PPC: InstanceOfStub incorrectly interprets the hole as a prototype. Port 2aa070b Original commit message: Repair this to match what the runtime correctly does, by first checking if the function is a constructor before we access the prototype. [email protected], [email protected], [email protected], [email protected] BUG= Review URL: https://codereview.chromium.org/1811013002 Cr-Commit-Position: refs/heads/master@{#34869} Fixes: nodejs/node#7592 for PPC PR-URL: nodejs/node#7638 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Original commit message: port 2aa070b (r34863) original commit message: Repair this to match what the runtime correctly does, by first checking if the function is a constructor before we access the prototype. BUG= Review URL: https://codereview.chromium.org/1809333002 Cr-Commit-Position: refs/heads/master@{#34880} Fixes: nodejs/node#7592 for X87 PR-URL: nodejs/node#7638 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]>
PR-URL: nodejs/node#7638 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]>
### Notable changes * **buffer**: * Improve performance of Buffer.from(str, 'hex') and Buffer#write(str, 'hex'). (Christopher Jeffrey) [#7602](nodejs/node#7602) * Fix creating from zero-length ArrayBuffer. (Ingvar Stepanyan) [#7176](nodejs/node#7176) * **deps**: * Upgrade to V8 5.0.71.xx. (Ben Noordhuis) [#7531](nodejs/node#7531) * Backport V8 instanceof bugfix (Franziska Hinkelmann) [#7638](nodejs/node#7638) * **repl**: Fix issue with function redeclaration. (Prince J Wesley) [#7794](nodejs/node#7794) * **util**: Fix inspecting of boxed symbols. (Anna Henningsen) [#7641](nodejs/node#7641)
rvagg commented Oct 19, 2016
@fhinkel do you think this should also land on |
fhinkel commented Oct 19, 2016
@rvagg You mean if the test should be ported to master? Yes, let me do that. Then we can let this die with v6.x. |
rvagg commented Oct 20, 2016
@fhinkel yeah, thanks, it came up as one of the commits on v6.x that are not on v7.x and I just wanted clarification regarding whether this should live on beyond v6.x and getting it on master is obviously the way to do that. |
Add regression test for issue nodejs#7592. The issue was fixed in upstream V8 and this test case was previously added with a manual cherry pick for v6.x. Related to: nodejs#7638 and nodejs#7592.
Add regression test for issue #7592. The issue was fixed in upstream V8 and this test case was previously added with a manual cherry pick for v6.x. Related to: #7638 and #7592. PR-URL: #9178 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Add regression test for issue #7592. The issue was fixed in upstream V8 and this test case was previously added with a manual cherry pick for v6.x. Related to: #7638 and #7592. PR-URL: #9178 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Add regression test for issue #7592. The issue was fixed in upstream V8 and this test case was previously added with a manual cherry pick for v6.x. Related to: #7638 and #7592. PR-URL: #9178 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Checklist
make -j4 test(UNIX)Affected core subsystem(s)
deps V8
Description of change
Float the following patch:
InstanceOfStub incorrectly interprets the hole as a prototype.
https://codereview.chromium.org/1810953002/
Fixes: #7592
/cc @bnoordhuis