Skip to content

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