-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
src: address coverity warning in node_file.cc #45565
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Address coverity warning that looks like it identifies a potential crash due to using a value after it's been passed into std::move Signed-off-by: Michael Dawson <[email protected]>
nodejs-github-bot
added
c++
Issues and PRs that require attention from people who are familiar with C++.
fs
Issues and PRs related to the fs subsystem / file system.
needs-ci
PRs that need a full CI run.
labels
Nov 21, 2022
This is the coverity warning and it looks like a real problem to me 1584 std::string dirname = path.substr(0,
1585 path.find_last_of(kPathSeparator));
3. Condition dirname != path, taking true branch.
1586 if (dirname != path) {
4. move: path is moved (indicated by std::move(path)).
1587 req_wrap->continuation_data()->PushPath(std::move(path));
1588 req_wrap->continuation_data()->PushPath(std::move(dirname));
5. Falling through to end of if statement.
1589 } else if (req_wrap->continuation_data()->paths().size() == 0) {
1590 err = UV_EEXIST;
1591 continue;
1592 }
1593 uv_fs_req_cleanup(req);
CID 276285 (#1 of 1): Using a moved object (USE_AFTER_MOVE)
6. use_after_move: path is used after it has been already moved.
1594 MKDirpAsync(loop, req, path.c_str(),
1595 req_wrap->continuation_data()->mode(), nullptr);
1596 break;
1597 } |
santigimeno
approved these changes
Nov 21, 2022
daeyeon
approved these changes
Nov 22, 2022
daeyeon
added
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
request-ci
Add this label to start a Jenkins CI on a PR.
labels
Nov 22, 2022
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Nov 22, 2022
13 tasks
lpinca
approved these changes
Nov 23, 2022
16 tasks
JungMinu
approved these changes
Nov 24, 2022
mhdawson
added a commit
that referenced
this pull request
Nov 24, 2022
Address coverity warning that looks like it identifies a potential crash due to using a value after it's been passed into std::move Signed-off-by: Michael Dawson <[email protected]> PR-URL: #45565 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
Landed in a01dbf1 |
ruyadorno
pushed a commit
that referenced
this pull request
Nov 24, 2022
Address coverity warning that looks like it identifies a potential crash due to using a value after it's been passed into std::move Signed-off-by: Michael Dawson <[email protected]> PR-URL: #45565 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
Merged
21 tasks
ErickWendel
pushed a commit
to ErickWendel/node
that referenced
this pull request
Nov 30, 2022
Address coverity warning that looks like it identifies a potential crash due to using a value after it's been passed into std::move Signed-off-by: Michael Dawson <[email protected]> PR-URL: nodejs#45565 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
danielleadams
pushed a commit
that referenced
this pull request
Dec 30, 2022
Address coverity warning that looks like it identifies a potential crash due to using a value after it's been passed into std::move Signed-off-by: Michael Dawson <[email protected]> PR-URL: #45565 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
danielleadams
pushed a commit
that referenced
this pull request
Dec 30, 2022
Address coverity warning that looks like it identifies a potential crash due to using a value after it's been passed into std::move Signed-off-by: Michael Dawson <[email protected]> PR-URL: #45565 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
danielleadams
pushed a commit
that referenced
this pull request
Jan 3, 2023
Address coverity warning that looks like it identifies a potential crash due to using a value after it's been passed into std::move Signed-off-by: Michael Dawson <[email protected]> PR-URL: #45565 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
danielleadams
pushed a commit
that referenced
this pull request
Jan 4, 2023
Address coverity warning that looks like it identifies a potential crash due to using a value after it's been passed into std::move Signed-off-by: Michael Dawson <[email protected]> PR-URL: #45565 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
danielleadams
pushed a commit
that referenced
this pull request
Jan 5, 2023
Address coverity warning that looks like it identifies a potential crash due to using a value after it's been passed into std::move Signed-off-by: Michael Dawson <[email protected]> PR-URL: #45565 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
c++
Issues and PRs that require attention from people who are familiar with C++.
fs
Issues and PRs related to the fs subsystem / file system.
needs-ci
PRs that need a full CI run.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Address coverity warning that looks like
it identifies a potential crash due to using
a value after it's been passed into std::move
Signed-off-by: Michael Dawson [email protected]