Edit report at https://bugs.php.net/bug.php?id=65667&edit=1
ID: 65667 Updated by: fel...@php.net Reported by: imprec at gmail dot com Summary: ftp_nb_continue produces segfault -Status: Open +Status: Feedback Type: Bug Package: FTP related Operating System: OSX PHP Version: 5.5.3 Block user comment: N Private report: N New Comment: Hi, when seeing the backtrace on gdb, please run the following commands (and post the results): p ftp p data p rcvd Thanks. Previous Comments: ------------------------------------------------------------------------ [2013-09-13 16:11:48] imprec at gmail dot com Description: ------------ Running the following code on my OSX produces a segfault, see backtrace (gdb) (gdb) Starting program: /usr/local/bin/php /Users/romain/ftp-script.php Reading symbols for shared libraries +++++++++++++++++++++............................................... done Reading symbols for shared libraries ...................... done Reading symbols for shared libraries .. done Reading symbols for shared libraries .. done Reading symbols for shared libraries ....... done Reading symbols for shared libraries ..... done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 13 at address: 0x0000000000000000 0x0000000100387a75 in _php_stream_write () (gdb) #0 0x0000000100387a75 in _php_stream_write () No symbol table info available. #1 0x000000010013ab6f in ftp_nb_continue_read () No symbol table info available. #2 0x0000000100137c2c in zif_ftp_nb_continue () No symbol table info available. #3 0x00000001003bf524 in dtrace_execute_internal () No symbol table info available. #4 0x00000001004430c2 in zend_do_fcall_common_helper_SPEC () No symbol table info available. #5 0x00000001003f310a in execute_ex () No symbol table info available. #6 0x00000001003bf458 in dtrace_execute_ex () No symbol table info available. #7 0x00000001003ce7ac in zend_execute_scripts () No symbol table info available. #8 0x0000000100374602 in php_execute_script () No symbol table info available. #9 0x0000000100467075 in do_cli () No symbol table info available. #10 0x0000000100465e3d in main () No symbol table info available. (gdb) % Test script: --------------- $connection = ftp_connect('hostname', 21); ftp_login($connection, 'login', 'password'); $localfile = __DIR__ . '/ftpfile'; $start = file_exists($localfile) ? FTP_AUTORESUME : 0; $result = ftp_nb_get($connection, $localfile, '/remotedir/remotefile', FTP_BINARY, $start); while ($result == FTP_MOREDATA) { $result = ftp_nb_continue($connection); } ftp_close($connection); Expected result: ---------------- No seg fault Actual result: -------------- A seg fault ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65667&edit=1