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

Update PlatformThread.cpp #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

amg077-motorolasolutions-com

Added handling thread creation failure when _beginthreadex() returns (uintptr_t )-1L. See MSDN:
https://msdn.microsoft.com/en-us/library/kdzttdcb.aspx
for details.
Added errno and _doserrno to exception message.
Reason:
PlatformThread::createNewThread() is a public method. Developer who uses this method expects, that it is enough to catch an exception and next apply usual null pointer checking. Value -1L is different than NULL so it would cause memory access violation on de-reference.

Added handling thread creation failure when  _beginthreadex() returns (uintptr_t )-1L. See MSDN:
https://msdn.microsoft.com/en-us/library/kdzttdcb.aspx
for details.
Added errno and _doserrno to exception message.
Reason:
PlatformThread::createNewThread() is a public method. Developer who uses this method expects, that it is enough to catch an exception and next apply usual null pointer checking. Value -1L is different than NULL so it would cause memory access violation on de-reference.
…lasolutions-com-patch-1

Update PlatformThread.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant