VirtualBox

Changes between Initial Version and Version 1 of Ticket #15568, comment 1


Ignore:
Timestamp:
07/06/2016 05:08:00 PM (3 years ago)
Author:
gim
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15568, comment 1

    initial v1  
    1313 
    1414 
    15 On other side thread desctuction happens via nsExceptionService::ThreadDestruct which checks that lock stil alive "if (!lock)" and trying call nsExceptionService::DropThread which use this lock. 
    16 (!) But if lock will be destroed after checking "if (!lock)" and before using it inside DropThread, crash will happen. 
     15On other side thread desctuction happens via nsExceptionService::ThreadDestruct which checks that lock stil alive "if (!lock)" and trying call nsExceptionService::DropThread which use this lock: 
     16{{{ 
     17void nsExceptionService::ThreadDestruct( void *data ) 
     18{ 
     19  if (!lock) { 
     20    // a typical situation is when IPC worker threads that have instantiated 
     21    // exception managers are stopped after nsExceptionService is shut down, 
     22    // which will result into this warning.  disable it. 
     23#if 0     
     24    NS_WARNING("nsExceptionService ignoring thread destruction after shutdown"); 
     25#endif     
     26    return; 
     27  } 
     28  DropThread( (nsExceptionManager *)data ); 
     29} 
     30 
     31void nsExceptionService::DropThread(nsExceptionManager *thread) 
     32{ 
     33    PR_Lock(lock); 
     34    DoDropThread(thread); 
     35    PR_Unlock(lock); 
     36} 
     37}}} 
     38 
     39(!!!) But if lock will be destroyed after checking "if (!lock)" and before using it inside DropThread, crash will happen. 

www.oracle.com
ContactPrivacy policyTerms of Use