File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ PHP                                                                        NEWS
1414- Hash:
1515  . Fixed GH-16711: Segfault in mhash(). (Girgias)
1616
17+ - PCNTL:
18+   . Fixed bug GH-16769: (pcntl_sigwaitinfo aborts on signal value
19+     as reference). (David Carlier)
20+ 
1721- PDO:
1822  . Fixed memory leak of `setFetchMode()`. (SakiTakamachi)
1923
Original file line number Diff line number Diff line change @@ -874,6 +874,7 @@ static bool php_pcntl_set_user_signal_infos(
874874	zval  * user_signal_no ;
875875	ZEND_HASH_FOREACH_VAL (user_signals , user_signal_no ) {
876876		bool  failed  =  true;
877+ 		ZVAL_DEREF (user_signal_no );
877878		zend_long  tmp  =  zval_try_get_long (user_signal_no , & failed );
878879
879880		if  (failed ) {
Original file line number Diff line number Diff line change 1+ --TEST--
2+ pcntl_sigwaitinfo abort when signals is an array with self-reference.
3+ --EXTENSIONS--
4+ pcntl
5+ --SKIPIF--
6+ <?php  if  (!function_exists ("pcntl_sigwaitinfo " )) die ("skip pcntl_sigwaitinfo() not available " ); ?> 
7+ --FILE--
8+ <?php 
9+ $ a0 ] = &$ a
10+ 
11+ try  {
12+ 	pcntl_sigwaitinfo ($ a$ a
13+ } catch (\TypeError   $ e
14+ 	echo  $ egetMessage ();
15+ }
16+ ?> 
17+ --EXPECT--
18+ pcntl_sigwaitinfo(): Argument #1 ($signals) signals must be of type int, array given
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments