File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -705,6 +705,29 @@ TEST_P(umfIpcTest, openInTwoIpcHandlers) {
705705    EXPECT_EQ (stat.closeCount , stat.openCount );
706706}
707707
708+ TEST_P (umfIpcTest, PutIPCHandleAfterFree) {
709+     constexpr  size_t  SIZE = 100 ;
710+     umf_test::pool_unique_handle_t  pool = makePool ();
711+     ASSERT_NE (pool.get (), nullptr );
712+ 
713+     void  *ptr = umfPoolMalloc (pool.get (), SIZE);
714+     EXPECT_NE (ptr, nullptr );
715+ 
716+     umf_ipc_handle_t  ipcHandle = nullptr ;
717+     size_t  handleSize = 0 ;
718+     umf_result_t  ret = umfGetIPCHandle (ptr, &ipcHandle, &handleSize);
719+     ASSERT_EQ (ret, UMF_RESULT_SUCCESS);
720+ 
721+     ret = umfPoolFree (pool.get (), ptr);
722+     EXPECT_EQ (ret, UMF_RESULT_SUCCESS);
723+ 
724+     ret = umfPutIPCHandle (ipcHandle);
725+     EXPECT_EQ (ret, UMF_RESULT_SUCCESS);
726+ 
727+     pool.reset (nullptr );
728+     EXPECT_EQ (stat.putCount , stat.getCount );
729+ }
730+ 
708731TEST_P (umfIpcTest, ConcurrentGetConcurrentPutHandles) {
709732    concurrentGetConcurrentPutHandles (false );
710733}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments