From:             nikic
Operating system: 
PHP version:      Irrelevant
Package:          Reproducible crash
Bug Type:         Bug
Bug description:Segfault when using header_register_callback

Description:
------------
Using header_register_callback may cause crashes due to a double
zval_ptr_dtor.

The double zval_ptr_dtor occurs in 
http://lxr.php.net/xref/PHP_TRUNK/main/SAPI.c#sapi_deactivate in lines 
http://lxr.php.net/xref/PHP_TRUNK/main/SAPI.c#498 and 
http://lxr.php.net/xref/PHP_TRUNK/main/SAPI.c#546.

For me the issue is quite hard to reproduce reliably (especially after 
accidentally removing my only non-random reproduce script ^^), but I think
it 
should be obvious that the double dtoring can cause a segfault if you try
hard.

The issue can be fixed by removing one of the two calls.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=61106&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=61106&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=61106&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=61106&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=61106&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=61106&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=61106&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=61106&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=61106&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=61106&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=61106&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=61106&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=61106&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=61106&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=61106&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=61106&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=61106&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=61106&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=61106&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=61106&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=61106&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=61106&r=mysqlcfg

Reply via email to