activemq-cpp icon indicating copy to clipboard operation
activemq-cpp copied to clipboard

Update PlatformThread.cpp

Open amg077-motorolasolutions-com opened this issue 7 years ago • 0 comments

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.