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

Fix a runtime fault for Windows IOCP w/ memtrack messages. #4094

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

jemc
Copy link
Member

@jemc jemc commented Apr 11, 2022

When the runtime is compiled with -DUSE_MEMTRACK_MESSAGES on
Windows, the code path for asynchronous I/O events wasn't
initializing the pony context prior to its first use,
which would likely cause a runtime crash or other undesirable
behavior.

The -DUSE_MEMTRACK_MESSAGES feature is rarely used, and has
perhaps never been used on Windows, so that explains why
we haven't had a crash reported for this code path.

Now that path has been fixed by rearranging the order of the code.


See this Zulip thread for additional discussion.

When the runtime is compiled with `-DUSE_MEMTRACK_MESSAGES` on
Windows, the code path for asynchronous I/O events wasn't
initializing the pony context prior to its first use,
which would likely cause a runtime crash or other undesirable
behavior.

The `-DUSE_MEMTRACK_MESSAGES` feature is rarely used, and has
perhaps never been used on Windows, so that explains why
we haven't had a crash reported for this code path.

Now that path has been fixed by rearranging the order of the code.
@jemc jemc added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Apr 11, 2022
@jemc jemc requested a review from a team April 11, 2022 02:58
@jemc jemc self-assigned this Apr 11, 2022
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Apr 11, 2022
@SeanTAllen SeanTAllen merged commit ae39e26 into ponylang:main Apr 11, 2022
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Apr 11, 2022
github-actions bot pushed a commit that referenced this pull request Apr 11, 2022
github-actions bot pushed a commit that referenced this pull request Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants