From:
Operating system: Ubuntu 10.10 (x86_64)
PHP version: trunk-SVN-2011-04-20 (SVN)
Package: Unknown/Other Function
Bug Type: Bug
Bug description:get_browser() segmentation fault
Description:
------------
PHP is running as an Apache module. The following configuration was used to
compile PHP:
./configure --with-apxs2=/usr/bin/apxs2 --enable-debug --disable-all
Test script:
---------------
1. Be sure browscap directive is commented out in php.ini
2. Set browscap setting in Apache configuration file, i.e. php_admin_value
browscap "/some/path/browscap.ini"
3. Run the following PHP script:
<?php
ini_set('browscap', '/some/path/browscap.ini');
get_browser();
Expected result:
----------------
Notice or another type of message that indicates a misconfiguration
(browscap directive is of the PHP_INI_SYSTEM type and can not be
set/changed with ini_set() function or in Apache configuration file)
Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff09db2af in zend_hash_find (ht=0x7ffff0e6e100,
arKey=0x7ffff7f6b760 "User-Agent", nKeyLength=109,
pData=0x7fffffffbdb8)
at /a/php-trunk/Zend/zend_hash.c:905
905 p = ht->arBuckets[nIndex];
Full backtrace:
#0 0x00007ffff09db2af in zend_hash_find (ht=0x7ffff0e6e100,
arKey=0x7ffff7f6b760 "User-Agent", nKeyLength=109,
pData=0x7fffffffbdb8)
at /a/php-trunk/Zend/zend_hash.c:905
#1 0x00007ffff08ac3b1 in zif_get_browser (ht=0,
return_value=0x7ffff7f62be8, return_value_ptr=0x0,
this_ptr=0x0, return_value_used=1) at
/a/php-trunk/ext/standard/browscap.c:360
#2 0x00007ffff0a09972 in zend_do_fcall_common_helper_SPEC
(execute_data=0x7ffff7f2e338)
at /a/php-trunk/Zend/zend_vm_execute.h:642
#3 0x00007ffff0a0ffd2 in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0x7ffff7f2e338)
at /a/php-trunk/Zend/zend_vm_execute.h:1963
#4 0x00007ffff0a08077 in execute (op_array=0x7ffff7f611c0)
at /a/php-trunk/Zend/zend_vm_execute.h:410
#5 0x00007ffff09c88a3 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /a/php-trunk/Zend/zend.c:1212
#6 0x00007ffff0933982 in php_execute_script (primary_file=0x7fffffffe670)
at /a/php-trunk/main/main.c:2349
#7 0x00007ffff0b0de48 in php_handler (r=0x7ffff84bbea0)
at /a/php-trunk/sapi/apache2handler/sapi_apache2.c:667
#8 0x00007ffff7fd6310 in ap_run_handler (r=0x7ffff84bbea0) at
/build/buildd/apache2-2.2.16/server/config.c:159
#9 0x00007ffff7fd9c9e in ap_invoke_handler (r=0x7ffff84bbea0)
at /build/buildd/apache2-2.2.16/server/config.c:377
#10 0x00007ffff7fe77b8 in ap_process_request (r=0x7ffff84bbea0)
at /build/buildd/apache2-2.2.16/modules/http/http_request.c:282
#11 0x00007ffff7fe4748 in ap_process_http_connection (c=0x7ffff84adc90)
at /build/buildd/apache2-2.2.16/modules/http/http_core.c:190
#12 0x00007ffff7fddef8 in ap_run_process_connection (c=0x7ffff84adc90)
at /build/buildd/apache2-2.2.16/server/connection.c:43
#13 0x00007ffff7fec177 in child_main (child_num_arg=<value optimized out>)
at /build/buildd/apache2-2.2.16/server/mpm/prefork/prefork.c:662
#14 0x00007ffff7fec446 in make_child (s=0x7ffff8214938, slot=0)
at /build/buildd/apache2-2.2.16/server/mpm/prefork/prefork.c:702
#15 0x00007ffff7feca93 in ap_mpm_run (_pconf=<value optimized out>,
plog=<value optimized out>,
s=<value optimized out>) at
/build/buildd/apache2-2.2.16/server/mpm/prefork/prefork.c:978
#16 0x00007ffff7fc2530 in main (argc=2, argv=0x7fffffffecf8) at
/build/buildd/apache2-2.2.16/server/main.c:742
--
Edit bug report at http://bugs.php.net/bug.php?id=54580&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=54580&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=54580&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=54580&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=54580&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=54580&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=54580&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=54580&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=54580&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=54580&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=54580&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=54580&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=54580&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=54580&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=54580&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54580&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54580&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=54580&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=54580&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=54580&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=54580&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=54580&r=mysqlcfg