|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-08-06 10:51 UTC] dharmeshmaniar at rediffmail dot com
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 ?? ()
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 14:00:01 2025 UTC |
This is reproducible with ZTS enabled. Reproduce code: $ cat /var/www/putenv.php <?php putenv("foo=bar"); ?> $ ab -n 10000 -c 100 http://localhost/putenv.php