|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-08-09 18:31 UTC] ryan dot honeyman at emerson dot com
[2010-08-16 02:59 UTC] spektom at gmail dot com
[2011-02-23 07:36 UTC] cduncan at regatta dot com
[2011-03-19 16:14 UTC] expectbug at secureobscure dot com
[2011-06-23 10:18 UTC] spektom at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 08:00:01 2025 UTC |
Description: ------------ When running either my own script or the sample script from php.net php crashes with a segmentation fault. Reproduce code: --------------- <?php ini_set("expect.loguser", "Off"); $stream = fopen("expect://ssh root@remotehost uptime", "r"); $cases = array ( array (0 => "password:", 1 => PASSWORD) ); switch (expect_expectl ($stream, $cases)) { case PASSWORD: fwrite ($stream, "password\n"); break; default: die ("Error was occurred while connecting to the remote host!\n"); } while ($line = fgets($stream)) { print $line; } fclose ($stream); ?> Actual result: -------------- Program received signal SIGSEGV, Segmentation fault. 0x00007ffff4096f73 in exp_printify () from /usr/lib/libexpect.so.5.44.1.14 (gdb) bt #0 0x00007ffff4096f73 in exp_printify () from /usr/lib/libexpect.so.5.44.1.14 #1 0x00007ffff4095e36 in ?? () from /usr/lib/libexpect.so.5.44.1.14 #2 0x00007ffff40961df in exp_expectv () from /usr/lib/libexpect.so.5.44.1.14 #3 0x00007ffff42abe1e in zif_expect_expectl (ht=<value optimised out>, return_value=0xf91020, return_value_ptr=<value optimised out>, this_ptr=<value optimised out>, return_value_used=<value optimised out>) at /build/buildd/php5-5.3.2/pear-build-download/expect-0.2.6/expect.c:290 #4 0x00000000006e611a in ?? () #5 0x00000000006bd400 in execute () #6 0x000000000069512d in zend_execute_scripts () #7 0x0000000000640d98 in php_execute_script () #8 0x0000000000726236 in ?? () #9 0x00007ffff52a7c4d in __libc_start_main () from /lib/libc.so.6 #10 0x000000000042c639 in _start ()