-
Notifications
You must be signed in to change notification settings - Fork 215
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 #337, fix memory corruption produced by misplaced memset() #338
Fix #337, fix memory corruption produced by misplaced memset() #338
Conversation
Calling memset too late after assigning the `sem` variable in the code of `OS_BinSemCreate_Impl` caused the data pointed to by `sem` to get corrupted. The issue was not caught by the existing test suite for POSIX OSAL when running on Linux. However running the test suite on macOS revealed the anomalies in the behavior of `pthread_cond_destroy()` which was working on the corrupted memory as was demonstrated in: Calling pthread_cond_destroy results in “Function not implemented” ENOSYS on macOS, https://stackoverflow.com/questions/59560940/calling-pthread-cond-destroy-results-in-function-not-implemented-enosys-on-mac?noredirect=1#comment105301077_59560940 The original commit that introduced the issue is: nasa@bfa7a33
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.
Tested on my Linux dev machine (Ubuntu 18.04 LTS 64 bit) and confirmed everything works as expected.
@skliper I have just signed the individual CLA and sent it to the email address specified in the document. |
@stanislaw could you indicate if this is your personal contribution or as part of work for your company? I need to reference the appropriate CLA for our process. If your other pull requests are different (personal vs company or vice versa), could you indicate there also? Thanks. |
I have just edited the description of this PR. It is individual and I have signed the ICLA and sent it yesterday. |
CCB 20200212 - Approved |
Just a reminder: the individual CLA has been signed on this one. See here. |
Describe the contribution
This PR fixes #337. The exact change has been recommended by @jphickey.
Testing performed
Currently, I cannot test this on Linux only on macOS. As reported in the issue, I confirm that that the issue gets fixed with this change applied. Also, the bug has been confirmed by @jphickey and the changeset is created from his recommendation.
Expected behavior changes
See related issue: #337.
System(s) tested on
Contributor Info - All information REQUIRED for consideration of pull request
Stanislav Pankevich, personal
The signed individual CLA has been sent to the email specified in the CLA document.