Skip to content
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

aix: fix un-initialized pointer field in fs handle #14071

Conversation

gireeshpunathil
Copy link
Member

In AIX, fs watch close call was corrupting memory in the compiler.
The handle->dir_filename field can be un-initialized, if the watch
is initiated but not event got fired. But the uv_fs_event_stop was
freeing this pointer as if it was malloc'ed, leading to the crash.

Properly initialize handle-dir_filename to avoid a garbage pointer.
Fixes: #13577

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

In AIX, fs watch close call was corrupting memory in the compiler.
The handle->dir_filename field can be un-initialized, if the watch
is initiated but not event got fired. But the uv_fs_event_stop was
freeing this pointer as if it was malloc'ed, leading to the crash.

Properly initialize handle-dir_filename to avoid a garbage pointer.
Fixes: nodejs#13577
@nodejs-github-bot nodejs-github-bot added the libuv Issues and PRs related to the libuv dependency or the uv binding. label Jul 4, 2017
Copy link
Contributor

@refack refack left a comment

Choose a reason for hiding this comment

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

Code LGTM

@refack
Copy link
Contributor

refack commented Jul 4, 2017

@gireeshpunathil you should open a libuv PR as well

@refack refack added aix Issues and PRs related to the AIX platform. flaky-test Issues and PRs related to the tests with unstable failures on the CI. labels Jul 4, 2017
@gireeshpunathil
Copy link
Member Author

@refack -sure.

@bnoordhuis
Copy link
Member

This should go into libuv first and then it will automatically end up in node on the next upgrade (which is probably later this week or next week.) I'll close this, we don't normally float libuv patches.

@bnoordhuis bnoordhuis closed this Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aix Issues and PRs related to the AIX platform. flaky-test Issues and PRs related to the tests with unstable failures on the CI. libuv Issues and PRs related to the libuv dependency or the uv binding.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

async-hooks/test-fseventwrap - Flaky on AIX
4 participants