From:             d...@php.net
Operating system: OpenSolaris 2009.11
PHP version:      5.2.9
PHP Bug Type:     Gettext related
Bug description:  dncgettext crashs if count parameter is negative

Description:
------------
Passing -1 to the count argument of dcngettext leads to a PHP core dump 
on OpenSolaris.






Reproduce code:
---------------
make test TESTS=ext/gettext/tests

will crash when testing dcngettext.phpt

Expected result:
----------------
no crash

Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
0xfedaaa76 in _real_gettext_u () from /lib/libc.so.1
(gdb) bt
#0  0xfedaaa76 in _real_gettext_u () from /lib/libc.so.1
#1  0xfeda8d7a in dcngettext () from /lib/libc.so.1
#2  0x080f8692 in zif_dcngettext (ht=5, return_value=0x83d4b0c, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
    at /export/home/dsp/dev/c/php52/ext/gettext/gettext.c:356
#3  0x08275389 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x8047320) at zend_vm_execute.h:200
#4  0x08274b39 in execute (op_array=0x83d5090) at zend_vm_execute.h:92
#5  0x0825b469 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /export/home/dsp/dev/c/php52/Zend/zend.c:1134
#6  0x08223079 in php_execute_script (primary_file=0x8047a94) at 
/export/home/dsp/dev/c/php52/main/main.c:2023
#7  0x082d7a09 in main (argc=2, argv=0x8047b18) at 
/export/home/dsp/dev/c/php52/sapi/cli/php_cli.c:1133





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

Reply via email to