From:             rommer at active dot by
Operating system: Centos-3 x86
PHP version:      4.4.4
PHP Bug Type:     IMAP related
Bug description:  segmentation fault in imap_open

Description:
------------
Segmentation fault in function imap_open if script opens
~ 4000 files before.
I have increased __FD_SETSIZE in
/usr/include/bits/typesizes.h
/usr/include/linux/posix_types.h
to 262144 before compiling php (4.4.4, 5.1.6, 4.4.5-dev)


Reproduce code:
---------------
<?                                                                        
                                     
                                                                          
                                     
    $basedir = "/tmp/php_testcase";                                       
                                     
                                                                          
                                     
    if (! file_exists ($basedir)) {                                       
                                     
        mkdir ($basedir, 0700);                                           
                                     
    }                                                                     
                                     
                                                                          
                                     
    $fds = array();                                                       
                                     
    for ($i = 0; $i < 4096; $i++) {                                       
                                     
        $fds[] = fopen ($basedir . '/file_' . $i, 'w');                   
                                     
    }                                                                     
                                     
                                                                          
                                     
    imap_open ('{127.0.0.1:143/imap/notls}INBOX',                         
                                     
               '[EMAIL PROTECTED]', 'test', 64);                              
                                     
                                                                          
                                     
?>

Expected result:
----------------
no segfault

Actual result:
--------------
Segmentation fault.

-- 
Edit bug report at http://bugs.php.net/?id=39726&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39726&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39726&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39726&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=39726&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=39726&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=39726&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=39726&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=39726&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=39726&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=39726&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=39726&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=39726&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=39726&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39726&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=39726&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=39726&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=39726&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39726&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=39726&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=39726&r=mysqlcfg

Reply via email to