From:             [EMAIL PROTECTED]
Operating system: Linux - Debian Woody
PHP version:      4CVS-2002-12-22 (stable)
PHP Bug Type:     Unknown/Other Function
Bug description:  Ncurses segfaults when ncurses_*() is run without ncurses_init().

<?php
ncurses_init();
ncurses_start_color();
?>
That will work properly.


<?php
ncurses_start_color();
?>
This will cause PHP to segfault with no messages.

'./configure' '--enable-bcmath' '--enable-pcntl' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sysvmsg'  '--enable-tokenizer' '--with-pear'
'--with-curl' '--with-mysql' '--with-gettext' '--with-mcrypt'
'--with-mhash' '--with-ming' '--with-ncurses=/root/ncurses-5.3'
'--with-shmop' '--enable-sockets'

This bug has been tested with the default Ncurses and Ncurses 5.3 with the
same results. This bug occurs in ncurses_start_color() and
ncurses_standout(). It is assumed that it occurs in more functions, but
that is not verified.

Following is a gdb backtrace:

#0  0x0814daf9 in start_color ()
#1  0x0809658f in zif_ncurses_start_color (ht=0, return_value=0x820b864,
this_ptr=0x0, return_value_used=0)
    at /root/php4-STABLE-200212220230/ext/ncurses/ncurses_functions.c:318
#2  0x081434ca in execute (op_array=0x820b964) at
/root/php4-STABLE-200212220230/Zend/zend_execute.c:1598
#3  0x08134238 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /root/php4-STABLE-200212220230/Zend/zend.c:864
#4  0x081124ff in php_execute_script (primary_file=0xbffff9e4) at
/root/php4-STABLE-200212220230/main/main.c:1573
#5  0x0814a4e3 in main (argc=3, argv=0xbffffa54) at
/root/php4-STABLE-200212220230/sapi/cgi/cgi_main.c:1417
-- 
Edit bug report at http://bugs.php.net/?id=21144&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21144&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21144&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21144&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21144&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21144&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21144&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21144&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21144&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21144&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21144&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21144&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21144&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21144&r=isapi

Reply via email to