You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tue 11 Dec 2012 01:39:32 PM UTC, original submission:
In ilmbase-1.0.2/IlmThread/IlmThreadSemaphorePosix.cpp, the implementation of Semaphore::wait() does not check for interrupt. As a result, the ThreadPool does not always wait until all threads are finished before deleting the task group, leading to accessing of deleted memory.
Bringing over from Savannah:
https://savannah.nongnu.org/bugs/?37900
Tue 11 Dec 2012 01:39:32 PM UTC, original submission:
In ilmbase-1.0.2/IlmThread/IlmThreadSemaphorePosix.cpp, the implementation of Semaphore::wait() does not check for interrupt. As a result, the ThreadPool does not always wait until all threads are finished before deleting the task group, leading to accessing of deleted memory.
The fix is to change Semaphore::wait() from
::sem_wait( &_semaphore );
to
while( ::sem_wait( &_semaphore ) == -1 && errno == EINTR )
{
}
The text was updated successfully, but these errors were encountered: