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

 
 

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

Submitter:  None
Submitted:  Tue 11 Dec 2012 01:39:32 PM UTC
   
 
Category:  IlmImf Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-01-23 pstanczyk Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code