bugOpenEXR - Bugs: bug #37900, Semaphore::wait() gets interrupted...

 
 

bug #37900: Semaphore::wait() gets interrupted on Posix

Submitted by:  None
Submitted on:  Tue 11 Dec 2012 01:39:32 PM UTC  
 
Category: IlmImfSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 23 Jan 2013 06:50:15 PM UTC, comment #1:

Closing out and moving out to:
https://github.com/openexr/openexr/issues/45

Piotr Stanczyk <pstanczyk>
Project Member
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 )
{
}

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pstanczyk (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 23 Jan 2013 06:50:15 PM UTCpstanczykOpen/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1