Skip to content

Conversation

@apapirovski
Copy link
Contributor

It appears that #18291 broke debug builds on Windows. This should resolve the issue.

@tniessen is currently running a test. If anyone else can try a Windows debug build with this patch applied, that would be appreciated.

Fixes: #18459

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

src

@apapirovski apapirovski added c++ Issues and PRs that require attention from people who are familiar with C++. fast-track PRs that do not need to wait for 48 hours to land. labels Jan 30, 2018
@apapirovski apapirovski requested a review from tniessen January 30, 2018 18:38
@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Jan 30, 2018
@apapirovski
Copy link
Contributor Author

Copy link
Member

@tniessen tniessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests pass: https://ci.nodejs.org/job/node-test-commit-light/196/
This seems to solve the problem. Thanks for the quick fix @apapirovski!

@tniessen
Copy link
Member

It would be great if someone else from @nodejs/platform-windows could confirm that this indeed fixes the issue before fast-tracking this.

@apapirovski
Copy link
Contributor Author

/cc @addaleax @jasnell

src/node.cc Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could replace &args[1] with &args.data()[1] to get rid of the conditional.

(It's legal to create a pointer that points one element beyond the array as long as you don't dereference it - which won't happen if argc == 0 because there won't be elements to copy.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better: replace it with args.begin() + 1, since std::copy works with iterators.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, updated now. Thanks for the feedback.

Copy link
Contributor

@seishun seishun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use either mine or @bnoordhuis's suggestion to avoid the conditional.

@apapirovski
Copy link
Contributor Author

@apapirovski
Copy link
Contributor Author

Landed in 332b56c

@apapirovski apapirovski deleted the fix-18459 branch January 31, 2018 14:36
apapirovski added a commit that referenced this pull request Jan 31, 2018
PR-URL: #18460
Fixes: #18459
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Nikolai Vavilov <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 20, 2018
PR-URL: #18460
Fixes: #18459
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Nikolai Vavilov <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
PR-URL: #18460
Fixes: #18459
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Nikolai Vavilov <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
PR-URL: #18460
Fixes: #18459
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Nikolai Vavilov <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Feb 21, 2018
@MylesBorins
Copy link
Contributor

Needs to land if we backport #18291

MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
PR-URL: nodejs#18460
Fixes: nodejs#18459
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Nikolai Vavilov <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. fast-track PRs that do not need to wait for 48 hours to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debug assertion fails on Windows

8 participants