Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hashtable inconsist when specify an invalid path to ini: phar.cache_... #161

Closed
wants to merge 1 commit into from

Conversation

reeze
Copy link
Contributor

@reeze reeze commented Aug 14, 2012

when specify an invalide phar.cache_list in PHP5.3 will report hashtable inconsist.

$php -d phar.cache_list=/invalid a.php

The reason and the fix is almost the same as @laruence ever fixed bug#62597 (segfault in php_stream_wrapper_log_error with ZTS build) in PHP-5.4 e7535e0 .
but crash in different place. so I didn't fill a bug.
either merge or cherry-pick from 5.4 are fine for me :)

BT:

Breakpoint 1, _php_stream_open_wrapper_ex (path=0x100d36838 "/a", mode=0x1009dde00 "rb", options=18, opened_path=0x7fff5fbfe528, context=0x0, __php_stream_call_depth=0, __zend_filename=0x1009e5ba0 "/Users/reeze/Opensource/php-test/php-src-5.3/ext/phar/phar.c", __zend_lineno=1503, __zend_orig_filename=0x0, __zend_orig_lineno=0, tsrm_ls=0x100e03a20) at streams.c:1936
1936        php_stream *stream = NULL;
(gdb) c
Continuing.

Breakpoint 2, php_stream_tidy_wrapper_error_log (wrapper=0x100a9a0a0, tsrm_ls=0x100e03a20) at streams.c:230
230     if (wrapper && FG(wrapper_errors)) {
(gdb) c
Continuing.
/Users/reeze/Opensource/php-test/php-src-5.3/Zend/zend_hash.c(463) : ht=0x10050b050 is inconsistent
/Users/reeze/Opensource/php-test/php-src-5.3/Zend/zend_hash.c(70) : Bailed out without a bailout address!

And this fixed the following failed tests(PHP-5.3):

Phar: copy-on-write test 13 [cache_list] [ext/phar/tests/cache_list/copyonwrite13.phar.phpt]
Phar: copy-on-write test 14 [cache_list] [ext/phar/tests/cache_list/copyonwrite14.phar.phpt]
Phar: copy-on-write test 21 [cache_list] [ext/phar/tests/cache_list/copyonwrite21.phar.phpt]
Phar: copy-on-write test 22 [cache_list] [ext/phar/tests/cache_list/copyonwrite22.phar.phpt]
Phar: copy-on-write test 4a [cache_list] [ext/phar/tests/cache_list/copyonwrite4a.phpt]
Phar front controller other [ext/phar/tests/cache_list/frontcontroller1.phpt]
Phar front controller mime type extension is not a string [cache_list] [ext/phar/tests/cache_list/frontcontroller11.phpt]
Phar front controller PHP test [cache_list] [ext/phar/tests/cache_list/frontcontroller2.phpt]
Phar: phpinfo display 3 [ext/phar/tests/phpinfo_003.phpt]

…he_list

This fixed the following failed tests(This is PHP-5.3 only):

Phar: copy-on-write test 13 [cache_list] [ext/phar/tests/cache_list/copyonwrite13.phar.phpt]
Phar: copy-on-write test 14 [cache_list] [ext/phar/tests/cache_list/copyonwrite14.phar.phpt]
Phar: copy-on-write test 21 [cache_list] [ext/phar/tests/cache_list/copyonwrite21.phar.phpt]
Phar: copy-on-write test 22 [cache_list] [ext/phar/tests/cache_list/copyonwrite22.phar.phpt]
Phar: copy-on-write test 4a [cache_list] [ext/phar/tests/cache_list/copyonwrite4a.phpt]
Phar front controller other [ext/phar/tests/cache_list/frontcontroller1.phpt]
Phar front controller mime type extension is not a string [cache_list] [ext/phar/tests/cache_list/frontcontroller11.phpt]
Phar front controller PHP test [cache_list] [ext/phar/tests/cache_list/frontcontroller2.phpt]
Phar: phpinfo display 3 [ext/phar/tests/phpinfo_003.phpt]
@travisbot
Copy link

This pull request fails (merged 3a083f2 into da14cdd).

@php-pulls
Copy link

Comment on behalf of laruence at php.net:

thanks, fixed in : 8848778

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants