From:             dharmeshmaniar at rediffmail dot com
Operating system: CentOS 3.8
PHP version:      5.2.6
PHP Bug Type:     Reproducible crash
Bug description:  child pid exit Segmentation fault with php5.2.6 in putenv

Description:
------------
When we use putenv in php5.2.6 it generates segmentation fault.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1390175328 (LWP 13275)]
0x009ec303 in strchr () from /lib/tls/libc.so.6

This do not happen every time. The behaviour is random.

We removed put_env from our code and everything is working properly.

No more Segmentation fault after removing putenv.

Note: We are not using any of the 3rd party apps:APC, eAccelerator, Turck
MMCache, ionCube loader, Xcache, Xdebug

Actual result:
--------------
Below is the dump for gdb trace:

[New Thread -1537033312 (LWP 13289)]
[Thread -1211847776 (LWP 13258) exited]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1390175328 (LWP 13275)]
0x009ec303 in strchr () from /lib/tls/libc.so.6
(gdb) where
#0  0x009ec303 in strchr () from /lib/tls/libc.so.6
#1  0x009ace17 in putenv () from /lib/tls/libc.so.6
#2  0x003e2440 in php_putenv_destructor (pe=0xa325bb9c) at
/usr/local/src/php-5.2.5/ext/standard/basic_functions.c:3861
#3  0x0049953c in zend_hash_destroy (ht=0xa35336cc) at
/usr/local/src/php-5.2.5/Zend/zend_hash.c:526
#4  0x003e2e0a in zm_deactivate_basic (type=1, module_number=9,
tsrm_ls=0xa39d1d28) at
/usr/local/src/php-5.2.5/ext/standard/basic_functions.c:4179
#5  0x004940ba in module_registry_cleanup (module=0x9392988,
tsrm_ls=0xa39d1d28) at /usr/local/src/php-5.2.5/Zend/zend_API.c:1968
#6  0x00499814 in zend_hash_apply (ht=0x601f80, apply_func=0x494098
<module_registry_cleanup>, tsrm_ls=0xa39d1d28)
    at /usr/local/src/php-5.2.5/Zend/zend_hash.c:673
#7  0x0048f753 in zend_deactivate_modules (tsrm_ls=0xa39d1d28) at
/usr/local/src/php-5.2.5/Zend/zend.c:838
#8  0x00451594 in php_request_shutdown (dummy=0x0) at
/usr/local/src/php-5.2.5/main/main.c:1459
#9  0x004ff862 in php_handler (r=0x95c86c0) at
/usr/local/src/php-5.2.5/sapi/apache2handler/sapi_apache2.c:471
#10 0x08085f92 in ap_run_handler ()
#11 0x0808635d in ap_invoke_handler ()
#12 0x0806feb5 in ap_process_request ()
#13 0x0806b96d in _start ()
#14 0x095c86c0 in ?? ()
#15 0x00000004 in ?? ()
#16 0x095c86c0 in ?? ()
#17 0x095c86c0 in ?? ()
#18 0x0954d150 in ?? ()
#19 0x0954d060 in ?? ()
#20 0x00000000 in ?? ()



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

Reply via email to