# [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/main/main.c branches/PHP_5_4/main/php_globals.h branches/PHP_5_4/main/php_ini.c branches/PHP_5_4/tests/basic/bug54514.phpt trunk/main/main.c trunk/main/php_globals.h trunk/main/p

- Thread: https://externals.io/message/56829
- Original archive: https://news-web.php.net/php.internals/56829
- Started by Pierre Joye on 2011-12-07T11:20:19+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #56829 — Pierre Joye — 2011-12-07T11:20:19+00:00

URL: https://externals.io/message/56829#56829

this patch is not correct, php crashes on startup when a request is initialized.

==7872==    at 0x816204B: php_auto_globals_create_request (php_variables.c:804)
==7872==    by 0x818E564: zend_auto_global_init (zend_compile.c:6694)
==7872==    by 0x81BB0CE: zend_hash_apply (zend_hash.c:716)
==7872==    by 0x818FFEA: zend_activate_auto_globals (zend_compile.c:6704)
==7872==    by 0x81629BE: php_hash_environment (php_variables.c:629)
==7872==    by 0x8154D1C: php_request_startup (main.c:1567)
==7872==    by 0x82507CD: do_cli (php_cli.c:954)
==7872==    by 0x8251403: main (php_cli.c:1356)

or on windows:

php_auto_globals_create_request(const char * name=0x10663298, unsigned
int name_len=8, void * * * tsrm_ls=0x026a4f60)  Line 804 + 0x16
bytes	C
zend_auto_global_init(_zend_auto_global * auto_global=0x029a3620, void
* * * tsrm_ls=0x026a4f60)  Line 6694 + 0x1b bytes	C
zend_hash_apply(_hashtable * ht=0x029ebd40, int (void *, void * * *)*
apply_func=0x1026b880, void * * * tsrm_ls=0x026a4f60)  Line 716 + 0x10
bytes	C
zend_activate_auto_globals(void * * * tsrm_ls=0x026a4f60)  Line 6704 +
0x23 bytes	C
php_hash_environment(void * * * tsrm_ls=0x026a4f60)  Line 629 + 0x9 bytes	C
php_request_startup(void * * * tsrm_ls=0x026a4f60)  Line 1567 + 0x9 bytes	C
do_cli(int argc=6, char * * argv=0x026a4e28, void * * *
tsrm_ls=0x026a4f60)  Line 954 + 0xc bytes	C
main(int argc=6, char * * argv=0x026a4e28)  Line 1356 + 0x11 bytes	C
__tmainCRTStartup()  Line 586 + 0x19 bytes	C
mainCRTStartup()  Line 403	C

> laruence                                 Wed, 07 Dec 2011 10:33:13 +0000
>
> Revision: http://svn.php.net/viewvc?view=revision&revision=320567
>
> Log:
> Implemented FR #54514 (Get php binary path during script execution).
>
> Bug: https://bugs.php.net/54514 (Open) Get php binary path during script execution
>
> Changed paths:
>    U   php/php-src/branches/PHP_5_4/NEWS
>    U   php/php-src/branches/PHP_5_4/main/main.c
>    U   php/php-src/branches/PHP_5_4/main/php_globals.h
>    U   php/php-src/branches/PHP_5_4/main/php_ini.c
>    A   php/php-src/branches/PHP_5_4/tests/basic/bug54514.phpt
>    U   php/php-src/trunk/main/main.c
>    U   php/php-src/trunk/main/php_globals.h
>    U   php/php-src/trunk/main/php_ini.c
>    A   php/php-src/trunk/tests/basic/bug54514.phpt
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> 



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

---

## #56830 — Pierre Joye — 2011-12-07T11:30:54+00:00

URL: https://externals.io/message/56829#56830 · In reply to: #56829

seems to be due to partially generated global table, clean build and I
cannot reproduce the crash anymore. Sorry for the noise :)


> this patch is not correct, php crashes on startup when a request is initialized.


-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
