-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: remove unused sync result from ASYNC_CALL #3049
Conversation
I'm 95% sure some APMs use the return value. |
babbc51
to
e3dc2f6
Compare
Updated to only fix the use-after-free without removing the unused sync result because APMs maybe use it. |
@@ -273,8 +273,9 @@ struct fs_req_wrap { | |||
uv_req->result = err; \ | |||
uv_req->path = nullptr; \ | |||
After(uv_req); \ |
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 set req_wrap = nullptr
here?
Aside: the uv_req->path = nullptr
is a memory leak waiting to happen. It's mostly benign now - I think.
e3dc2f6
to
9595025
Compare
Merge? |
CI looks fine except of course stringbytes-external. |
PR-URL: nodejs#3049 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Thanks Karl, landed in ccaaae9. |
@bnoordhuis ... should this land in v4.x before 4.2.0 lts is cut? |
It won't hurt. I've added the tag. |
PR-URL: #3049 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
landed in v4.x-staging as 2314378 |
Fixes use-after-free of req_wrap if uv returns early err