Re: [PHP-CVS] com php-src: Fixed Bug #65315 session.hash_function silently fallback to default md5: NEWS ext/session/session.c ext/session/tests/session_hash_function_basic.phpt

2013-08-29 Thread Laruence
Hey:
   I got this test script failed in my box:

 $ cat ext/session/tests/session_hash_function_basic.diff
005+ string(26) 9gjghoikm8eo1lvau5euuh8q61
005- string(32) %s
010+ string(32) jkdcvp3tf1ptsgof9edi515jsbh5p92o
010- string(40) %s
017+ string(32) ecdatafpdf4urjjrje6ver0o87i3hoe8
017- string(40) %s

   I am not sure whether the length of the string is must be a fixed
len, so I leave it to you

thanks


On Fri, Aug 9, 2013 at 5:05 PM, Yasuo Ohgaki yohg...@php.net wrote:
 Commit:b6b425d2cf767e47e9d05fbfe1328f1485a488ef
 Author:Yasuo Ohgaki yohg...@php.net Fri, 9 Aug 2013 18:05:07 
 +0900
 Parents:   c53b425763d4cdbc9dc5708e22c6517dfd5e1e09
 Branches:  master

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=b6b425d2cf767e47e9d05fbfe1328f1485a488ef

 Log:
 Fixed Bug #65315 session.hash_function silently fallback to default md5

 Bugs:
 https://bugs.php.net/65315

 Changed paths:
   M  NEWS
   M  ext/session/session.c
   A  ext/session/tests/session_hash_function_basic.phpt


 Diff:
 diff --git a/NEWS b/NEWS
 index c679b90..02fa05e 100644
 --- a/NEWS
 +++ b/NEWS
 @@ -7,6 +7,10 @@ PHP  
   NEWS
. Implemented internal operator overloading
  (RFC: https://wiki.php.net/rfc/operator_overloading_gmp). (Nikita)

 +- Session:
 +  . Fixed Bug #65315 (session.hash_function silently fallback to default md5)
 +(Yasuo)
 +
  - mysqlnd:
. Disabled flag for SP OUT variables for 5.5+ servers as they are not 
 natively
  supported by the overlying APIs. (Andrey)
 diff --git a/ext/session/session.c b/ext/session/session.c
 index c02a10d..aee3308 100644
 --- a/ext/session/session.c
 +++ b/ext/session/session.c
 @@ -727,6 +727,7 @@ static PHP_INI_MH(OnUpdateHashFunc) /* {{{ */
  }
  #endif /* HAVE_HASH_EXT }}} */

 +   php_error_docref(NULL TSRMLS_CC, E_WARNING, session.configuration 
 'session.hash_function' must be existing hash function. %s does not exist., 
 new_value);
 return FAILURE;
  }
  /* }}} */
 diff --git a/ext/session/tests/session_hash_function_basic.phpt 
 b/ext/session/tests/session_hash_function_basic.phpt
 new file mode 100644
 index 000..8b14a88
 --- /dev/null
 +++ b/ext/session/tests/session_hash_function_basic.phpt
 @@ -0,0 +1,50 @@
 +--TEST--
 +Test session.hash_function ini setting : basic functionality
 +--SKIPIF--
 +?php include('skipif.inc'); ?
 +--FILE--
 +?php
 +
 +ob_start();
 +
 +echo *** Testing session.hash_function : basic functionality ***\n;
 +
 +var_dump(ini_set('session.hash_function', 'md5'));
 +var_dump(session_start());
 +var_dump(!empty(session_id()), session_id());
 +var_dump(session_destroy());
 +
 +var_dump(ini_set('session.hash_function', 'sha1'));
 +var_dump(session_start());
 +var_dump(!empty(session_id()), session_id());
 +var_dump(session_destroy());
 +
 +var_dump(ini_set('session.hash_function', 'none')); // Should fail
 +var_dump(session_start());
 +var_dump(!empty(session_id()), session_id());
 +var_dump(session_destroy());
 +
 +
 +echo Done;
 +ob_end_flush();
 +?
 +--EXPECTF--
 +*** Testing session.hash_function : basic functionality ***
 +string(1) 0
 +bool(true)
 +bool(true)
 +string(32) %s
 +bool(true)
 +string(3) md5
 +bool(true)
 +bool(true)
 +string(40) %s
 +bool(true)
 +
 +Warning: ini_set(): session.hash_func must be existing hash function. none 
 does not exist. in %s/session_hash_function_basic.php on line 17
 +bool(false)
 +bool(true)
 +bool(true)
 +string(40) %s
 +bool(true)
 +Done


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: fixed #65045: mb_convert_encoding breaks well-formed character.: ext/mbstring/libmbfl/filters/mbfilter_utf8.c ext/mbstring/libmbfl/filters/mbfilter_utf8.h ext/mbstring/libmb

2013-07-15 Thread Laruence
Hey:

   I got one test script failed now:
ext/mbstring/tests/illformed_utf_sequences.phpt

   diff is attached..

thanks

On Sun, Jun 30, 2013 at 2:30 PM, Rui Hirokawa hirok...@php.net wrote:
 Commit:c6a7549efcca62346687b0fda5b408b963f5ab2d
 Author:Rui Hirokawa hirok...@php.net Sun, 30 Jun 2013 15:30:45 
 +0900
 Parents:   4d606cf01e5b376cac1ac336f3e54ef480033028
 Branches:  master

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=c6a7549efcca62346687b0fda5b408b963f5ab2d

 Log:
 fixed #65045: mb_convert_encoding breaks well-formed character.

 Bugs:
 https://bugs.php.net/65045

 Changed paths:
   M  ext/mbstring/libmbfl/filters/mbfilter_utf8.c
   M  ext/mbstring/libmbfl/filters/mbfilter_utf8.h
   M  ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-CVS] com php-src: upgraded libmagic to 5.14: NEWS ext/fileinfo/data_file.c ext/fileinfo/libmagic.patch ext/fileinfo/libmagic/apprentice.c ext/fileinfo/libmagic/ascmagic.c ext/fileinfo/libmagi

2013-04-07 Thread Laruence
Hey:
some tests begin fails due to memory leak.

 Bug #61964 (finfo_open with directory cause invalid free)
[ext/fileinfo/tests/bug61964.phpt]
Test finfo_buffer() function : basic functionality
[ext/fileinfo/tests/finfo_buffer_basic.phpt]
Test finfo_buffer() function : error conditions
[ext/fileinfo/tests/finfo_buffer_error.phpt]
Test finfo_buffer() function : basic functionality
[ext/fileinfo/tests/finfo_buffer_variation1.phpt]
Test finfo_close() function : basic functionality
[ext/fileinfo/tests/finfo_close_basic.phpt]
Test finfo_close() function : error conditions
[ext/fileinfo/tests/finfo_close_error.phpt]
Test finfo_file() function : regex rules
[ext/fileinfo/tests/finfo_file_regex.phpt]
Test finfo_open() function : basic functionality
[ext/fileinfo/tests/finfo_open_basic.phpt]
Test finfo_open() function : error functionality
[ext/fileinfo/tests/finfo_open_error.phpt]
Test finfo_open() function : variations in opening
[ext/fileinfo/tests/finfo_open_variation1.phpt]
Test finfo_set_flags() function : basic functionality
[ext/fileinfo/tests/finfo_set_flags_basic.phpt]


thanks


On Mon, Apr 8, 2013 at 4:15 AM, Anatol Belski a...@php.net wrote:

 Commit:10367fa7c6a4a2cf9bee02d8905e284185428f09
 Author:Anatol Belski a...@php.net Sun, 7 Apr 2013 22:15:56
 +0200
 Parents:   39bc1bd25f765726e6cdf15fd663b2c1430d2c8a
 Branches:  PHP-5.4 PHP-5.5 master

 Link:
 http://git.php.net/?p=php-src.git;a=commitdiff;h=10367fa7c6a4a2cf9bee02d8905e284185428f09

 Log:
 upgraded libmagic to 5.14

 Changed paths:
   M  NEWS
   M  ext/fileinfo/data_file.c
   M  ext/fileinfo/libmagic.patch
   M  ext/fileinfo/libmagic/apprentice.c
   M  ext/fileinfo/libmagic/ascmagic.c
   M  ext/fileinfo/libmagic/cdf.c
   M  ext/fileinfo/libmagic/cdf.h
   M  ext/fileinfo/libmagic/cdf_time.c
   M  ext/fileinfo/libmagic/compress.c
   M  ext/fileinfo/libmagic/elfclass.h
   M  ext/fileinfo/libmagic/file.h
   M  ext/fileinfo/libmagic/fsmagic.c
   M  ext/fileinfo/libmagic/funcs.c
   M  ext/fileinfo/libmagic/magic.c
   M  ext/fileinfo/libmagic/magic.h
   M  ext/fileinfo/libmagic/patchlevel.h
   M  ext/fileinfo/libmagic/print.c
   M  ext/fileinfo/libmagic/readcdf.c
   M  ext/fileinfo/libmagic/readelf.c
   M  ext/fileinfo/libmagic/softmagic.c
   M  ext/fileinfo/tests/finfo_file_basic.phpt
   M  ext/fileinfo/tests/finfo_open_error.phpt
   M  ext/fileinfo/tests/magic


 Diff: Diff exceeded maximum size

 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/


Re: [PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: ext/curl/interface.c

2013-04-06 Thread Laruence
Hey:
this is because the merge conflict,  you should see the diff against
5.5 branch


On Sun, Apr 7, 2013 at 1:12 AM, Hannes Magnusson hannes.magnus...@gmail.com
 wrote:

 On Tue, Apr 2, 2013 at 7:15 PM, Xinchen Hui larue...@php.net wrote:
  Commit:6ace9c646b56707723f44c9fa6a46a907e1292f3
  Author:Xinchen Hui larue...@php.net Wed, 3 Apr 2013
 10:15:41 +0800
  Parents:   688f5fc8897fe505de80640a75a290338bf5c2fb
 78a9489f6a7326dd0ce0c2baaf37c94a0a85f931
  Branches:  PHP-5.5
 
  Link:
 http://git.php.net/?p=php-src.git;a=commitdiff;h=6ace9c646b56707723f44c9fa6a46a907e1292f3
 
  Log:
  Merge branch 'PHP-5.4' into PHP-5.5
 
  Conflicts:
  ext/curl/interface.c
 
  Changed paths:
MM  ext/curl/interface.c
 
 
  Diff:
  diff --cc ext/curl/interface.c
  index 0c29e46,ee205a7..ae490b1
  --- a/ext/curl/interface.c
  +++ b/ext/curl/interface.c
  @@@ -1222,6 -914,8 +1222,7 @@@ PHP_MINIT_FUNCTION(curl
  }
 
#ifdef PHP_CURL_URL_WRAPPERS
  +   REGISTER_LONG_CONSTANT(CURL_WRAPPERS_ENABLE, 1, CONST_CS |
 CONST_PERSISTENT);
   -# if HAVE_CURL_VERSION_INFO
  {
  curl_version_info_data *info =
 curl_version_info(CURLVERSION_NOW);
  char **p = (char **)info-protocols;
  @@@ -1235,10 -929,22 +1236,12 @@@
  (void) *p++;
  }
  }
   -# else
   -  php_unregister_url_stream_wrapper(http);
   -  php_register_url_stream_wrapper(http, php_curl_wrapper
 TSRMLS_CC);
   -  php_unregister_url_stream_wrapper(https);
   -  php_register_url_stream_wrapper(https, php_curl_wrapper
 TSRMLS_CC);
   -  php_unregister_url_stream_wrapper(ftp);
   -  php_register_url_stream_wrapper(ftp, php_curl_wrapper
 TSRMLS_CC);
   -  php_unregister_url_stream_wrapper(ftps);
   -  php_register_url_stream_wrapper(ftps, php_curl_wrapper
 TSRMLS_CC);
   -  php_unregister_url_stream_wrapper(ldap);
   -  php_register_url_stream_wrapper(ldap, php_curl_wrapper
 TSRMLS_CC);
   -# endif
  + #else
  +   REGISTER_LONG_CONSTANT(CURL_WRAPPERS_ENABLE, 0, CONST_CS |
 CONST_PERSISTENT);
#endif
 
   +  curlfile_register_class(TSRMLS_C);
   +

 I can't see that function doing anything even similar? Are you sure
 this is correct?

 -Hannes




-- 
Laruence  Xinchen Hui
http://www.laruence.com/


Re: [PHP-CVS] com php-src: Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').: NEWS Zend/zend_language_parser.y

2013-04-05 Thread Laruence
Hey:
I found another way, which will not break bison 2.3 support.

that is,  move the YYPARSE_PARAM definition into zend.h, or other
header file which will always include  before zend_language_parser.h and
also include by zend_language_parse.c

what do you think?

thanks


On Thu, Apr 4, 2013 at 9:24 PM, Johannes Schlüter johan...@schlueters.dewrote:

 On Wed, 2013-04-03 at 19:04 +0800, Laruence wrote:
  Hey:
 remi did,  see https://bugs.php.net/bug.php?id=64503
 
 but seems start from 2.4.1

 Then please update Zend/acinclude.m4: accordingly.

 johannes





-- 
Laruence  Xinchen Hui
http://www.laruence.com/


Re: [PHP-CVS] com php-src: Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').: NEWS Zend/zend_language_parser.y

2013-04-05 Thread Laruence
Hey:
the reason I am not sure about that is, the YYPARSE_PARAM is an bison
specific macro, so it's a little weird if we define  them in another header
file...

   thanks


On Fri, Apr 5, 2013 at 11:13 PM, Laruence larue...@php.net wrote:

 Hey:
 I found another way, which will not break bison 2.3 support.

 that is,  move the YYPARSE_PARAM definition into zend.h, or other
 header file which will always include  before zend_language_parser.h and
 also include by zend_language_parse.c

 what do you think?

 thanks


 On Thu, Apr 4, 2013 at 9:24 PM, Johannes Schlüter 
 johan...@schlueters.dewrote:

 On Wed, 2013-04-03 at 19:04 +0800, Laruence wrote:
  Hey:
 remi did,  see https://bugs.php.net/bug.php?id=64503
 
 but seems start from 2.4.1

 Then please update Zend/acinclude.m4: accordingly.

 johannes





 --
 Laruence  Xinchen Hui
 http://www.laruence.com/




-- 
Laruence  Xinchen Hui
http://www.laruence.com/


Re: [PHP-CVS] com php-src: Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').: NEWS Zend/zend_language_parser.y

2013-04-03 Thread Laruence
On Wed, Apr 3, 2013 at 4:56 PM, Johannes Schlüter johan...@schlueters.dewrote:

 Hi,

 On Mon, 2013-03-25 at 15:48 +, Xinchen Hui wrote:
  +%code requires {
  +#ifdef ZTS
  +# define YYPARSE_PARAM tsrm_ls
  +# define YYLEX_PARAM tsrm_ls
  +#endif
  +}
  +

 This doesn't seem to work with bison 2.3, either we have to increase the
 bison dependency or find another fix. Bison 2.3 is default with at least
 Solaris 11.

 $ bison --version
 bison (GNU Bison) 2.3
 [...]
 $ ./config.nice
 [...]
 configure:5229: checking for bison version
 configure:5249: result: 2.3 (ok)
 [...]
 $ bison -y -p zend -v -d Zend/zend_language_parser.y -o
 Zend/zend_language_parser.c
 Zend/zend_language_parser.y:50.1-5: invalid directive: `%code'
 Zend/zend_language_parser.y:50.7-14: syntax error, unexpected identifier


Hey:
yes, %code is introduced in bison 2.3+(it is said is 2.3a) .

so, maybe we need to drop supports of 2.3 in 5.5 release, or revert
this fix,, wait for somethings (like one year)

thanks


johannes





-- 
Laruence  Xinchen Hui
http://www.laruence.com/


Re: [PHP-CVS] com php-src: Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').: NEWS Zend/zend_language_parser.y

2013-04-03 Thread Laruence
On Wed, Apr 3, 2013 at 6:44 PM, Johannes Schlüter johan...@schlueters.dewrote:

 On Wed, 2013-04-03 at 18:26 +0800, Laruence wrote:
 
  Hey: yes, %code is introduced in bison 2.3+(it is said is 2.3a) .
 
  so, maybe we need to drop supports of 2.3 in 5.5 release, or
  revert this fix,, wait for somethings (like one year)
 
  thanks
 
 Bison 2.4 is from November 2008. As this is needed by developers only I
 think it's absolutely fine to depend on 4 year old software. I haven't
 tested with 2.4. If somebody does/did we should modify the configure
 check.

Hey:
   remi did,  see https://bugs.php.net/bug.php?id=64503

   but seems start from 2.4.1

thanks


 johannes





-- 
Laruence  Xinchen Hui
http://www.laruence.com/


Re: [PHP-CVS] com php-src: fix return value: ext/opcache/config.m4

2013-03-25 Thread Laruence
On Mon, Mar 25, 2013 at 2:43 PM, Stanislav Malyshev s...@php.net wrote:
 Commit:016fbd99914e51b686791fa5acf367cd2d9c35b8
 Author:Stanislav Malyshev s...@php.net Sun, 24 Mar 2013 
 23:43:25 -0700
 Parents:   385d0e52cc527393269a48f2fdd01aa1541b4e1f
 Branches:  PHP-5.5 master

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=016fbd99914e51b686791fa5acf367cd2d9c35b8

 Log:
 fix return value

 Changed paths:
   M  ext/opcache/config.m4


 Diff:
 diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
 index 70cd4e9..81b06e9 100644
 --- a/ext/opcache/config.m4
 +++ b/ext/opcache/config.m4
 @@ -356,7 +356,7 @@ extern int lock_file;
  #  error Don't know how to define struct flock
  # endif
  #endif
 -void main() {}
 +void main() { return 0; }
int main() ?
  ], [], [AC_MSG_ERROR([Don't know how to define struct flock on this 
 system[,] set --enable-opcache=no])], [])

PHP_NEW_EXTENSION(opcache,


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fix zend_dval_to_lval outside 64bit integers range: Zend/tests/bug39018.phpt Zend/tests/dval_to_lval_32.phpt Zend/tests/dval_to_lval_64.phpt Zend/zend_operators.h

2013-02-23 Thread Laruence
) {
 +   dmod += two_pow_32;
 +   }
 +   return (long)(unsigned long)dmod;
 }
 -   return (long) d;
 +   return (long)d;
  }
  #else
  static zend_always_inline long zend_dval_to_lval(double d)
  {
 /* = as (double)LONG_MAX is outside signed range */
 -   if (d = LONG_MAX) {
 -   return (long)(unsigned long) d;
 +   if (d = LONG_MAX || d  LONG_MIN) {
 +   double  two_pow_64 = pow(2., 64.),
 +   dmod;
 +
 +   dmod = fmod(d, two_pow_64);
 +   if (dmod  0) {
 +   dmod += two_pow_64;
 +   }
 +   return (long)(unsigned long)dmod;
 }
 -   return (long) d;
 +   return (long)d;
  }
  #endif
  /* }}} */


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #64135 (Exceptions from set_error_handler are not always propagated): NEWS Zend/tests/bug61767.phpt Zend/zend_vm_def.h Zend/zend_vm_execute.h

2013-02-16 Thread Laruence
On Fri, Feb 8, 2013 at 8:36 PM, Nikita Popov nikita@gmail.com wrote:
 On Fri, Feb 8, 2013 at 4:11 AM, Laruence larue...@php.net wrote:

 On Fri, Feb 8, 2013 at 3:36 AM, Nikita Popov nikita@gmail.com wrote:
  On Thu, Feb 7, 2013 at 4:44 PM, Xinchen Hui larue...@php.net wrote:
 
  Commit:290509755ac4a3279b2b31b899aa9f2dd780f5f4
  Author:Xinchen Hui larue...@php.net Thu, 7 Feb 2013
  23:44:46
  +0800
  Parents:   0547a36e95ec36025a30e93e971d26b6b1ecf0e9
  Branches:  PHP-5.5
 
  Link:
 
  http://git.php.net/?p=php-src.git;a=commitdiff;h=290509755ac4a3279b2b31b899aa9f2dd780f5f4
 
  Log:
  Fixed bug #64135 (Exceptions from set_error_handler are not always
  propagated)
 
 
  Is there any particular reason why the exception check was added only
  the
  that error branch? Can't it be done right after the GET_OP1_OBJ_ZVAL_PTR
  in
  http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2442? This way it
  would
  cover the other error conditions as well.
 Hey:

 could you please example one, which will trigger a error(warning,
 notice) out of that branch?


 Looking at the code a bit more, you are right, those branches can't be
 reached. The only warning that the GET_ZVAL_PTR can trigger is an undefined
 variable in which case the return value will be an uninited zval, which will
 always use the last error branch.

 What I did notice though is that this commit just fixes one out of very many
 cases where something like this or something similar could occur. E.g. just
 a few lines above it the same problem exists:
 http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2432

 So if you change the test code from $undefinedObject-$definedMethod() to
 $definedObject-$undefinedMethod() or $undefinedObject-$undefinedMethod()
 it will still fail.

 A few lines higher FETCH_CLASS has the same problem
 (http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2398). Going down a
 bit INIT_STATIC_METHOD_CALL has this too:
 http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2548.
 INIT_FCALL_BY_NAME also has this:
 http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2753 So you can trigger
 it with just $undefined() too. Again the same thing in THROW:
 http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2963 (throw
 $undefined;).

thanks for the notice. you are right , there are some similar issues
need to be fixed.



 I could continue this list, but I think you get the point ^^ This issue
 exists pretty much everywhere where a ZVAL_PTR fetch is followed by some
 error condition that can happen when the zval is NULL. And we have a *lot*
 of those. So I'm not sure that it really makes sense to fix one of those
 cases and leave 50 others intact. Either this should be fixed generically
 (e.g. on the side of GET_ZVAL_PTR, though that might incur a performance
 penalty) or should be just left alone.

or , we fix one when we found one.

thanks

 Thanks,
 Nikita



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #64135 (Exceptions from set_error_handler are not always propagated): NEWS Zend/tests/bug61767.phpt Zend/zend_vm_def.h Zend/zend_vm_execute.h

2013-02-16 Thread Laruence
Hey:

  I fixed these issues, and extra one clone issue,  committed here:
https://github.com/php/php-src/commit/75742d57eb34c2c1c4d23d55f9b9ee44939b32c2

  and if you can find more, please tell me,  it will be appreciated.

thanks

On Sat, Feb 16, 2013 at 10:25 PM, Laruence larue...@php.net wrote:
 On Fri, Feb 8, 2013 at 8:36 PM, Nikita Popov nikita@gmail.com wrote:
 On Fri, Feb 8, 2013 at 4:11 AM, Laruence larue...@php.net wrote:

 On Fri, Feb 8, 2013 at 3:36 AM, Nikita Popov nikita@gmail.com wrote:
  On Thu, Feb 7, 2013 at 4:44 PM, Xinchen Hui larue...@php.net wrote:
 
  Commit:290509755ac4a3279b2b31b899aa9f2dd780f5f4
  Author:Xinchen Hui larue...@php.net Thu, 7 Feb 2013
  23:44:46
  +0800
  Parents:   0547a36e95ec36025a30e93e971d26b6b1ecf0e9
  Branches:  PHP-5.5
 
  Link:
 
  http://git.php.net/?p=php-src.git;a=commitdiff;h=290509755ac4a3279b2b31b899aa9f2dd780f5f4
 
  Log:
  Fixed bug #64135 (Exceptions from set_error_handler are not always
  propagated)
 
 
  Is there any particular reason why the exception check was added only
  the
  that error branch? Can't it be done right after the GET_OP1_OBJ_ZVAL_PTR
  in
  http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2442? This way it
  would
  cover the other error conditions as well.
 Hey:

 could you please example one, which will trigger a error(warning,
 notice) out of that branch?


 Looking at the code a bit more, you are right, those branches can't be
 reached. The only warning that the GET_ZVAL_PTR can trigger is an undefined
 variable in which case the return value will be an uninited zval, which will
 always use the last error branch.

 What I did notice though is that this commit just fixes one out of very many
 cases where something like this or something similar could occur. E.g. just
 a few lines above it the same problem exists:
 http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2432

 So if you change the test code from $undefinedObject-$definedMethod() to
 $definedObject-$undefinedMethod() or $undefinedObject-$undefinedMethod()
 it will still fail.

 A few lines higher FETCH_CLASS has the same problem
 (http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2398). Going down a
 bit INIT_STATIC_METHOD_CALL has this too:
 http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2548.
 INIT_FCALL_BY_NAME also has this:
 http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2753 So you can trigger
 it with just $undefined() too. Again the same thing in THROW:
 http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2963 (throw
 $undefined;).

 thanks for the notice. you are right , there are some similar issues
 need to be fixed.



 I could continue this list, but I think you get the point ^^ This issue
 exists pretty much everywhere where a ZVAL_PTR fetch is followed by some
 error condition that can happen when the zval is NULL. And we have a *lot*
 of those. So I'm not sure that it really makes sense to fix one of those
 cases and leave 50 others intact. Either this should be fixed generically
 (e.g. on the side of GET_ZVAL_PTR, though that might incur a performance
 penalty) or should be just left alone.

 or , we fix one when we found one.

 thanks

 Thanks,
 Nikita



 --
 Laruence  Xinchen Hui
 http://www.laruence.com/



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #64135 (Exceptions from set_error_handler are not always propagated): NEWS Zend/tests/bug61767.phpt Zend/zend_vm_def.h Zend/zend_vm_execute.h

2013-02-07 Thread Laruence
On Fri, Feb 8, 2013 at 3:36 AM, Nikita Popov nikita@gmail.com wrote:
 On Thu, Feb 7, 2013 at 4:44 PM, Xinchen Hui larue...@php.net wrote:

 Commit:290509755ac4a3279b2b31b899aa9f2dd780f5f4
 Author:Xinchen Hui larue...@php.net Thu, 7 Feb 2013 23:44:46
 +0800
 Parents:   0547a36e95ec36025a30e93e971d26b6b1ecf0e9
 Branches:  PHP-5.5

 Link:
 http://git.php.net/?p=php-src.git;a=commitdiff;h=290509755ac4a3279b2b31b899aa9f2dd780f5f4

 Log:
 Fixed bug #64135 (Exceptions from set_error_handler are not always
 propagated)


 Is there any particular reason why the exception check was added only the
 that error branch? Can't it be done right after the GET_OP1_OBJ_ZVAL_PTR in
 http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#2442? This way it would
 cover the other error conditions as well.
Hey:

could you please example one, which will trigger a error(warning,
notice) out of that branch?

thanks

 Thanks,
 Nikita



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Merge fix of #62836 to ?.re, and regenerate ?.c: ext/standard/var_unserializer.c ext/standard/var_unserializer.re

2013-01-21 Thread Laruence
);
 break;
 }
 +   BG(serialize_lock) = 0;
 if (retval_ptr) {
 zval_ptr_dtor(retval_ptr);
 }


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #63980 (object members get trimmed by zero bytes): NEWS Zend/zend.c Zend/zend_builtin_functions.c Zend/zend_compile.c Zend/zend_compile.h Zend/zend_vm_def.h Zend/z

2013-01-14 Thread Laruence
On Mon, Jan 14, 2013 at 4:37 PM, Stas Malyshev smalys...@sugarcrm.com wrote:
 Hi!

 Commit:62059c16ee2f2802caa00f2aad2fa44c867dd1f1
 Author:Xinchen Hui larue...@php.net Mon, 14 Jan 2013 16:23:22 
 +0800
 Parents:   fe27146b1b533e046e9a5841bb6e5685296208a8
 Branches:  PHP-5.5

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=62059c16ee2f2802caa00f2aad2fa44c867dd1f1

 Log:
 Fixed bug #63980 (object members get trimmed by zero bytes)

 Do we really need this? I'm not sure supporting arbitrary-named
 properties is really that useful and worth adding complications to the
 engine. What is it useful for?
Hey:
   1. consistent
   2. save unnecessary strlen calls

thanks

 --
 Stanislav Malyshev, Software Architect
 SugarCRM: http://www.sugarcrm.com/
 (408)454-6900 ext. 227



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed warning of no return in non-void funciton: Zend/zend_vm_def.h Zend/zend_vm_execute.h Zend/zend_vm_gen.php

2012-12-14 Thread Laruence
Zend/zend_generators.c:734: warning: control reaches end of non-void function

yes it's nothing difference , just make the compiler happy

thanks

On Fri, Dec 14, 2012 at 5:35 PM, Stas Malyshev smalys...@sugarcrm.com wrote:
 Hi!

 Commit:9fb5cfdeb1f13f2e3ab3751494cdd366bc78cb38
 Author:Xinchen Hui larue...@php.net Fri, 14 Dec 2012 17:21:43 
 +0800
 Parents:   359d91a80756cd9a9ce945c0e3aa1d2038633e7a
 Branches:  PHP-5.5

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=9fb5cfdeb1f13f2e3ab3751494cdd366bc78cb38

 Log:
 Fixed warning of no return in non-void funciton

 Why this is necessary? zend_error_noreturn already has an attribute that
 is meant to do exactly that.

 --
 Stanislav Malyshev, Software Architect
 SugarCRM: http://www.sugarcrm.com/
 (408)454-6900 ext. 227



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed warning of no return in non-void funciton: Zend/zend_vm_def.h Zend/zend_vm_execute.h Zend/zend_vm_gen.php

2012-12-14 Thread Laruence
On Fri, Dec 14, 2012 at 5:40 PM, Stas Malyshev smalys...@sugarcrm.com wrote:
 Hi!

 Zend/zend_generators.c:734: warning: control reaches end of non-void function

 yes it's nothing difference , just make the compiler happy

 zend_error_noreturn already supposed to do that. Why it does not do it
 in your case? Which compiler do you use?
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc.
build 5658) (LLVM build 2336.11.00)

thanks

 --
 Stanislav Malyshev, Software Architect
 SugarCRM: http://www.sugarcrm.com/
 (408)454-6900 ext. 227



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #63428 (The behavior of execute() changed): Zend/zend_generators.c Zend/zend_vm_execute.h Zend/zend_vm_execute.skl

2012-11-03 Thread Laruence
Nikic:
   you may want to review this.

thanks
On 11/4/12, Xinchen Hui larue...@php.net wrote:
 Commit:7bcb8780e0ed042888f88c78919b7726be9ea931
 Author:Xinchen Hui larue...@php.net Sun, 4 Nov 2012 12:48:35
 +0800
 Parents:   3c6b0db05285d2374abc392360d6540c32f6ed66
 Branches:  master

 Link:
 http://git.php.net/?p=php-src.git;a=commitdiff;h=7bcb8780e0ed042888f88c78919b7726be9ea931

 Log:
 Fixed bug #63428 (The behavior of execute() changed)

 Bugs:
 https://bugs.php.net/63428

 Changed paths:
   M  Zend/zend_generators.c
   M  Zend/zend_vm_execute.h
   M  Zend/zend_vm_execute.skl


 Diff:
 diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c
 index fba62dd..87f0644 100644
 --- a/Zend/zend_generators.c
 +++ b/Zend/zend_generators.c
 @@ -461,6 +461,10 @@ static zend_function
 *zend_generator_get_constructor(zval *object TSRMLS_DC) /*

  void zend_generator_resume(zend_generator *generator TSRMLS_DC) /* {{{ */
  {
 + if (EG(exception)) {
 + return;
 + }
 +
   /* The generator is already closed, thus can't resume */
   if (!generator-execute_data) {
   return;
 diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
 index 8c4b594..7a2cfc8 100644
 --- a/Zend/zend_vm_execute.h
 +++ b/Zend/zend_vm_execute.h
 @@ -419,10 +419,6 @@ ZEND_API void execute_ex(zend_execute_data
 *execute_data TSRMLS_DC)



 - if (EG(exception)) {
 - return;
 - }
 -
   original_in_execution = EG(in_execution);
   EG(in_execution) = 1;

 @@ -459,9 +455,10 @@ ZEND_API void execute_ex(zend_execute_data
 *execute_data TSRMLS_DC)

  ZEND_API void execute(zend_op_array *op_array TSRMLS_DC)
  {
 - zend_execute_data *execute_data =
 zend_create_execute_data_from_op_array(op_array, 0 TSRMLS_CC);
 -
 - execute_ex(execute_data TSRMLS_CC);
 + if (EG(exception)) {
 + return;
 + }
 + execute_ex(zend_create_execute_data_from_op_array(op_array, 0 TSRMLS_CC)
 TSRMLS_CC);
  }

  static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
 diff --git a/Zend/zend_vm_execute.skl b/Zend/zend_vm_execute.skl
 index 58e5631..2a6fd71 100644
 --- a/Zend/zend_vm_execute.skl
 +++ b/Zend/zend_vm_execute.skl
 @@ -82,10 +82,6 @@ ZEND_API void {%EXECUTOR_NAME%}_ex(zend_execute_data
 *execute_data TSRMLS_DC)

   {%INTERNAL_LABELS%}

 - if (EG(exception)) {
 - return;
 - }
 -
   original_in_execution = EG(in_execution);
   EG(in_execution) = 1;

 @@ -110,9 +106,10 @@ ZEND_API void {%EXECUTOR_NAME%}_ex(zend_execute_data
 *execute_data TSRMLS_DC)

  ZEND_API void {%EXECUTOR_NAME%}(zend_op_array *op_array TSRMLS_DC)
  {
 - zend_execute_data *execute_data =
 zend_create_execute_data_from_op_array(op_array, 0 TSRMLS_CC);
 -
 - {%EXECUTOR_NAME%}_ex(execute_data TSRMLS_CC);
 + if (EG(exception)) {
 + return;
 + }
 + {%EXECUTOR_NAME%}_ex(zend_create_execute_data_from_op_array(op_array, 0
 TSRMLS_CC) TSRMLS_CC);
  }

  {%EXTERNAL_EXECUTOR%}


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
惠新宸laruence
Senior PHP Engineer
http://www.laruence.com

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Test for #63336, xfail now: Zend/tests/bug63336.phpt

2012-10-23 Thread Laruence
On Tue, Oct 23, 2012 at 4:46 PM, Stas Malyshev smalys...@sugarcrm.com wrote:
 Hi!

 +class Base {
 +const DUMMY = XXX;
 +public function foo($var=TEST, $more=null) { return true; }
 +public function bar($var, $more=self::DUMMY) { return true; }
 +}
 +
 +class Child extends Base {
 +const DUMMY = DDD;
 +public function foo($var=TEST) { return true; }
 +public function bar() { return true; }
 +}
 +?
 +--EXPECT--
 +Strict Standards: Declaration of Child::foo() should be compatible with 
 Base::foo($var = '123', $more = NULL) in %sbug63336.php on line %d
 +
 +Strict Standards: Declaration of Child::bar() should be compatible with 
 Base::bar($var, $more = 'XXX') in %sbug63336.php on line %d

 I don't think these are good examples for E_STRICT errors. bar()
 traditionally has been used in PHP as function accepting any arguments,
 so even if current implementation of PHP (wrongly) says it's not
 compatible it may be fixed in the future. I'd rather use more obvious
 cases where the extension is clearly wrong - like adding non-optional
 arguments or types. This bug has very little to do with compatibility
 resolution, so I do not think it is good to peg it to a particular way
 of doing it.
Hey:
   so you mean, this test script should not been committed?

thanks  :)

 --
 Stanislav Malyshev, Software Architect
 SugarCRM: http://www.sugarcrm.com/
 (408)454-6900 ext. 227



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: - add missing php-fpm.service.in: sapi/fpm/php-fpm.service.in

2012-10-23 Thread Laruence
Hey,

seems  this file is missed in trunk.

should this also merge into trunk?

now I got a configure error:
  config.status: error: cannot find input file: sapi/fpm/php-fpm.service.in

thanks

On Fri, Sep 28, 2012 at 6:47 AM, Jérôme Loyet f...@php.net wrote:
 Commit:2259a8f18b1f25c175c486f54849fcd9e61ecde1
 Author:Jerome Loyet f...@php.net Fri, 28 Sep 2012 00:47:56 +0200
 Parents:   851a04bb7b680954249e825ea3fef420f7d66bb7
 Branches:  PHP-5.3

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=2259a8f18b1f25c175c486f54849fcd9e61ecde1

 Log:
 - add missing php-fpm.service.in

 Changed paths:
   A  sapi/fpm/php-fpm.service.in


 Diff:
 diff --git a/sapi/fpm/php-fpm.service.in b/sapi/fpm/php-fpm.service.in
 new file mode 100644
 index 000..396a88d
 --- /dev/null
 +++ b/sapi/fpm/php-fpm.service.in
 @@ -0,0 +1,12 @@
 +[Unit]
 +Description=The PHP FastCGI Process Manager
 +After=syslog.target network.target
 +
 +[Service]
 +PIDFile=@localstatedir@/run/php-fpm.pid
 +ExecStart=@sbindir@/php-fpm --nodaemonize --fpm-config 
 @sysconfdir@/php-fpm.conf
 +ExecReload=/bin/kill -USR2 $MAINPID
 +
 +[Install]
 +WantedBy=multi-user.target
 +


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #63055 (Segfault in zend_gc with SF2 testsuite): NEWS Zend/tests/bug63055.phpt Zend/zend_gc.h

2012-10-18 Thread Laruence
Dmitry:

maybe you want to review this fix.  :)

thanks

On Thu, Oct 18, 2012 at 3:49 PM, Xinchen Hui larue...@php.net wrote:
 Commit:ccc519b7a92bfe4b191c0e2e3869516171247ac2
 Author:Xinchen Hui larue...@php.net Thu, 18 Oct 2012 15:49:37 
 +0800
 Parents:   82fb5df380c726ab919355caf46c54207d0f1253
 Branches:  PHP-5.4

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=ccc519b7a92bfe4b191c0e2e3869516171247ac2

 Log:
 Fixed bug #63055 (Segfault in zend_gc with SF2 testsuite)

 This should also fixed various segfaults which the bt looks like cored in 
 zval_mark_grey

 Bugs:
 https://bugs.php.net/63055

 Changed paths:
   M  NEWS
   A  Zend/tests/bug63055.phpt
   M  Zend/zend_gc.h


 Diff:
 diff --git a/NEWS b/NEWS
 index eca6698..06bdf3d 100644
 --- a/NEWS
 +++ b/NEWS
 @@ -2,6 +2,9 @@ PHP   
  NEWS
  
 |||
  ?? ??? 2012, PHP 5.4.9

 +- Core:
 +  . Fixed bug #63055 (Segfault in zend_gc with SF2 testsuite). (Laruence)
 +
  - Fileinfo:
. Fixed bug #63248 (Load multiple magic files from a directory under 
 Windows).
  (Anatoliy)
 diff --git a/Zend/tests/bug63055.phpt b/Zend/tests/bug63055.phpt
 new file mode 100644
 index 000..0901e5b
 --- /dev/null
 +++ b/Zend/tests/bug63055.phpt
 @@ -0,0 +1,23 @@
 +--TEST--
 +Bug #63055 (Segfault in zend_gc with SF2 testsuite)
 +--FILE--
 +?php
 +for ($i=0; $i9998; $i++) {
 +$array = array();
 +$array[0] = $array;
 +unset($array);
 +}
 +
 +$matches = array(foo = bar);
 +$dummy   = array(dummy);
 +$dummy[1] = $dummy;
 +
 +$matches[1] = $matches;
 +$matches[2] = $dummy;
 +
 +$ma = $matches;
 +preg_match_all(/(\d)+/, foo123456bar, $matches);
 +echo okey;
 +?
 +--EXPECTF--
 +okey
 diff --git a/Zend/zend_gc.h b/Zend/zend_gc.h
 index ba30b3a..1f86f19 100644
 --- a/Zend/zend_gc.h
 +++ b/Zend/zend_gc.h
 @@ -179,7 +179,7 @@ END_EXTERN_C()

  static zend_always_inline void gc_zval_check_possible_root(zval *z TSRMLS_DC)
  {
 -   if (z-type == IS_ARRAY || z-type == IS_OBJECT) {
 +   if ((z-type == IS_ARRAY  !z-value.ht-inconsistent) || z-type == 
 IS_OBJECT) {
 gc_zval_possible_root(z TSRMLS_CC);
 }
  }


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: - Fixed bug #62887 (Only /status?plainfull gives last request cpu): sapi/fpm/fpm/fpm_status.c

2012-09-27 Thread Laruence
 +#ifdef HAVE_FPM_LQ
 scoreboard.lq,
 scoreboard.lq_max,
 scoreboard.lq_len,


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #60723 (error_log error time has changed to UTC ignoring default timezo): ext/standard/tests/general_functions/bug60723.phpt main/main.c

2012-09-24 Thread Laruence
On Mon, Sep 24, 2012 at 4:38 PM, Kalle Sommer Nielsen ka...@php.net wrote:
 Hola Laurence

 2012/9/24 Xinchen Hui larue...@php.net:
 Log:
 Fixed bug #60723 (error_log error time has changed to UTC ignoring default 
 timezo)

 ...

 +--TEST--
 +Bug #55371 (get_magic_quotes_gpc() and get_magic_quotes_runtime() throw 
 deprecated warning)

 Test name seems to need an update ;-)
Ha, thanks,  I copied the tests script to make a new one, but forgot
to change the summary

thanks

 --
 regards,

 Kalle Sommer Nielsen
 ka...@php.net



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #61442 (exception threw in __autoload can not be catched): NEWS Zend/tests/bug61442.phpt Zend/zend_vm_def.h Zend/zend_vm_execute.h

2012-09-19 Thread Laruence
Dmitry:

   maybe you want to review this fix. :)

thanks

On Wed, Sep 19, 2012 at 7:40 PM, Xinchen Hui larue...@php.net wrote:
 Commit:fd0b3ea663431b7adaedde11668fbc0b6ba07494
 Author:Xinchen Hui larue...@php.net Wed, 19 Sep 2012 19:40:59 
 +0800
 Parents:   6752f38ccca37213865f330a2f0dc49d834dc92e
 Branches:  PHP-5.3

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=fd0b3ea663431b7adaedde11668fbc0b6ba07494

 Log:
 Fixed bug #61442 (exception threw in __autoload can not be catched)

 Bugs:
 https://bugs.php.net/61442

 Changed paths:
   M  NEWS
   A  Zend/tests/bug61442.phpt
   M  Zend/zend_vm_def.h
   M  Zend/zend_vm_execute.h


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Revert Fixed bug #62852 (Unserialize invalid DateTime causes crash): ext/date/php_date.c ext/date/tests/bug62852.phpt

2012-09-14 Thread Laruence
Reeze:
as the new comment: http://news.php.net/php.bugs/173451

I revert your fix for now,  and leave the test script XFAIL

will try to fix this in another way.

thanks

On Sat, Sep 15, 2012 at 11:26 AM, Xinchen Hui larue...@php.net wrote:
 Commit:e766f85405cd936a07a30a045f419199b6c02ed7
 Author:Xinchen Hui larue...@php.net Sat, 15 Sep 2012 11:26:21 
 +0800
 Parents:   30981836fa84323d49b2c90bbd805348d58021e4
 Branches:  PHP-5.3

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=e766f85405cd936a07a30a045f419199b6c02ed7

 Log:
 Revert Fixed bug #62852 (Unserialize invalid DateTime causes crash)

 see: http://news.php.net/php.bugs/173451

 This reverts commit 46a3f257724df7b85cc8c3e6374c36ed9ee783b4.

 Bugs:
 https://bugs.php.net/62852

 Changed paths:
   M  ext/date/php_date.c
   D  ext/date/tests/bug62852.phpt


 Diff:
 diff --git a/ext/date/php_date.c b/ext/date/php_date.c
 index d9e6a28..e8a4570 100644
 --- a/ext/date/php_date.c
 +++ b/ext/date/php_date.c
 @@ -2544,9 +2544,6 @@ static int php_date_initialize_from_hash(zval 
 **return_value, php_date_obj **dat
 if (zend_hash_find(myht, timezone_type, 14, (void**) 
 z_timezone_type) == SUCCESS) {
 convert_to_long(*z_timezone_type);
 if (zend_hash_find(myht, timezone, 9, (void**) 
 z_timezone) == SUCCESS) {
 -   zend_error_handling error_handling;
 -
 -   zend_replace_error_handling(EH_THROW, NULL, 
 error_handling TSRMLS_CC);
 convert_to_string(*z_timezone);

 switch (Z_LVAL_PP(z_timezone_type)) {
 @@ -2554,9 +2551,9 @@ static int php_date_initialize_from_hash(zval 
 **return_value, php_date_obj **dat
 case TIMELIB_ZONETYPE_ABBR: {
 char *tmp = 
 emalloc(Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 2);
 snprintf(tmp, 
 Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 2, %s %s, 
 Z_STRVAL_PP(z_date), Z_STRVAL_PP(z_timezone));
 -   php_date_initialize(*dateobj, 
 tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 1, NULL, NULL, 1 
 TSRMLS_CC);
 +   php_date_initialize(*dateobj, 
 tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 1, NULL, NULL, 0 
 TSRMLS_CC);
 efree(tmp);
 -   break;
 +   return 1;
 }

 case TIMELIB_ZONETYPE_ID:
 @@ -2570,15 +2567,10 @@ static int php_date_initialize_from_hash(zval 
 **return_value, php_date_obj **dat
 tzobj-tzi.tz = tzi;
 tzobj-initialized = 1;

 -   php_date_initialize(*dateobj, 
 Z_STRVAL_PP(z_date), Z_STRLEN_PP(z_date), NULL, tmp_obj, 1 TSRMLS_CC);
 +   php_date_initialize(*dateobj, 
 Z_STRVAL_PP(z_date), Z_STRLEN_PP(z_date), NULL, tmp_obj, 0 TSRMLS_CC);
 zval_ptr_dtor(tmp_obj);
 -   break;
 -   default:
 -   
 zend_restore_error_handling(error_handling TSRMLS_CC);
 -   return 0;
 +   return 1;
 }
 -   zend_restore_error_handling(error_handling 
 TSRMLS_CC);
 -   return 1;
 }
 }
 }
 diff --git a/ext/date/tests/bug62852.phpt b/ext/date/tests/bug62852.phpt
 deleted file mode 100644
 index 6426a80..000
 --- a/ext/date/tests/bug62852.phpt
 +++ /dev/null
 @@ -1,15 +0,0 @@
 ---TEST--
 -Bug #62852 (Unserialize invalid DateTime causes crash)
 ---INI--
 -date.timezone=GMT
 ---FILE--
 -?php
 -try {
 -   $datetime = 
 unserialize('O:8:DateTime:3:{s:4:date;s:20:10007-06-07 
 03:51:49;s:13:timezone_type;i:3;s:8:timezone;s:3:UTC;}');
 -   var_dump($datetime);
 -} catch (Exception $e) {
 -var_dump($e-getMessage());
 -}
 -?
 ---EXPECTF--
 -string(%d) DateTime::__wakeup(): Failed to parse time string (%s) at 
 position 12 (0): Double time specification


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/date/lib/parse_date.c ext/date/lib/parse_iso_intervals.c ext/dba/libflatfile/flatfile.c ext/dba/libinifile/inifile.c ext/standard/ur

2012-09-05 Thread Laruence
On Wed, Sep 5, 2012 at 11:38 PM, Pierre Joye pierre@gmail.com wrote:

 On Sep 5, 2012 5:12 PM, Xinchen Hui larue...@php.net wrote:


  -  | PHP Version 5
 |
  +  | PHP Version 6
 |
 Pls restore the right version here :)
haha, okey. thanks

thanks



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #62987 (Assigning to ArrayObject[null][something] overrides all undefined variables): NEWS ext/spl/spl_array.c ext/spl/tests/bug62978.phpt

2012-09-01 Thread Laruence
Hi Rms:

this bug is a critical one.  please notice this fix. :)

thanks

On Sat, Sep 1, 2012 at 2:21 PM, Xinchen Hui larue...@php.net wrote:
 Commit:67d7d03f00cb3185a4d5958ab7a4b063fc33405c
 Author:Xinchen Hui larue...@php.net Sat, 1 Sep 2012 14:17:39 
 +0800
 Parents:   5dc2cef370885c552c20f3ff44bccd402850de9e
 Branches:  PHP-5.3

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=67d7d03f00cb3185a4d5958ab7a4b063fc33405c

 Log:
 Fixed bug #62987 (Assigning to ArrayObject[null][something] overrides all 
 undefined variables)

 The get_zval_ptr_ptr of spl_array handler should act as same as the vm's

 Bugs:
 https://bugs.php.net/62987

 Changed paths:
   M  NEWS
   M  ext/spl/spl_array.c
   A  ext/spl/tests/bug62978.phpt


 Diff:
 diff --git a/NEWS b/NEWS
 index a6e05be..ae82821 100644
 --- a/NEWS
 +++ b/NEWS
 @@ -45,6 +45,8 @@ PHP 
NEWS
. Fixed bug (segfault due to retval is not initialized). (Laruence)

  - SPL:
 +  . Bug #62987 (Assigning to ArrayObject[null][something] overrides all
 +undefined variables). (Laruence)
. Fixed bug #62904 (Crash when cloning an object which inherits 
 SplFixedArray)
  (Laruence)
. Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance
 diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
 index 80ca5be..11540de 100755
 --- a/ext/spl/spl_array.c
 +++ b/ext/spl/spl_array.c
 @@ -312,38 +312,41 @@ static zval **spl_array_get_dimension_ptr_ptr(int 
 check_inherited, zval *object,
 long index;
 HashTable *ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);

 -/*  We cannot get the pointer pointer so we don't allow it here for now
 -   if (check_inherited  intern-fptr_offset_get) {
 -   return zend_call_method_with_1_params(object, 
 Z_OBJCE_P(object), intern-fptr_offset_get, offsetGet, NULL, offset);
 -   }*/
 -
 if (!offset) {
 return EG(uninitialized_zval_ptr);
 }

 if ((type == BP_VAR_W || type == BP_VAR_RW)  (ht-nApplyCount  0)) 
 {
 zend_error(E_WARNING, Modification of ArrayObject during 
 sorting is prohibited);
 -   return EG(uninitialized_zval_ptr);;
 +   return EG(error_zval_ptr);;
 }

 switch(Z_TYPE_P(offset)) {
 +   case IS_NULL:
 +   Z_STRVAL_P(offset) = ;
 +   Z_STRLEN_P(offset) = 0;
 case IS_STRING:
 if (zend_symtable_find(ht, Z_STRVAL_P(offset), 
 Z_STRLEN_P(offset)+1, (void **) retval) == FAILURE) {
 -   if (type == BP_VAR_W || type == BP_VAR_RW) {
 -   zval *value;
 -   ALLOC_INIT_ZVAL(value);
 -   zend_symtable_update(ht, Z_STRVAL_P(offset), 
 Z_STRLEN_P(offset)+1, (void**)value, sizeof(void*), NULL);
 -   zend_symtable_find(ht, Z_STRVAL_P(offset), 
 Z_STRLEN_P(offset)+1, (void **) retval);
 -   return retval;
 -   } else {
 -   zend_error(E_NOTICE, Undefined index:  %s, 
 Z_STRVAL_P(offset));
 -   return EG(uninitialized_zval_ptr);
 +   switch (type) {
 +   case BP_VAR_R:
 +   zend_error(E_NOTICE, Undefined 
 index:  %s, Z_STRVAL_P(offset));
 +   case BP_VAR_UNSET:
 +   case BP_VAR_IS:
 +   retval = EG(uninitialized_zval_ptr);
 +   break;
 +   case BP_VAR_RW:
 +   zend_error(E_NOTICE,Undefined index: 
  %s, Z_STRVAL_P(offset));
 +   case BP_VAR_W: {
 +   zval *value;
 +   ALLOC_INIT_ZVAL(value);
 +   zend_symtable_update(ht, 
 Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, (void**)value, sizeof(void*), 
 (void **)retval);
 +   }
 }
 -   } else {
 -   return retval;
 }
 -   case IS_DOUBLE:
 +   return retval;
 case IS_RESOURCE:
 +   zend_error(E_STRICT, Resource ID#%ld used as offset, casting 
 to integer (%ld), Z_LVAL_P(offset), Z_LVAL_P(offset));
 +   case IS_DOUBLE:
 case IS_BOOL:
 case IS_LONG:
 if (offset-type == IS_DOUBLE) {
 @@ -352,23 +355,27 @@ static zval **spl_array_get_dimension_ptr_ptr(int 
 check_inherited, zval *object,
 index = Z_LVAL_P(offset);
 }
 if (zend_hash_index_find(ht, index, (void **) retval) == 
 FAILURE) {
 -   if (type == BP_VAR_W || type

Re: [PHP-CVS] com php-src: stash: Zend/zend_compile.c Zend/zend_compile.h Zend/zend_opcode.c Zend/zend_vm_def.h Zend/zend_vm_execute.h

2012-08-22 Thread Laruence
Hi:
  weird, I dont know why this was pushed...

  this should only exists on my local branch

sorry

On Wed, Aug 22, 2012 at 1:51 PM, Xinchen Hui larue...@php.net wrote:
 Commit:703a4e390de277afb85d722a0792912d0b2d2d46
 Author:Xinchen Hui larue...@php.net Wed, 22 Aug 2012 13:51:44 
 +0800
 Parents:   c4fecc1c5d44481a4088f6028ce6910f2ce4e0dc
 Branches:  master

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=703a4e390de277afb85d722a0792912d0b2d2d46

 Log:
 stash

 Changed paths:
   M  Zend/zend_compile.c
   M  Zend/zend_compile.h
   M  Zend/zend_opcode.c
   M  Zend/zend_vm_def.h
   M  Zend/zend_vm_execute.h


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: stash: Zend/zend_compile.c Zend/zend_compile.h Zend/zend_opcode.c Zend/zend_vm_def.h Zend/zend_vm_execute.h

2012-08-22 Thread Laruence
Hi:
it was pushed by accident, when I did merge local branch 'finally'.

   ignore it is okey.

thanks

On Wed, Aug 22, 2012 at 6:38 PM, Laruence larue...@php.net wrote:
 Hi:
   weird, I dont know why this was pushed...

   this should only exists on my local branch

 sorry

 On Wed, Aug 22, 2012 at 1:51 PM, Xinchen Hui larue...@php.net wrote:
 Commit:703a4e390de277afb85d722a0792912d0b2d2d46
 Author:Xinchen Hui larue...@php.net Wed, 22 Aug 2012 13:51:44 
 +0800
 Parents:   c4fecc1c5d44481a4088f6028ce6910f2ce4e0dc
 Branches:  master

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=703a4e390de277afb85d722a0792912d0b2d2d46

 Log:
 stash

 Changed paths:
   M  Zend/zend_compile.c
   M  Zend/zend_compile.h
   M  Zend/zend_opcode.c
   M  Zend/zend_vm_def.h
   M  Zend/zend_vm_execute.h


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



 --
 Laruence  Xinchen Hui
 http://www.laruence.com/



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Bug 62462: Prevent multibyte characters from being split between the lines: ext/standard/quot_print.c ext/standard/tests/strings/bug62462.phpt

2012-08-20 Thread Laruence
=D0=B8=
068- =D0=BA=D0=BE=D0=B4=D0=B5
069- string(1500) строка в юникодестрока в юникодестрока в
юникодестрока в юникодестрока в юникодестрока в юникодестрока в
юникодестрока в юникодестрока в юниодестрока в юникодестрока в
юникодестрока в юникодестрока в юникодестрока в юникодестрока в
юникодестрока в юникодестрока в юникодестрока в юникодестрока в
юникодестрока в юникодестрока в юникодестрока в юникодестрока в
юникоестрока в юникодестрока в юникодестрока в юникодестрока в
юникодестрока в юикодестрока в юникодестрока в юникодестрока в
юникодестрока в юникодестрок в юникодестрока в юникодестрока в
юникодестрока в юникодестрока в юникодесрока в юникодестрока в
юникодестрока в юникодестрока в юникодестрока в юникдестрока в
юникодестрока в юникодестрока в юникодестрока в юникодестрока в
никодестрока в юникодестрока в юникодестрока в юникоде
070- string(13) this is a foo
071- Done

thanks

On Tue, Aug 21, 2012 at 5:47 AM, Lars Strojny lstro...@php.net wrote:
 Commit:18bb426587d62f93c54c40bf8535eb8416603629
 Author:Lars Strojny lstro...@php.net Mon, 20 Aug 2012 23:42:31 
 +0200
 Parents:   ab4f3d93e812b96bf933a1fa7e0ad43671b38c77
 Branches:  master

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=18bb426587d62f93c54c40bf8535eb8416603629

 Log:
 Bug 62462: Prevent multibyte characters from being split between the lines

 Merged from https://github.com/php/php-src/pull/120

 Bugs:
 https://bugs.php.net/62462

 Changed paths:
   M  ext/standard/quot_print.c
   A  ext/standard/tests/strings/bug62462.phpt


 Diff:
 diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c
 index 1ce7eff..4eb69d7 100644
 --- a/ext/standard/quot_print.c
 +++ b/ext/standard/quot_print.c
 @@ -162,7 +162,10 @@ PHPAPI unsigned char *php_quot_print_encode(const 
 unsigned char *str, size_t len
 lp = 0;
 } else {
 if (iscntrl (c) || (c == 0x7f) || (c  0x80) || (c == 
 '=') || ((c == ' ')  (*str == '\015'))) {
 -   if ((lp += 3)  PHP_QPRINT_MAXL) {
 +   if lp+= 3)  PHP_QPRINT_MAXL)  (c = 
 0x7f))
 +|| ((c  0x7f)  (c = 0xdf)  ((lp + 3)  PHP_QPRINT_MAXL))
 +|| ((c  0xdf)  (c = 0xef)  ((lp + 6)  PHP_QPRINT_MAXL))
 +|| ((c  0xef)  (c = 0xf4)  ((lp + 9)  PHP_QPRINT_MAXL))) {
 *d++ = '=';
 *d++ = '\015';
 *d++ = '\012';
 @@ -283,4 +286,4 @@ PHP_FUNCTION(quoted_printable_encode)
   * End:
   * vim600: sw=4 ts=4 fdm=marker
   * vim600: sw=4 ts=4
 - */
 + */
 \ No newline at end of file
 diff --git a/ext/standard/tests/strings/bug62462.phpt 
 b/ext/standard/tests/strings/bug62462.phpt
 new file mode 100644
 index 000..c6eb41a
 --- /dev/null
 +++ b/ext/standard/tests/strings/bug62462.phpt
 @@ -0,0 +1,17 @@
 +--TEST--
 +Multibyte characters shouldn't be split by soft line break added by 
 quoted_printable_encode - 4 byte character test
 +--FILE--
 +?php
 +echo quoted_printable_encode(str_repeat(\xc4\x85, 77));
 +?
 +
 +==DONE==
 +--EXPECT--
 +=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=
 +=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=
 +=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=
 +=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=
 +=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=
 +=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=C4=85=
 +=C4=85=C4=85=C4=85=C4=85=C4=85
 +==DONE==


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/


Re: [PHP-CVS] com php-src: Implemented 'finally' keywords for php: NEWS UPGRADING Zend/tests/catch_finally_001.phpt Zend/tests/catch_finally_002.phpt Zend/tests/catch_finally_003.phpt Zend/tests/catch

2012-08-13 Thread Laruence
On Tue, Aug 14, 2012 at 12:21 AM, Pierre Joye pierre@gmail.com wrote:
 hi Laruence!

 Blame me for not having tested your patch before, but it sadly breaks
 the build, see:

 http://pastie.org/4466921

 Thanks for your work!
Hi:
   hmm, sorry for that mistake, didn't test on windows before,
anywya, seems ab has fixed that :)

thanks

 Cheers,

 On Mon, Aug 13, 2012 at 3:48 PM, Xinchen Hui larue...@php.net wrote:
 Commit:80d5ae3cea4c6fdd85789edfde0e2da721a0741b
 Author:Xinchen Hui larue...@php.net Mon, 13 Aug 2012 21:48:39 
 +0800
 Parents:   e51acee43ddcb03f6b695f40fbf4956c8859a4aa
 Branches:  master

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=80d5ae3cea4c6fdd85789edfde0e2da721a0741b

 Log:
 Implemented 'finally' keywords for php

 RFC: https://wiki.php.net/rfc/finally
 FR: https://bugs.php.net/bug.php?id=32100
 and I have got some improvment ideas(performance), will implemented
 later. thanks

 Changed paths:
   M  NEWS
   M  UPGRADING
   A  Zend/tests/catch_finally_001.phpt
   A  Zend/tests/catch_finally_002.phpt
   A  Zend/tests/catch_finally_003.phpt
   A  Zend/tests/catch_finally_004.phpt
   A  Zend/tests/catch_finally_005.phpt
   A  Zend/tests/catch_finally_006.phpt
   A  Zend/tests/try_catch_finally_001.phpt
   A  Zend/tests/try_catch_finally_002.phpt
   A  Zend/tests/try_catch_finally_003.phpt
   A  Zend/tests/try_catch_finally_004.phpt
   A  Zend/tests/try_finally_001.phpt
   A  Zend/tests/try_finally_002.phpt
   A  Zend/tests/try_finally_003.phpt
   M  Zend/zend_compile.c
   M  Zend/zend_compile.h
   M  Zend/zend_language_parser.y
   M  Zend/zend_language_scanner.c
   M  Zend/zend_language_scanner.l
   M  Zend/zend_language_scanner_defs.h
   M  Zend/zend_vm_def.h
   M  Zend/zend_vm_execute.h
   M  Zend/zend_vm_execute.skl
   M  Zend/zend_vm_opcodes.h


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



 --
 Pierre

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



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #62653: (unset($array[$float]) causes a crash): NEWS Zend/tests/bug62653.phpt Zend/zend_vm_def.h Zend/zend_vm_execute.h

2012-07-26 Thread Laruence
Hi:
  this is introduced in
https://github.com/php/php-src/commit/b7e124004f24896248827eb969909f1e92eafc39
, that commit was only for 5.4.

 so 5.3 didn't have this bug,  actually our fix is make the codes
similar with 5.3 :).

thanks

On Thu, Jul 26, 2012 at 1:53 PM, Xinchen Hui larue...@php.net wrote:
 Commit:eae06100429f37e5297c432e99104daeeed13bad
 Author:Xinchen Hui larue...@php.net Thu, 26 Jul 2012 13:52:42 
 +0800
 Parents:   ba27e0888a3bb91eba3266c71003df045c4d2091
 Branches:  PHP-5.4

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=eae06100429f37e5297c432e99104daeeed13bad

 Log:
 Fixed bug #62653: (unset($array[$float]) causes a crash)

 the reason why jpauli and I can not reproduce is (it's silly):
 I typo USE_ZEND_ALLOC ** valgrind at the first time, then I always ctrl+r
 and jpauli copied my command from the pastbin :)

 thanks

 Bugs:
 https://bugs.php.net/62653

 Changed paths:
   M  NEWS
   A  Zend/tests/bug62653.phpt
   M  Zend/zend_vm_def.h
   M  Zend/zend_vm_execute.h


 Diff:
 diff --git a/NEWS b/NEWS
 index d429849..407b052 100644
 --- a/NEWS
 +++ b/NEWS
 @@ -5,6 +5,8 @@ PHP   
  NEWS
  - Core:
. Fixed bug #62661 (Interactive php-cli crashes if include() is used in
  auto_prepend_file). (Laruence)
 +  . Fixed bug #62653: (unset($array[$float]) causes a crash). (Nikita Popov,
 +Laruence)
. Fixed bug #62565 (Crashes due non-initialized internal properties_table).
  (Felipe)

 diff --git a/Zend/tests/bug62653.phpt b/Zend/tests/bug62653.phpt
 new file mode 100644
 index 000..cf5941c
 --- /dev/null
 +++ b/Zend/tests/bug62653.phpt
 @@ -0,0 +1,33 @@
 +--TEST--
 +Bug #62653: unset($array[$float]) causes a crash
 +--FILE--
 +?php
 +$array = array(5=bar);
 +$foo = 10.; // gettype($foo) = string
 +$foo /= 2; //Makes $foo = 5 but still gettype($foo) = double
 +unset($array[$foo]);
 +print_r($array);
 +
 +$array = array(5=bar);
 +$foo = 5;
 +unset($array[(float)$foo]);
 +print_r($array);
 +
 +$array = array(5=bar);
 +$foo = 5;
 +$foo /= 2; //Makes $foo = 5 but still gettype($foo) = double
 +$name = foo;
 +unset($array[$$name]);
 +print_r($array);
 +
 +?
 +--EXPECT--
 +Array
 +(
 +)
 +Array
 +(
 +)
 +Array
 +(
 +)
 diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
 index 5a3ae49..f5567ea 100644
 --- a/Zend/zend_vm_def.h
 +++ b/Zend/zend_vm_def.h
 @@ -3947,7 +3947,8 @@ ZEND_VM_HANDLER(75, ZEND_UNSET_DIM, VAR|UNUSED|CV, 
 CONST|TMP|VAR|CV)
 switch (Z_TYPE_P(offset)) {
 case IS_DOUBLE:
 hval = 
 zend_dval_to_lval(Z_DVAL_P(offset));
 -   ZEND_VM_C_GOTO(num_index_dim);
 +   zend_hash_index_del(ht, hval);
 +   break;
 case IS_RESOURCE:
 case IS_BOOL:
 case IS_LONG:
 diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
 index 1fb6e76..78f3d84 100644
 --- a/Zend/zend_vm_execute.h
 +++ b/Zend/zend_vm_execute.h
 @@ -13917,7 +13917,8 @@ static int ZEND_FASTCALL  
 ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAND
 switch (Z_TYPE_P(offset)) {
 case IS_DOUBLE:
 hval = 
 zend_dval_to_lval(Z_DVAL_P(offset));
 -   goto num_index_dim;
 +   zend_hash_index_del(ht, hval);
 +   break;
 case IS_RESOURCE:
 case IS_BOOL:
 case IS_LONG:
 @@ -15919,7 +15920,8 @@ static int ZEND_FASTCALL  
 ZEND_UNSET_DIM_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLE
 switch (Z_TYPE_P(offset)) {
 case IS_DOUBLE:
 hval = 
 zend_dval_to_lval(Z_DVAL_P(offset));
 -   goto num_index_dim;
 +   zend_hash_index_del(ht, hval);
 +   break;
 case IS_RESOURCE:
 case IS_BOOL:
 case IS_LONG:
 @@ -18131,7 +18133,8 @@ static int ZEND_FASTCALL  
 ZEND_UNSET_DIM_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLE
 switch (Z_TYPE_P(offset)) {
 case IS_DOUBLE:
 hval = 
 zend_dval_to_lval(Z_DVAL_P(offset

Re: [PHP-CVS] com php-src: Fixed bug #62661 (Interactive php-cli crashes if include() is used in auto_prepend_file): NEWS Zend/zend.c

2012-07-25 Thread Laruence
Hi:

  this bug is similar to #49000, and the fix is a little ugly, in this
case, setting CG(interactive) in sapi/cli/php_cli.c becomes
unnecessary.

thanks

On Thu, Jul 26, 2012 at 12:40 PM, Xinchen Hui larue...@php.net wrote:
 Commit:b4b3a65f5518803c4a3bca34ac67e139b2547133
 Author:Xinchen Hui larue...@php.net Thu, 26 Jul 2012 12:40:47 
 +0800
 Parents:   9fe8c58130ac82d2b52b35a290b71569abe50d18
 Branches:  PHP-5.4

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=b4b3a65f5518803c4a3bca34ac67e139b2547133

 Log:
 Fixed bug #62661 (Interactive php-cli crashes if include() is used in 
 auto_prepend_file)

 Bugs:
 https://bugs.php.net/62661

 Changed paths:
   M  NEWS
   M  Zend/zend.c


 Diff:
 diff --git a/NEWS b/NEWS
 index 883d910..d429849 100644
 --- a/NEWS
 +++ b/NEWS
 @@ -3,6 +3,8 @@ PHP   
  NEWS
  ?? ??? 2012, PHP 5.4.6

  - Core:
 +  . Fixed bug #62661 (Interactive php-cli crashes if include() is used in
 +auto_prepend_file). (Laruence)
. Fixed bug #62565 (Crashes due non-initialized internal properties_table).
  (Felipe)

 diff --git a/Zend/zend.c b/Zend/zend.c
 index 37a1a27..18c4f11 100644
 --- a/Zend/zend.c
 +++ b/Zend/zend.c
 @@ -1261,6 +1261,7 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, 
 zval **retval, int file_co
 zend_file_handle *file_handle;
 zend_op_array *orig_op_array = EG(active_op_array);
 zval **orig_retval_ptr_ptr = EG(return_value_ptr_ptr);
 +long orig_interactive = CG(interactive);

 va_start(files, file_count);
 for (i = 0; i  file_count; i++) {
 @@ -1268,6 +1269,15 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, 
 zval **retval, int file_co
 if (!file_handle) {
 continue;
 }
 +
 +if (orig_interactive) {
 +if (file_handle-filename[0] != '-' || file_handle-filename[1]) 
 {
 +CG(interactive) = 0;
 +} else {
 +CG(interactive) = 1;
 +}
 +}
 +
 EG(active_op_array) = zend_compile_file(file_handle, type 
 TSRMLS_CC);
 if (file_handle-opened_path) {
 int dummy = 1;
 @@ -1309,12 +1319,14 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, 
 zval **retval, int file_co
 va_end(files);
 EG(active_op_array) = orig_op_array;
 EG(return_value_ptr_ptr) = orig_retval_ptr_ptr;
 +CG(interactive) = orig_interactive;
 return FAILURE;
 }
 }
 va_end(files);
 EG(active_op_array) = orig_op_array;
 EG(return_value_ptr_ptr) = orig_retval_ptr_ptr;
 +CG(interactive) = orig_interactive;

 return SUCCESS;
  }


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Re-fix bug #55544: ext/zlib/php_zlib.h ext/zlib/tests/bug55544.phpt ext/zlib/zlib.c

2012-07-24 Thread Laruence
Hi:
   the fix is bad smell, I knew.  maybe you can find a better fix :) ?

  the problem is explained in #55544:
 here is the confusion(assuming -d output_handler=ob_gzhandler -d
zlib.output_compression=0) :

1. php.output_handler will change the ZLIGB(output_compression) before the zlib
RINIT
2. in zlib RINIT, we set the ZLIBG(output_compression) to default value(ini)

3. if we don't override the ZLIBG(output_compression), then in the
php_zlib_output_compression_start which will be called in RINT will
try to start
zlib compression handler (although it depends on the requeset header),
then, the
conflict warning will be threw.

4. if we override it, then it the php_zlib_output_compression_start, it will
return FALIURE, and no compression occurred(see the codes from my previous
reply)

so, the key problem is multi-featrues depends on one global flag -
ZLIBG(output_compression).

thanks


On Tue, Jul 24, 2012 at 2:43 PM, Xinchen Hui larue...@php.net wrote:
 Commit:4c1e2bbd6f744b4048d4e0540ecc5dbe005494fe
 Author:Xinchen Hui larue...@php.net Tue, 24 Jul 2012 14:43:53 
 +0800
 Parents:   2abc4c2f6fabfc81d12380170dc5ec7be9314a61
 Branches:  PHP-5.4

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=4c1e2bbd6f744b4048d4e0540ecc5dbe005494fe

 Log:
 Re-fix bug #55544

 Bugs:
 https://bugs.php.net/55544

 Changed paths:
   M  ext/zlib/php_zlib.h
   A  ext/zlib/tests/bug55544.phpt
   M  ext/zlib/zlib.c


 Diff:
 diff --git a/ext/zlib/php_zlib.h b/ext/zlib/php_zlib.h
 index 449dfed..ab67351 100644
 --- a/ext/zlib/php_zlib.h
 +++ b/ext/zlib/php_zlib.h
 @@ -55,6 +55,7 @@ ZEND_BEGIN_MODULE_GLOBALS(zlib)
 long output_compression_default;
 char *output_handler;
 php_zlib_context *ob_gzhandler;
 +zend_bool handler_registered;
  ZEND_END_MODULE_GLOBALS(zlib);

  php_stream *php_stream_gzopen(php_stream_wrapper *wrapper, char *path, char 
 *mode, int options, char **opened_path, php_stream_context *context 
 STREAMS_DC TSRMLS_DC);
 diff --git a/ext/zlib/tests/bug55544.phpt b/ext/zlib/tests/bug55544.phpt
 new file mode 100644
 index 000..ca4214a
 Binary files /dev/null and b/ext/zlib/tests/bug55544.phpt differ
 diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
 index eac757b..7ff2b30 100644
 --- a/ext/zlib/zlib.c
 +++ b/ext/zlib/zlib.c
 @@ -263,6 +263,8 @@ static php_output_handler 
 *php_zlib_output_handler_init(const char *handler_name
 ZLIBG(output_compression) = chunk_size ? chunk_size : 
 PHP_OUTPUT_HANDLER_DEFAULT_SIZE;
 }

 +ZLIBG(handler_registered) = 1;
 +
 if ((h = php_output_handler_create_internal(handler_name, 
 handler_name_len, php_zlib_output_handler, chunk_size, flags TSRMLS_CC))) {
 php_output_handler_set_context(h, 
 php_zlib_output_handler_context_init(TSRMLS_C), 
 php_zlib_output_handler_context_dtor TSRMLS_CC);
 }
 @@ -964,9 +966,10 @@ static PHP_MSHUTDOWN_FUNCTION(zlib)
  static PHP_RINIT_FUNCTION(zlib)
  {
 ZLIBG(compression_coding) = 0;
 -   ZLIBG(output_compression) = ZLIBG(output_compression_default);
 -
 -   php_zlib_output_compression_start(TSRMLS_C);
 +if (!ZLIBG(handler_registered)) {
 +ZLIBG(output_compression) = ZLIBG(output_compression_default);
 +php_zlib_output_compression_start(TSRMLS_C);
 +}

 return SUCCESS;
  }
 @@ -976,6 +979,7 @@ static PHP_RINIT_FUNCTION(zlib)
  static PHP_RSHUTDOWN_FUNCTION(zlib)
  {
 php_zlib_cleanup_ob_gzhandler_mess(TSRMLS_C);
 +ZLIBG(handler_registered) = 0;

  return SUCCESS;
  }
 @@ -1000,6 +1004,7 @@ static PHP_MINFO_FUNCTION(zlib)
  static ZEND_MODULE_GLOBALS_CTOR_D(zlib)
  {
 zlib_globals-ob_gzhandler = NULL;
 +zlib_globals-handler_registered = 0;
  }
  /* }}} */


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #61964 (finfo_open with directory cause invalid free): ext/fileinfo/libmagic/apprentice.c ext/fileinfo/tests/bug61964.phpt

2012-07-15 Thread Laruence
Hi:
  okey,  I will do it this evening. :)

thanks

On Sun, Jul 15, 2012 at 5:41 PM, Stas Malyshev smalys...@sugarcrm.com wrote:
 Hi!

 I think this also needs an update of the patch file. Or did I overlook
 that somewhere?

 Ah, yes, probably. But I'm not sure how to properly do it. Any takers?
 --
 Stanislav Malyshev, Software Architect
 SugarCRM: http://www.sugarcrm.com/
 (408)454-6900 ext. 227





-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Merge branch 'pull-request/96' into PHP-5.4: NEWS ext/reflection/php_reflection.c

2012-07-15 Thread Laruence
Hi:
shouldn't new function only goes to trunk?

thanks

On Sun, Jul 15, 2012 at 2:08 PM, Stanislav Malyshev s...@php.net wrote:
 Commit:f4809424cd0041e6fdf030cef2d556d92332fe3a
 Author:Stanislav Malyshev s...@php.net Sat, 14 Jul 2012 
 23:07:11 -0700
 Parents:   55dbd8cf46389d7583a9ff25012d27b19d84cc96 
 13a9555342a4156a6150818234639b49a596ccd6
 Branches:  PHP-5.4 master

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=f4809424cd0041e6fdf030cef2d556d92332fe3a

 Log:
 Merge branch 'pull-request/96' into PHP-5.4

 * pull-request/96:
   Implemented FR #61602 Allow access to name of constant used as default value

 Bugs:
 https://bugs.php.net/61602

 Changed paths:
   MM  NEWS
   MM  ext/reflection/php_reflection.c


 Diff:
 diff --cc NEWS
 index ab49fe7,4af38a3..b3dcec7
 --- a/NEWS
 +++ b/NEWS
 @@@ -1,33 -1,5 +1,37 @@@
   PHP
 NEWS
   
 |||
  +?? ??? 2012, PHP 5.4.6
  +
  +- Core:
  +  . Fixed bug #62565 (Crashes due non-initialized internal 
 properties_table).
  +(Felipe)
  +
  +- CURL:
  +  . Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, ) returns 
 false).
  +(r.hampartsum...@gmail.com, Laruence)
  +
  +- DateTime:
  +  . Fixed Bug #62500 (Segfault in DateInterval class when extended). 
 (Laruence)
  +
  +- Fileinfo:
  +  . Fixed bug #61964 (finfo_open with directory causes invalid free).
  +  (reeze@gmail.com)
  +
  +- Intl:
  +  . Fixed bug #62564 (Extending MessageFormatter and adding property causes
  +crash). (Felipe)
  +
 ++- Reflection:
 ++  . Implemented FR ##61602 (Allow access to name of constant used as default
 ++value). (reeze@gmail.com)
 ++
  +- SimpleXML:
  +  . Implemented FR #55218 Get namespaces from current node. (Lonny)
  +
  +- SPL:
  +  . Fixed bug #61527 (ArrayIterator gives misleading notice on next() when
  +moved to the end). (reeze@gmail.com)
  +
   ?? ??? 2012, PHP 5.4.5

   - Core:


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed Bug #62500 (Segfault in DateInterval class when extended): NEWS ext/date/php_date.c ext/date/tests/bug62500.phpt

2012-07-10 Thread Laruence
On Tue, Jul 10, 2012 at 5:13 PM, Derick Rethans der...@php.net wrote:
 On Sun, 8 Jul 2012, Xinchen Hui wrote:

 Commit:e3b9b1e6dc016d9128ac5e9ed95aa5b1a5065e5f
 Author:Xinchen Hui larue...@php.net Mon, 9 Jul 2012 00:25:48 
 +0800
 Parents:   a213c10ef2125ac2da7a71ddb668d6f0aea8a05c
 Branches:  PHP-5.4

 Why is this not in PHP 5.3 and master?
Hi:
it should be merged into trunk.

I will merge it to 5.3 (except the zend_literal one, since
zend_literal was introduced in 5.4)

thanks

 cheers,
 Derick

 --
 http://derickrethans.nl | http://xdebug.org
 Like Xdebug? Consider a donation: http://xdebug.org/donate.php
 twitter: @derickr and @xdebug



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Add json_last_error_msg() function: ext/json/json.c ext/json/tests/003.phpt ext/json/tests/004.phpt ext/json/tests/007.phpt ext/json/tests/bug54058.phpt ext/json/tests/bug61

2012-06-30 Thread Laruence
On Sun, Jul 1, 2012 at 6:45 AM, Stas Malyshev smalys...@sugarcrm.com wrote:
 Hi!


 I hope you picked this function name to fuel the PHP is so
 inconsistent lovers.  Could I suggest picking something a little less
 a) different from everything else, and b) different from *everything*
 else?


 I think function name should be changed, and also all these big changes
 better belong to 5.5 than 5.3.

 I would propose renaming json_last_error to json_errno (keeping the
 json_last_error as an alias for BC) and having json_error as error
 message - just like all DB functions and many others do.
in this case,

I would suggest,  json_errno,  json_strerr,  :)

thanks
 --
 Stanislav Malyshev, Software Architect
 SugarCRM: http://www.sugarcrm.com/
 (408)454-6900 ext. 227

 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] 回复: com php-src: Implemented FR #61602 Allow access to name of constant used as

2012-05-22 Thread Laruence
Hi:

I am going to  revert this , please make a new PR after you fix this. :)

thanks

On Wed, May 23, 2012 at 11:55 AM, Reeze reeze@gmail.com wrote:
 Hi, Nuno,
 Thanks for reminding, I've attached a patch for this. could you take a look?
 GET_REFLECTION_OBJECT_PTR used widely, but define yet another macro seems
 useless, so I expand the macro.

 Thanks.

 Best
 --
 reeze | reeze.cn

 在 2012年5月23日星期三,上午2:50,Nuno Lopes 写道:

 Commit: 054f3e3ce5af13c2c3a6ccd54f7dc3e2f6cd4f74
 Author: reeze reeze@gmail.com Tue, 3 Apr 2012 13:47:16 +0800
 Parents: 3bf53aa911e1e2128a11aee45c126000635de006
 Branches: PHP-5.4 master

 Link:
 http://git.php.net/?p=php-src.git;a=commitdiff;h=054f3e3ce5af13c2c3a6ccd54f7dc3e2f6cd4f74

 Log:
 Implemented FR #61602 Allow access to name of constant used as default value

 Bugs:
 https://bugs.php.net/61602

 diff --git a/ext/reflection/php_reflection.c
 b/ext/reflection/php_reflection.c
 index 1cf65ce..ef1ed7e 100644
 --- a/ext/reflection/php_reflection.c
 +++ b/ext/reflection/php_reflection.c
 @@ -1457,6 +1457,57 @@ static void
 _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c
 }
 /* }}} */
 +/* {{{ _reflection_param_get_default_param */
 +static parameter_reference
 *_reflection_param_get_default_param(INTERNAL_FUNCTION_PARAMETERS)
 +{
 + reflection_object *intern;
 + parameter_reference *param;
 +
 + if (zend_parse_parameters_none() == FAILURE) {
 + return NULL;
 + }
 +
 + GET_REFLECTION_OBJECT_PTR(param);


 You cannot use GET_REFLECTION_OBJECT_PTR here because it has a
 'return;' statement (i.e., without a return value). While gcc accepts
 this (but issues a warning), it's considered an error in C99, and it
 breaks the build with other compilers.
 Please either fix it or revert the patch.

 Nuno



 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object): NEWS Zend/tests/bug62005.phpt Zend/zend_execute.c

2012-05-12 Thread Laruence
On Sat, May 12, 2012 at 2:00 PM, Stas Malyshev smalys...@sugarcrm.com wrote:
 Hi!

 Hi:
    this bug is kind of a serious one, since it's behavior wrongly.

    so maybe this one should merged to 5.3 and 5.4 branch..

 Could you explain why the change you did fixes the bug? Why does it
 matter where zend_error is called?

Hi Stas:

in the zend_error-php_error_cb,  it will rebuild the
active_symbol_table(if it is not built), which will change the
execute_data-CVs[0] . then ~

thanks

 --
 Stanislav Malyshev, Software Architect
 SugarCRM: http://www.sugarcrm.com/
 (408)454-6900 ext. 227

 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object): NEWS Zend/tests/bug62005.phpt Zend/zend_execute.c

2012-05-11 Thread Laruence
Hi:
   this bug is kind of a serious one, since it's behavior wrongly.

   so maybe this one should merged to 5.3 and 5.4 branch..

thanks

On Sat, May 12, 2012 at 1:13 PM, Xinchen Hui larue...@php.net wrote:
 Commit:    3332943c9d20a8b5e09816b11f38742de0e16085
 Author:    Xinchen Hui larue...@php.net         Sat, 12 May 2012 13:13:44 
 +0800
 Parents:   950d5ee590214742799836d3d939ee59f641bdf4
 Branches:  PHP-5.3

 Link:       
 http://git.php.net/?p=php-src.git;a=commitdiff;h=3332943c9d20a8b5e09816b11f38742de0e16085

 Log:
 Fixed Bug #62005 (unexpected behavior when incrementally assigning to a 
 member of a null object)

 Bugs:
 https://bugs.php.net/62005

 Changed paths:
  M  NEWS
  A  Zend/tests/bug62005.phpt
  M  Zend/zend_execute.c


 Diff:
 diff --git a/NEWS b/NEWS
 index e9c1370..1057db7 100644
 --- a/NEWS
 +++ b/NEWS
 @@ -11,6 +11,8 @@ PHP                                                         
                NEWS
     (Laruence)

  - Core:
 +  . Fixed bug #62005 (unexpected behavior when incrementally assigning to a
 +    member of a null object). (Laruence)
   . Fixed bug #61730 (Segfault from array_walk modifying an array passed by
     reference). (Laruence)
   . Fixed missing bound check in iptcparse(). (chris at chiappa.net)
 diff --git a/Zend/tests/bug62005.phpt b/Zend/tests/bug62005.phpt
 new file mode 100644
 index 000..4ff4b2c
 --- /dev/null
 +++ b/Zend/tests/bug62005.phpt
 @@ -0,0 +1,15 @@
 +--TEST--
 +Bug #62005 (unexpected behavior when incrementally assigning to a member of 
 a null object)
 +--FILE--
 +?php
 +function add_points($player, $points) {
 +    $player-energy += $points;
 +    print_r($player);
 +}
 +add_points(NULL, 2);
 +--EXPECTF--
 +Strict Standards: Creating default object from empty value in %sbug62005.php 
 on line %d
 +stdClass Object
 +(
 +    [energy] = 2
 +)
 diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
 index 705c713..4423921 100644
 --- a/Zend/zend_execute.c
 +++ b/Zend/zend_execute.c
 @@ -432,11 +432,10 @@ static inline void make_real_object(zval **object_ptr 
 TSRMLS_DC)
                || (Z_TYPE_PP(object_ptr) == IS_BOOL  Z_LVAL_PP(object_ptr) 
 == 0)
                || (Z_TYPE_PP(object_ptr) == IS_STRING  
 Z_STRLEN_PP(object_ptr) == 0)
        ) {
 -               zend_error(E_STRICT, Creating default object from empty 
 value);
 -
                SEPARATE_ZVAL_IF_NOT_REF(object_ptr);
                zval_dtor(*object_ptr);
                object_init(*object_ptr);
 +               zend_error(E_STRICT, Creating default object from empty 
 value);
        }
  }


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object): NEWS Zend/tests/bug62005.phpt Zend/zend_execute.c

2012-05-11 Thread Laruence
On Sat, May 12, 2012 at 1:23 PM, Laruence larue...@php.net wrote:
 Hi:
   this bug is kind of a serious one, since it's behavior wrongly.
RMS:

 I think I should note that the reason why I said it is a serious one,
following script:

?php
function add_points($player, $points) {
$player-energy += $points;
var_dump($player);
}

add_points(NULL, 2);
?

will ouput:

NULL

in 5.3 and 5.4


thanks

   so maybe this one should merged to 5.3 and 5.4 branch..

 thanks

 On Sat, May 12, 2012 at 1:13 PM, Xinchen Hui larue...@php.net wrote:
 Commit:    3332943c9d20a8b5e09816b11f38742de0e16085
 Author:    Xinchen Hui larue...@php.net         Sat, 12 May 2012 13:13:44 
 +0800
 Parents:   950d5ee590214742799836d3d939ee59f641bdf4
 Branches:  PHP-5.3

 Link:       
 http://git.php.net/?p=php-src.git;a=commitdiff;h=3332943c9d20a8b5e09816b11f38742de0e16085

 Log:
 Fixed Bug #62005 (unexpected behavior when incrementally assigning to a 
 member of a null object)

 Bugs:
 https://bugs.php.net/62005

 Changed paths:
  M  NEWS
  A  Zend/tests/bug62005.phpt
  M  Zend/zend_execute.c


 Diff:
 diff --git a/NEWS b/NEWS
 index e9c1370..1057db7 100644
 --- a/NEWS
 +++ b/NEWS
 @@ -11,6 +11,8 @@ PHP                                                        
                 NEWS
     (Laruence)

  - Core:
 +  . Fixed bug #62005 (unexpected behavior when incrementally assigning to a
 +    member of a null object). (Laruence)
   . Fixed bug #61730 (Segfault from array_walk modifying an array passed by
     reference). (Laruence)
   . Fixed missing bound check in iptcparse(). (chris at chiappa.net)
 diff --git a/Zend/tests/bug62005.phpt b/Zend/tests/bug62005.phpt
 new file mode 100644
 index 000..4ff4b2c
 --- /dev/null
 +++ b/Zend/tests/bug62005.phpt
 @@ -0,0 +1,15 @@
 +--TEST--
 +Bug #62005 (unexpected behavior when incrementally assigning to a member of 
 a null object)
 +--FILE--
 +?php
 +function add_points($player, $points) {
 +    $player-energy += $points;
 +    print_r($player);
 +}
 +add_points(NULL, 2);
 +--EXPECTF--
 +Strict Standards: Creating default object from empty value in 
 %sbug62005.php on line %d
 +stdClass Object
 +(
 +    [energy] = 2
 +)
 diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
 index 705c713..4423921 100644
 --- a/Zend/zend_execute.c
 +++ b/Zend/zend_execute.c
 @@ -432,11 +432,10 @@ static inline void make_real_object(zval **object_ptr 
 TSRMLS_DC)
                || (Z_TYPE_PP(object_ptr) == IS_BOOL  Z_LVAL_PP(object_ptr) 
 == 0)
                || (Z_TYPE_PP(object_ptr) == IS_STRING  
 Z_STRLEN_PP(object_ptr) == 0)
        ) {
 -               zend_error(E_STRICT, Creating default object from empty 
 value);
 -
                SEPARATE_ZVAL_IF_NOT_REF(object_ptr);
                zval_dtor(*object_ptr);
                object_init(*object_ptr);
 +               zend_error(E_STRICT, Creating default object from empty 
 value);
        }
  }


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




 --
 Laruence  Xinchen Hui
 http://www.laruence.com/



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Typo: sapi/cli/php_cli_server.c

2012-05-08 Thread Laruence
Hi:

sorry for the typo, didn't test windows build , thanks for the fix ;)

thanks

On Wed, May 9, 2012 at 4:08 AM, David Soria Parra d...@php.net wrote:
 Commit:    2cb0ed1328da3bca00990648c3dfc90c957395f1
 Author:    David Soria Parra d...@php.net         Tue, 8 May 2012 22:08:54 
 +0200
 Parents:   87fa84abde7bb49e58136ea239ce4d25d211bb7e
 Branches:  PHP-5.4 master

 Link:       
 http://git.php.net/?p=php-src.git;a=commitdiff;h=2cb0ed1328da3bca00990648c3dfc90c957395f1

 Log:
 Typo

 Changed paths:
  M  sapi/cli/php_cli_server.c


 Diff:
 diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
 index 0850425..e052aa8 100644
 --- a/sapi/cli/php_cli_server.c
 +++ b/sapi/cli/php_cli_server.c
 @@ -1356,7 +1356,7 @@ static void 
 php_cli_server_request_translate_vpath(php_cli_server_request *reque
        if (prev_path) {
                request-path_info_len = prev_path_len;
  #ifdef PHP_WIN32
 -               while (prev_pach_len--) {
 +               while (prev_path_len--) {
                        if (prev_path[prev_path_len] == '\\') {
                                prev_path[prev_path_len] = '/';
                        }


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config): NEWS Zend/zend.c

2012-05-05 Thread Laruence
On Sat, May 5, 2012 at 2:36 PM, Dmitry Stogov dmi...@zend.com wrote:
 Hi Laruence,

 Thank you for sending this.

 I'm not sure if the patch is completely correct.
 With the patch all the threads share the single copy of script_encoding_list
 and when one thread terminates it calls compiler_globals_dtor() and frees
 the script_encoding_list. But other threads still keep reference to it.

 I think we have to duplicate script_encoding_list for each thread in the
 same way as we do for CG(function_table).
right, thanks

 Also I noticed a related issue. At zend.c compiler_globals_dtor()
 CG(script_encoding_list) deallocated using free() and in zend_multibyte.c
 zend_multibyte_set_script_encoding() using efree().

 I suppose the second place has to be fixed.

 I would appreciate if you could look into the problems.
okey, I will, thanks :)


 Thanks. Dmitry.



 On 05/03/2012 06:51 PM, Laruence wrote:

 Hi, Dmitry:

      you may want to review this,  :)

 thanks
 On Thu, May 3, 2012 at 10:39 PM, Xinchen Huilarue...@php.net  wrote:

 Commit:    72f19e9a8bcf5712b24fa333a26616eff19ac1ce
 Author:    Xinchen Huilarue...@php.net           Thu, 3 May 2012
 22:39:53 +0800
 Parents:   d74d88fbb9c29b1dd5ff05a54b72cf7c9250955c
 Branches:  PHP-5.4

 Link:
 http://git.php.net/?p=php-src.git;a=commitdiff;h=72f19e9a8bcf5712b24fa333a26616eff19ac1ce

 Log:
 Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config)

 Bugs:
 https://bugs.php.net/61922

 Changed paths:
  M  NEWS
  M  Zend/zend.c


 Diff:
 diff --git a/NEWS b/NEWS
 index 8796cf4..9ef6abf 100644
 --- a/NEWS
 +++ b/NEWS
 @@ -10,6 +10,8 @@ PHP
                    NEWS
     (Laruence)

  - Core:
 +  . Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding
 config).
 +    (Laruence)
   . Fixed missing bound check in iptcparse(). (chris at chiappa.net)
   . Fixed bug #61827 (incorrect \e processing on Windows) (Anatoliy)
   . Fixed bug #61761 ('Overriding' a private static method with a
 different
 diff --git a/Zend/zend.c b/Zend/zend.c
 index dd299f1..37a1a27 100644
 --- a/Zend/zend.c
 +++ b/Zend/zend.c
 @@ -781,6 +781,8 @@ void zend_register_standard_ini_entries(TSRMLS_D) /*
 {{{ */
  void zend_post_startup(TSRMLS_D) /* {{{ */
  {
  #ifdef ZTS
 +       zend_encoding **script_encoding_list;
 +
        zend_compiler_globals *compiler_globals =
 ts_resource(compiler_globals_id);
        zend_executor_globals *executor_globals =
 ts_resource(executor_globals_id);

 @@ -795,7 +797,12 @@ void zend_post_startup(TSRMLS_D) /* {{{ */
        zend_destroy_rsrc_list(EG(persistent_list) TSRMLS_CC);
        free(compiler_globals-function_table);
        free(compiler_globals-class_table);
 -       compiler_globals_ctor(compiler_globals, tsrm_ls);
 +       if ((script_encoding_list = (zend_encoding
 **)compiler_globals-script_encoding_list)) {
 +               compiler_globals_ctor(compiler_globals, tsrm_ls);
 +               compiler_globals-script_encoding_list = (const
 zend_encoding **)script_encoding_list;
 +       } else {
 +               compiler_globals_ctor(compiler_globals, tsrm_ls);
 +       }
        free(EG(zend_constants));
        executor_globals_ctor(executor_globals, tsrm_ls);
        global_persistent_list =EG(persistent_list);


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php








-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config): NEWS Zend/zend.c

2012-05-05 Thread Laruence
Hi Dmitry:

On Sat, May 5, 2012 at 6:38 PM, Laruence larue...@php.net wrote:
 On Sat, May 5, 2012 at 2:36 PM, Dmitry Stogov dmi...@zend.com wrote:
 Hi Laruence,

 Thank you for sending this.

 I'm not sure if the patch is completely correct.
 With the patch all the threads share the single copy of script_encoding_list
 and when one thread terminates it calls compiler_globals_dtor() and frees
 the script_encoding_list. But other threads still keep reference to it.

 I think we have to duplicate script_encoding_list for each thread in the
 same way as we do for CG(function_table).

after a further exam, this is right, there is a mechanism for new
thread re-configure inis(zend_ini_refresh_caches). then new thread
will have a copy.

 right, thanks

 Also I noticed a related issue. At zend.c compiler_globals_dtor()
 CG(script_encoding_list) deallocated using free() and in zend_multibyte.c
 zend_multibyte_set_script_encoding() using efree().

 I suppose the second place has to be fixed.

 I would appreciate if you could look into the problems.
and this should use free, I will fix it . however for now it's dead
codes,  so no bug feedback. :)

thanks
 okey, I will, thanks :)


 Thanks. Dmitry.



 On 05/03/2012 06:51 PM, Laruence wrote:

 Hi, Dmitry:

      you may want to review this,  :)

 thanks
 On Thu, May 3, 2012 at 10:39 PM, Xinchen Huilarue...@php.net  wrote:

 Commit:    72f19e9a8bcf5712b24fa333a26616eff19ac1ce
 Author:    Xinchen Huilarue...@php.net           Thu, 3 May 2012
 22:39:53 +0800
 Parents:   d74d88fbb9c29b1dd5ff05a54b72cf7c9250955c
 Branches:  PHP-5.4

 Link:
 http://git.php.net/?p=php-src.git;a=commitdiff;h=72f19e9a8bcf5712b24fa333a26616eff19ac1ce

 Log:
 Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config)

 Bugs:
 https://bugs.php.net/61922

 Changed paths:
  M  NEWS
  M  Zend/zend.c


 Diff:
 diff --git a/NEWS b/NEWS
 index 8796cf4..9ef6abf 100644
 --- a/NEWS
 +++ b/NEWS
 @@ -10,6 +10,8 @@ PHP
                    NEWS
     (Laruence)

  - Core:
 +  . Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding
 config).
 +    (Laruence)
   . Fixed missing bound check in iptcparse(). (chris at chiappa.net)
   . Fixed bug #61827 (incorrect \e processing on Windows) (Anatoliy)
   . Fixed bug #61761 ('Overriding' a private static method with a
 different
 diff --git a/Zend/zend.c b/Zend/zend.c
 index dd299f1..37a1a27 100644
 --- a/Zend/zend.c
 +++ b/Zend/zend.c
 @@ -781,6 +781,8 @@ void zend_register_standard_ini_entries(TSRMLS_D) /*
 {{{ */
  void zend_post_startup(TSRMLS_D) /* {{{ */
  {
  #ifdef ZTS
 +       zend_encoding **script_encoding_list;
 +
        zend_compiler_globals *compiler_globals =
 ts_resource(compiler_globals_id);
        zend_executor_globals *executor_globals =
 ts_resource(executor_globals_id);

 @@ -795,7 +797,12 @@ void zend_post_startup(TSRMLS_D) /* {{{ */
        zend_destroy_rsrc_list(EG(persistent_list) TSRMLS_CC);
        free(compiler_globals-function_table);
        free(compiler_globals-class_table);
 -       compiler_globals_ctor(compiler_globals, tsrm_ls);
 +       if ((script_encoding_list = (zend_encoding
 **)compiler_globals-script_encoding_list)) {
 +               compiler_globals_ctor(compiler_globals, tsrm_ls);
 +               compiler_globals-script_encoding_list = (const
 zend_encoding **)script_encoding_list;
 +       } else {
 +               compiler_globals_ctor(compiler_globals, tsrm_ls);
 +       }
        free(EG(zend_constants));
        executor_globals_ctor(executor_globals, tsrm_ls);
        global_persistent_list =EG(persistent_list);


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php








 --
 Laruence  Xinchen Hui
 http://www.laruence.com/



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config): NEWS Zend/zend.c

2012-05-03 Thread Laruence
Hi, Dmitry:

 you may want to review this,  :)

thanks
On Thu, May 3, 2012 at 10:39 PM, Xinchen Hui larue...@php.net wrote:
 Commit:    72f19e9a8bcf5712b24fa333a26616eff19ac1ce
 Author:    Xinchen Hui larue...@php.net         Thu, 3 May 2012 22:39:53 
 +0800
 Parents:   d74d88fbb9c29b1dd5ff05a54b72cf7c9250955c
 Branches:  PHP-5.4

 Link:       
 http://git.php.net/?p=php-src.git;a=commitdiff;h=72f19e9a8bcf5712b24fa333a26616eff19ac1ce

 Log:
 Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config)

 Bugs:
 https://bugs.php.net/61922

 Changed paths:
  M  NEWS
  M  Zend/zend.c


 Diff:
 diff --git a/NEWS b/NEWS
 index 8796cf4..9ef6abf 100644
 --- a/NEWS
 +++ b/NEWS
 @@ -10,6 +10,8 @@ PHP                                                         
                NEWS
     (Laruence)

  - Core:
 +  . Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config).
 +    (Laruence)
   . Fixed missing bound check in iptcparse(). (chris at chiappa.net)
   . Fixed bug #61827 (incorrect \e processing on Windows) (Anatoliy)
   . Fixed bug #61761 ('Overriding' a private static method with a different
 diff --git a/Zend/zend.c b/Zend/zend.c
 index dd299f1..37a1a27 100644
 --- a/Zend/zend.c
 +++ b/Zend/zend.c
 @@ -781,6 +781,8 @@ void zend_register_standard_ini_entries(TSRMLS_D) /* {{{ 
 */
  void zend_post_startup(TSRMLS_D) /* {{{ */
  {
  #ifdef ZTS
 +       zend_encoding **script_encoding_list;
 +
        zend_compiler_globals *compiler_globals = 
 ts_resource(compiler_globals_id);
        zend_executor_globals *executor_globals = 
 ts_resource(executor_globals_id);

 @@ -795,7 +797,12 @@ void zend_post_startup(TSRMLS_D) /* {{{ */
        zend_destroy_rsrc_list(EG(persistent_list) TSRMLS_CC);
        free(compiler_globals-function_table);
        free(compiler_globals-class_table);
 -       compiler_globals_ctor(compiler_globals, tsrm_ls);
 +       if ((script_encoding_list = (zend_encoding 
 **)compiler_globals-script_encoding_list)) {
 +               compiler_globals_ctor(compiler_globals, tsrm_ls);
 +               compiler_globals-script_encoding_list = (const zend_encoding 
 **)script_encoding_list;
 +       } else {
 +               compiler_globals_ctor(compiler_globals, tsrm_ls);
 +       }
        free(EG(zend_constants));
        executor_globals_ctor(executor_globals, tsrm_ls);
        global_persistent_list = EG(persistent_list);


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Make output order for dom007.phpt platform independent: ext/dom/tests/dom007.phpt

2012-05-01 Thread Laruence
On Wed, May 2, 2012 at 6:43 AM, Christopher Jones s...@php.net wrote:
 Commit:    d14f23365cda4e830aa09fcf1d64c07c4fde21c9
 Author:    Christopher Jones s...@php.net         Tue, 1 May 2012 15:43:31 
 -0700
 Parents:   02e25df8b5a7c60364c7153c03da59de3a556a87
 Branches:  PHP-5.3 PHP-5.4 master

 Link:       
 http://git.php.net/?p=php-src.git;a=commitdiff;h=d14f23365cda4e830aa09fcf1d64c07c4fde21c9

 Log:
 Make output order for dom007.phpt platform independent

 This test has long been near the top of the reported output diffs.
 For example, on http://qa.php.net/reports/?version=5.4.0 it has diffed
 1307 times out of 3543 reports, at time of this commit.  (The second
 highest diff has occurred 710 times.)
thanks for the fix :)

 Changed paths:
  M  ext/dom/tests/dom007.phpt


 Diff:
 diff --git a/ext/dom/tests/dom007.phpt b/ext/dom/tests/dom007.phpt
 index 649d630..5d12aa3 100644
 --- a/ext/dom/tests/dom007.phpt
 +++ b/ext/dom/tests/dom007.phpt
 @@ -63,12 +63,24 @@ echo \n;
  $ents = $dtd-entities;
  $length = $ents-length;
  echo Length: .$length.\n;
 +
 +$xkeys = array();
  foreach ($ents AS $key=$node) {
 -       echo Key: $key Name: .$node-nodeName.\n;
 +       $xkeys[] = Key: $key Name: .$node-nodeName.\n;
 +}
 +sort($xkeys);  // fix inconsistent output ordering (bug #61810)
 +foreach ($xkeys as $key = $node) {
 +       echo $node;
  }
  echo \n;
 +
 +$xkeys = array();
  for($x=0; $x  $length; $x++) {
 -       echo Index $x: .$ents-item($x)-nodeName.\n;
 +       $xkeys[] = Index: .$ents-item($x)-nodeName.\n;
 +}
 +sort($xkeys);  // fix inconsistent output ordering (bug #61810)
 +foreach ($xkeys as $key = $node) {
 +       echo $node;
  }

  echo \n;
 @@ -87,13 +99,13 @@ Index 0: GIF (image/gif) (-)
  NULL

  Length: 3
 -Key: test Name: test
 -Key: rdf Name: rdf
  Key: myimage Name: myimage
 +Key: rdf Name: rdf
 +Key: test Name: test

 -Index 0: test
 -Index 1: rdf
 -Index 2: myimage
 +Index: myimage
 +Index: rdf
 +Index: test

  NULL
  NULL


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Bug #61566 Fileinfo ext\fileinfo\tests\finfo_file_002.phpt fails: ext/fileinfo/libmagic/cdf.c ext/fileinfo/libmagic/compress.c ext/fileinfo/libmagic/file.h ext/fileinfo/libm

2012-04-22 Thread Laruence
Hi Anotoliy:

   this fix cause two tests failed in 5.3, https://bugs.php.net/bug.php?id=61811

   could you plz look at this? maybe a wrong merge?

thanks

On Mon, Apr 2, 2012 at 11:22 PM, Anatoliy Belsky a...@php.net wrote:
 Commit:    909713e233704b4ac317ff3bb397cb40a82795b8
 Author:    Anatoliy Belsky a...@php.net         Mon, 2 Apr 2012 17:22:46 
 +0200
 Parents:   0cdba53aae783fd63f0aa525bc92e73d9e4c0aab
 Branches:  PHP-5.3 PHP-5.4 master

 Link:       
 http://git.php.net/?p=php-src.git;a=commitdiff;h=909713e233704b4ac317ff3bb397cb40a82795b8

 Log:
 Bug #61566 Fileinfo ext\fileinfo\tests\finfo_file_002.phpt fails

 This patch fixes the failure caused by the
 posix lseek and read versions under windows in cdf_read() .
 Additionally all the occurences of lseek and read
 was replaced by _lseek and _reed for windows.

 Bugs:
 https://bugs.php.net/61566

 Changed paths:
  M  ext/fileinfo/libmagic/cdf.c
  M  ext/fileinfo/libmagic/compress.c
  M  ext/fileinfo/libmagic/file.h
  M  ext/fileinfo/libmagic/readelf.c
  M  ext/fileinfo/tests/finfo_open_001.phpt
  M  ext/fileinfo/tests/finfo_open_error.phpt


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Bug #61566 Fileinfo ext\fileinfo\tests\finfo_file_002.phpt fails: ext/fileinfo/libmagic/cdf.c ext/fileinfo/libmagic/compress.c ext/fileinfo/libmagic/file.h ext/fileinfo/libm

2012-04-22 Thread Laruence
Hi, Anotoliy:

one more this, if you update libmagic, plz also update the libmagic.patch..

thanks

On Sun, Apr 22, 2012 at 8:10 PM, Laruence larue...@php.net wrote:
 Hi Anotoliy:

   this fix cause two tests failed in 5.3, 
 https://bugs.php.net/bug.php?id=61811

   could you plz look at this? maybe a wrong merge?

 thanks

 On Mon, Apr 2, 2012 at 11:22 PM, Anatoliy Belsky a...@php.net wrote:
 Commit:    909713e233704b4ac317ff3bb397cb40a82795b8
 Author:    Anatoliy Belsky a...@php.net         Mon, 2 Apr 2012 17:22:46 
 +0200
 Parents:   0cdba53aae783fd63f0aa525bc92e73d9e4c0aab
 Branches:  PHP-5.3 PHP-5.4 master

 Link:       
 http://git.php.net/?p=php-src.git;a=commitdiff;h=909713e233704b4ac317ff3bb397cb40a82795b8

 Log:
 Bug #61566 Fileinfo ext\fileinfo\tests\finfo_file_002.phpt fails

 This patch fixes the failure caused by the
 posix lseek and read versions under windows in cdf_read() .
 Additionally all the occurences of lseek and read
 was replaced by _lseek and _reed for windows.

 Bugs:
 https://bugs.php.net/61566

 Changed paths:
  M  ext/fileinfo/libmagic/cdf.c
  M  ext/fileinfo/libmagic/compress.c
  M  ext/fileinfo/libmagic/file.h
  M  ext/fileinfo/libmagic/readelf.c
  M  ext/fileinfo/tests/finfo_open_001.phpt
  M  ext/fileinfo/tests/finfo_open_error.phpt


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



 --
 Laruence  Xinchen Hui
 http://www.laruence.com/



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #61728 (php-fpm SIGSEGV running friendica on nginx): NEWS ext/session/tests/bug61728.phpt main/main.c

2012-04-15 Thread Laruence
Mike:
you may want to review this fix, http://news.php.net/php.cvs/68772
,  thanks


On Sun, Apr 15, 2012 at 1:00 PM, Laruence larue...@php.net wrote:
 On Sun, Apr 15, 2012 at 12:36 PM, Stas Malyshev smalys...@sugarcrm.com 
 wrote:
 Hi!

 I'm not sure this is a good idea - output buffers can include output
 functions IIRC, but you have already shut down modules. I would be very,
 Stas, they are request shutdown, not module shutdown :)

 Request shutdown IIRC destroys functions and module's per-request data
 structures, which user-supplied output handlers may need. Did you check
 that user-supplied output handlers - especially those that use
 extensions and per-request data structures - actually work after this
 change?

 Ah, thanks, I got your point.  but output handler is called in step 3:
  /* 3. Flush all output buffers */

 and as I said, all tests passed.

 anyway, you are right, we should be careful,  I will double check it.  :)

 thanks

 --
 Stanislav Malyshev, Software Architect
 SugarCRM: http://www.sugarcrm.com/
 (408)454-6900 ext. 227



 --
 Laruence  Xinchen Hui
 http://www.laruence.com/



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #61728 (php-fpm SIGSEGV running friendica on nginx): NEWS ext/session/tests/bug61728.phpt main/main.c

2012-04-14 Thread Laruence
Hi:
   you may want to review this patch.

   I have make sure all tests passed, but still not sure is there any
side-effect.

thanks

On Sun, Apr 15, 2012 at 1:16 AM, Xinchen Hui larue...@php.net wrote:
 Commit:    3b42f184cdcf512fdc1f944052bfa296f17a035f
 Author:    Xinchen Hui larue...@php.net         Sun, 15 Apr 2012 01:16:34 
 +0800
 Parents:   6ecac269728360180a2813e75dfbe8338a05a27a
 Branches:  PHP-5.4

 Link:       
 http://git.php.net/?p=php-src.git;a=commitdiff;h=3b42f184cdcf512fdc1f944052bfa296f17a035f

 Log:
 Fixed bug #61728 (php-fpm SIGSEGV running friendica on nginx)

 Bugs:
 https://bugs.php.net/61728

 Changed paths:
  M  NEWS
  A  ext/session/tests/bug61728.phpt
  M  main/main.c


 Diff:
 diff --git a/NEWS b/NEWS
 index 05cc254..2b65382 100644
 --- a/NEWS
 +++ b/NEWS
 @@ -17,6 +17,7 @@ PHP                                                         
                NEWS
  (merge after 5.3.11 release)

  - Core:
 +  . Fixed bug #61728 (php-fpm SIGSEGV running friendica on nginx). (Laruence)
   . Fixed bug #61660 (bin2hex(hex2bin($data)) != $data). (Nikita Popov)
   . Fixed bug #61650 (ini parser crashes when using ${} ini variables
     (without apache2)). (Laruence)
 diff --git a/ext/session/tests/bug61728.phpt b/ext/session/tests/bug61728.phpt
 new file mode 100644
 index 000..30b876e
 --- /dev/null
 +++ b/ext/session/tests/bug61728.phpt
 @@ -0,0 +1,39 @@
 +--TEST--
 +Bug #61728 (php-fpm SIGSEGV running friendica on nginx)
 +--SKIPIF--
 +?php include('skipif.inc'); ?
 +--FILE--
 +?php
 +function output_html($ext) {
 +    return strlen($ext);
 +}
 +
 +function open ($save_path, $session_name) {
 +    return true;
 +}
 +
 +function close() {
 +    return true;
 +}
 +
 +function read ($id) {
 +}
 +
 +function write ($id, $sess_data) {
 +    ob_start(output_html);
 +    echo laruence;
 +    ob_end_flush();
 +    return true;
 +}
 +
 +function destroy ($id) {
 +}
 +
 +function gc ($maxlifetime) {
 +    return true;
 +}
 +
 +session_set_save_handler (open, close, read, write, destroy, gc);
 +session_start();
 +--EXPECTF--
 +8
 diff --git a/main/main.c b/main/main.c
 index 6a04ddb..c34f952 100644
 --- a/main/main.c
 +++ b/main/main.c
 @@ -1740,22 +1740,22 @@ void php_request_shutdown(void *dummy)
                }
        } zend_end_try();

 -       /* 4. Shutdown output layer (send the set HTTP headers, cleanup 
 output handlers, etc.) */
 -       zend_try {
 -               php_output_deactivate(TSRMLS_C);
 -       } zend_end_try();
 -
 -       /* 5. Reset max_execution_time (no longer executing php code after 
 response sent) */
 +       /* 4. Reset max_execution_time (no longer executing php code after 
 response sent) */
        zend_try {
                zend_unset_timeout(TSRMLS_C);
        } zend_end_try();

 -       /* 6. Call all extensions RSHUTDOWN functions */
 +       /* 5. Call all extensions RSHUTDOWN functions */
        if (PG(modules_activated)) {
                zend_deactivate_modules(TSRMLS_C);
                php_free_shutdown_functions(TSRMLS_C);
        }

 +       /* 6. Shutdown output layer (send the set HTTP headers, cleanup 
 output handlers, etc.) */
 +       zend_try {
 +               php_output_deactivate(TSRMLS_C);
 +       } zend_end_try();
 +
        /* 7. Destroy super-globals */
        zend_try {
                int i;


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #61728 (php-fpm SIGSEGV running friendica on nginx): NEWS ext/session/tests/bug61728.phpt main/main.c

2012-04-14 Thread Laruence
On Sun, Apr 15, 2012 at 6:07 AM, Stas Malyshev smalys...@sugarcrm.com wrote:
 Hi!

 Hi:
    you may want to review this patch.

    I have make sure all tests passed, but still not sure is there any
 side-effect.

 I'm not sure this is a good idea - output buffers can include output
 functions IIRC, but you have already shut down modules. I would be very,
Stas, they are request shutdown, not module shutdown :)

thanks
 very careful with changing shutdown order. Especially in stable version.
 --
 Stanislav Malyshev, Software Architect
 SugarCRM: http://www.sugarcrm.com/
 (408)454-6900 ext. 227



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Merge branch 'PHP-5.4': main/main.c

2012-04-14 Thread Laruence
On Sun, Apr 15, 2012 at 5:22 AM, Yasuo Ohgaki yohg...@ohgaki.net wrote:
 Hi,

 2012/4/15 Xinchen Hui larue...@php.net:
 Commit:    579d234f5078fc87b0b21a333a5fdfc60e9df124
 Author:    Xinchen Hui larue...@php.net         Sun, 15 Apr 2012 01:17:56 
 +0800
 Parents:   c62a41860e151b3c95ccd05d1ad7d25797219563 
 3b42f184cdcf512fdc1f944052bfa296f17a035f
 Branches:  master

 Link:       
 http://git.php.net/?p=php-src.git;a=commitdiff;h=579d234f5078fc87b0b21a333a5fdfc60e9df124

 Log:
 Merge branch 'PHP-5.4'

 Changed paths:
  MM  main/main.c

 It seems phpt is not merged.

hmm, weird, I will re-commit the phpt.

thanks

 Regards,

 --
 Yasuo Ohgaki
 yohg...@ohgaki.net



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Merge branch 'PHP-5.4': main/main.c

2012-04-14 Thread Laruence
On Sun, Apr 15, 2012 at 11:43 AM, Laruence larue...@php.net wrote:
 On Sun, Apr 15, 2012 at 5:22 AM, Yasuo Ohgaki yohg...@ohgaki.net wrote:
 Hi,

 2012/4/15 Xinchen Hui larue...@php.net:
 Commit:    579d234f5078fc87b0b21a333a5fdfc60e9df124
 Author:    Xinchen Hui larue...@php.net         Sun, 15 Apr 2012 01:17:56 
 +0800
 Parents:   c62a41860e151b3c95ccd05d1ad7d25797219563 
 3b42f184cdcf512fdc1f944052bfa296f17a035f
 Branches:  master

 Link:       
 http://git.php.net/?p=php-src.git;a=commitdiff;h=579d234f5078fc87b0b21a333a5fdfc60e9df124

 Log:
 Merge branch 'PHP-5.4'

 Changed paths:
  MM  main/main.c

 It seems phpt is not merged.

Actually, there are commited. but not sure, maybe the mail's bug

thanks

 hmm, weird, I will re-commit the phpt.

 thanks

 Regards,

 --
 Yasuo Ohgaki
 yohg...@ohgaki.net



 --
 Laruence  Xinchen Hui
 http://www.laruence.com/



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #61728 (php-fpm SIGSEGV running friendica on nginx): NEWS ext/session/tests/bug61728.phpt main/main.c

2012-04-14 Thread Laruence
On Sun, Apr 15, 2012 at 12:36 PM, Stas Malyshev smalys...@sugarcrm.com wrote:
 Hi!

 I'm not sure this is a good idea - output buffers can include output
 functions IIRC, but you have already shut down modules. I would be very,
 Stas, they are request shutdown, not module shutdown :)

 Request shutdown IIRC destroys functions and module's per-request data
 structures, which user-supplied output handlers may need. Did you check
 that user-supplied output handlers - especially those that use
 extensions and per-request data structures - actually work after this
 change?

Ah, thanks, I got your point.  but output handler is called in step 3:
 /* 3. Flush all output buffers */

and as I said, all tests passed.

anyway, you are right, we should be careful,  I will double check it.  :)

thanks

 --
 Stanislav Malyshev, Software Architect
 SugarCRM: http://www.sugarcrm.com/
 (408)454-6900 ext. 227



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fix bug #61660: bin2hex(hex2bin($data)) != $data: NEWS ext/standard/string.c ext/standard/tests/strings/bug61660.phpt

2012-04-08 Thread Laruence
On Mon, Apr 9, 2012 at 4:36 AM, Nikita Popov ni...@php.net wrote:
 Commit:    7ae93a2c4c8a51cc2aec9977ce3c83c100e382a0
 Author:    Nikita Popov ni...@php.net         Sun, 8 Apr 2012 22:36:50 +0200
 Parents:   f7d407678570f8e4063b70bd30f3fc19c10442ea
 Branches:  PHP-5.4 master

 Link:       
 http://git.php.net/?p=php-src.git;a=commitdiff;h=7ae93a2c4c8a51cc2aec9977ce3c83c100e382a0

 Log:
 Fix bug #61660: bin2hex(hex2bin($data)) != $data

 If the input data has an odd length a warning is thrown and false is returned.

 Bugs:
 https://bugs.php.net/61660

 Changed paths:
  M  NEWS
  M  ext/standard/string.c
  A  ext/standard/tests/strings/bug61660.phpt


 Diff:
 diff --git a/NEWS b/NEWS
 index 7b80084..42f7cd9 100644
 --- a/NEWS
 +++ b/NEWS
 @@ -9,6 +9,7 @@ PHP                                                           
              NEWS
   . Connection: close instead of Connection: closed (Gustavo)

  - Core:
 +  . Fixed bug #61660 (bin2hex(hex2bin($data)) != $data). (Nikita Popov)
   . Fixed bug #61650 (ini parser crashes when using ${} ini variables
     (without apache2)). (Laruence)
   . Fixed bug #61605 (header_remove() does not remove all headers). (Laruence)
 diff --git a/ext/standard/string.c b/ext/standard/string.c
 index 0aade78..5c33232 100644
 --- a/ext/standard/string.c
 +++ b/ext/standard/string.c
 @@ -266,6 +266,11 @@ PHP_FUNCTION(hex2bin)
                return;
        }

 +       if (datalen % 2 != 0) {
Hi:
I prefer to use datalen  1, but up to you  :)

thanks
 +               php_error_docref(NULL TSRMLS_CC, E_WARNING, Hexadecimal 
 input string must have an even length);
 +               RETURN_FALSE;
 +       }
 +
        result = php_hex2bin((unsigned char *)data, datalen, newlen);

        if (!result) {
 diff --git a/ext/standard/tests/strings/bug61660.phpt 
 b/ext/standard/tests/strings/bug61660.phpt
 new file mode 100644
 index 000..010ea47
 --- /dev/null
 +++ b/ext/standard/tests/strings/bug61660.phpt
 @@ -0,0 +1,11 @@
 +--TEST--
 +Bug #61660: bin2hex(hex2bin($data)) != $data
 +--FILE--
 +?php
 +
 +var_dump(hex2bin('123'));
 +
 +?
 +--EXPECTF--
 +Warning: hex2bin(): Hexadecimal input string must have an even length in %s 
 on line %d
 +bool(false)


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug Fixed bug #61605 (header_remove() does not remove all headers): NEWS main/SAPI.c sapi/cgi/tests/bug61605.phpt

2012-04-04 Thread Laruence
On Wed, Apr 4, 2012 at 4:54 PM, Alexey Shein con...@gmail.com wrote:
 4 апреля 2012 г. 13:14 пользователь Xinchen Hui larue...@php.net написал:
 Commit:    efd671f242e87e3301a1b3e76179955f26119feb
 Author:    Xinchen Hui larue...@gmail.com         Wed, 4 Apr 2012 16:14:28 
 +0800
 Parents:   3ea9fa1b4626f6125f25d8b0bcffac7becc1d092
 Branches:  PHP-5.4

 Link:       
 http://git.php.net/?p=php-src.git;a=commitdiff;h=efd671f242e87e3301a1b3e76179955f26119feb

 Log:
 Fixed bug Fixed bug #61605 (header_remove() does not remove all headers)

 Bugs:
 https://bugs.php.net/61605

 Changed paths:
  M  NEWS
  M  main/SAPI.c
  A  sapi/cgi/tests/bug61605.phpt


 Diff:
 diff --git a/NEWS b/NEWS
 index 6fc9126..b8b28b1 100644
 --- a/NEWS
 +++ b/NEWS
 @@ -9,6 +9,8 @@ PHP                                                          
               NEWS
   . Connection: close instead of Connection: closed (Gustavo)

  - Core:
 +  . Fixed bug Fixed bug #61605 (header_remove() does not remove all 
 headers).
 +    (Laruence)

 Double Fixed bug (maybe you fixed it twice :) )

   . Fixed bug #61374 (html_entity_decode tries to decode code points that 
 don't
     exist in ISO-8859-1). (Gustavo)
   . Fixed bug #61273 (call_user_func_array with more than 16333 arguments
 diff --git a/main/SAPI.c b/main/SAPI.c
 index 74fdbb2..0d3b4ef 100644
 --- a/main/SAPI.c
 +++ b/main/SAPI.c
 @@ -587,10 +587,36 @@ static void sapi_update_response_code(int ncode 
 TSRMLS_DC)
        SG(sapi_headers).http_response_code = ncode;
  }

 -static int sapi_find_matching_header(void *element1, void *element2)
 -{
 -       int len = strlen((char*)element2);
 -       return strncasecmp(((sapi_header_struct*)element1)-header, 
 (char*)element2, len) == 0  ((sapi_header_struct*)element1)-header[len] 
 == ':';
 +/*
 + * since zend_llist_del_element only remove one matched item once,
 + * we should remove them by ourself
 + */
 +static void sapi_remove_header(zend_llist *l, char *name, uint len) {
 +       sapi_header_struct *header;
 +       zend_llist_element *next;
 +       zend_llist_element *current=l-head;
 +
 +       while (current) {
 +               header = (sapi_header_struct *)(current-data);
 +               next = current-next;
 +               if (header-header_len  len  header-header[len] == ':'
 +                                !strncasecmp(header-header, name, len)) {
 +                       if (current-prev) {
 +                               current-prev-next = next;
 +                       } else {
 +                               l-head = next;
 +                       }
 +                       if (next) {
 +                               next-prev = current-prev;
 +                       } else {
 +                               l-tail = current-prev;
 +                       }
 +                       sapi_free_header(header);
 +                       efree(current);
 +                       --l-count;
 +               }
 +               current = next;
 +       }
  }

  SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, 
 zend_bool duplicate, zend_bool replace TSRMLS_DC)
 @@ -621,7 +647,7 @@ static void sapi_header_add_op(sapi_header_op_enum op, 
 sapi_header_struct *sapi_
                                char sav = *colon_offset;

                                *colon_offset = 0;
 -                               
 zend_llist_del_element(SG(sapi_headers).headers, sapi_header-header, 
 (int(*)(void*, void*))sapi_find_matching_header);
 +                       sapi_remove_header(SG(sapi_headers).headers, 
 sapi_header-header, strlen(sapi_header-header));
                                *colon_offset = sav;
                        }
                }
 @@ -703,7 +729,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void 
 *arg TSRMLS_DC)
                        sapi_header.header_len = header_line_len;
                        sapi_module.header_handler(sapi_header, op, 
 SG(sapi_headers) TSRMLS_CC);
                }
 -               zend_llist_del_element(SG(sapi_headers).headers, 
 header_line, (int(*)(void*, void*))sapi_find_matching_header);
 +               sapi_remove_header(SG(sapi_headers).headers, header_line, 
 header_line_len);
                efree(header_line);
                return SUCCESS;
        } else {
 diff --git a/sapi/cgi/tests/bug61605.phpt b/sapi/cgi/tests/bug61605.phpt
 new file mode 100644
 index 000..c6e4cf2
 --- /dev/null
 +++ b/sapi/cgi/tests/bug61605.phpt
 @@ -0,0 +1,34 @@
 +--TEST--
 +Bug #61605 (header_remove() does not remove all headers)
 +--SKIPIF--
 +?php include skipif.inc; ?
 +--GET--
 +foo=bar
 +--FILE--
 +?php
 +header(A: first);
 +header(A: second, TRUE);
 +$headers1 = headers_list();
 +header(A: third, FALSE);
 +$headers2 = headers_list();
 +header_remove(A);
 +$headers3 = headers_list();
 +print_r($headers1);
 +print_r($headers2);
 +print_r($headers3);
 +--EXPECTF--
 +Array
 +(
 +    [0] = X-Powered-By: %s
 +    [1] = A: second
 +)
 +Array
 +(
 +    [0] = X

Re: [PHP-CVS] com php-src: - fix bug #61541, Segfault when using ob_* in output_callback: main/output.c tests/output/ob_011.phpt

2012-03-28 Thread Laruence
Hi  yohgaki:

1. plz also update NEWS.
 2. is there any plan of PHP 6,  I think you should remove the
PHP 6 words in the phpt.

thanks

On Wed, Mar 28, 2012 at 9:18 AM, Yasuo Ohgaki yohg...@php.net wrote:
 Commit:    9bc91a21db733b5e12ab6a4356b2470b72d784d5
 Author:    reeze reeze@gmail.com         Thu, 29 Mar 2012 00:18:02 +0800
 Parents:   4fa0c2a96331d9d43c08575fd6ea9957cf0671b6
 Branches:  PHP-5.3

 Link:       
 http://git.php.net/?p=php-src.git;a=commitdiff;h=9bc91a21db733b5e12ab6a4356b2470b72d784d5

 Log:
 - fix bug #61541, Segfault when using ob_* in output_callback

 Bugs:
 https://bugs.php.net/61541

 Changed paths:
  M  main/output.c
  M  tests/output/ob_011.phpt


 Diff:
 9bc91a21db733b5e12ab6a4356b2470b72d784d5
 diff --git a/main/output.c b/main/output.c
 index fb589a2..5a7ed7b 100644
 --- a/main/output.c
 +++ b/main/output.c
 @@ -225,6 +225,17 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, 
 zend_bool just_flush TSRMLS
                zval *orig_buffer;
                zval *z_status;

 +               if(OG(ob_lock)) {
 +                       if (SG(headers_sent)  
 !SG(request_info).headers_only) {
 +                               OG(php_body_write) = 
 php_ub_body_write_no_header;
 +                       } else {
 +                               OG(php_body_write) = php_ub_body_write;
 +                       }
 +                       OG(ob_nesting_level) = 0;
 +                       php_error_docref(ref.outcontrol TSRMLS_CC, E_ERROR, 
 Cannot use output buffering in output buffering display handlers);
 +                       return;
 +               }
 +
                ALLOC_INIT_ZVAL(orig_buffer);
                ZVAL_STRINGL(orig_buffer, OG(active_ob_buffer).buffer, 
 OG(active_ob_buffer).text_length, 1);

 diff --git a/tests/output/ob_011.phpt b/tests/output/ob_011.phpt
 index a90fd56..35b0388 100644
 --- a/tests/output/ob_011.phpt
 +++ b/tests/output/ob_011.phpt
 @@ -1,7 +1,5 @@
  --TEST--
  output buffering - fatalism
 ---XFAIL--
 -This test will fail until the fix in revision r214155 is backported from php 
 6
  --FILE--
  ?php
  function obh($s)


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt branches/PHP_5_3/main/streams/xp_socket.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/st

2012-03-03 Thread Laruence
Hi:
   is a WARNING better?  :)

thanks

On Sun, Mar 4, 2012 at 4:36 AM, Ilia Alshanetsky il...@php.net wrote:
 iliaa                                    Sat, 03 Mar 2012 20:36:14 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=323852

 Log:
 Fixed bug #60106 (stream_socket_server silently truncates long unix socket 
 paths)

 Bug: https://bugs.php.net/60106 (Open) stream_socket_server + long unix 
 socket path = 'Unknown error'

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    A   php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt
    U   php/php-src/branches/PHP_5_3/main/streams/xp_socket.c
    U   php/php-src/branches/PHP_5_4/NEWS
    A   php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug60106.phpt
    U   php/php-src/branches/PHP_5_4/main/streams/xp_socket.c
    A   php/php-src/trunk/ext/standard/tests/streams/bug60106.phpt
    U   php/php-src/trunk/main/streams/xp_socket.c


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ NEWS

2012-03-02 Thread Laruence
Hi Nikic:

  just FYI, I was told that, the entries in NEWS should be in desc
order(in a category) by bug id  :)

thanks

On Fri, Mar 2, 2012 at 4:25 PM, Nikita Popov ni...@php.net wrote:
 nikic                                    Fri, 02 Mar 2012 08:25:28 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=323805

 Log:
 Forgot NEWS for r323803

 Changed paths:
    U   php/php-src/branches/PHP_5_4/NEWS

 Modified: php/php-src/branches/PHP_5_4/NEWS
 ===
 --- php/php-src/branches/PHP_5_4/NEWS   2012-03-02 08:21:54 UTC (rev 323804)
 +++ php/php-src/branches/PHP_5_4/NEWS   2012-03-02 08:25:28 UTC (rev 323805)
 @@ -20,6 +20,7 @@
   . Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam)
   . Fixed bug #60573 (type hinting with self keyword causes weird errors).
     (Laruence)
 +  . Fixed bug #61106 (Segfault when using header_register_callback). (Nikita 
 Popov)

  - Standard:
   . Fixed memory leak in substr_replace. (Pierrick)


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c

2012-02-27 Thread Laruence
On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov dmi...@zend.com wrote:
 Hi Laruence,

 The attached patch looks wired. The patch on top of it (r323563) makes it
 better. However, in my opinion it fixes a common problem just in a single
 place. Each call to __toString() that makes side effects may cause the
 similar problem. It would be great to make a right fix in
 zend_std_cast_object_tostring() itself, but probably it would require API
Hi:
   before this fix, I thought about the same idea of that.

   but,  you know,  such change will need all exts who implmented
their own cast_object handler change there codes too.

   for now,  I exam the usage of std_cast_object_tostring,  most of
them do the similar things like this fix to avoid this issues(like
ZEND_CAST handler).

   so I think,  maybe it's okey for a temporary fix :)

thanks
 change (e.g. sending zval** instead of zval*). So it could be fixed properly
 only in trunk.

 Thanks. Dmitry.


 On 02/25/2012 08:41 AM, Laruence wrote:

 Dmitry:
    you might want to review this fix.

    let me explain why crash before this fix.

    when doing parse_parameter,  then convert the object to string by
 calling the ce-cast_object,

    and passed the same pointer(although there was a separation), to
 the cast_object..

    then if __toString method stash $this somewhere, after the
 parameters clean up,  the $this pointer will be impending..

    then in the next loop, the return_value will happen used the same
 adress,,

    then balalala, cause the segfault..

    sorry for my poor english,  and hope I have made myself clearly,
 if there is any question , plz write me.

 thanks

 On Sat, Feb 25, 2012 at 12:36 PM, Xinchen Huilarue...@php.net  wrote:

 laruence                                 Sat, 25 Feb 2012 04:36:08 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=323489

 Log:
 Fixed bug #61165 (Segfault - strip_tags())

 Bug: https://bugs.php.net/61165 (Assigned) Segfault - strip_tags()

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/Zend/zend_API.c
    U   php/php-src/trunk/NEWS
    U   php/php-src/trunk/Zend/zend_API.c

 Modified: php/php-src/branches/PHP_5_3/NEWS
 ===
 --- php/php-src/branches/PHP_5_3/NEWS   2012-02-25 03:19:27 UTC (rev
 323488)
 +++ php/php-src/branches/PHP_5_3/NEWS   2012-02-25 04:36:08 UTC (rev
 323489)
 @@ -3,6 +3,7 @@
  ?? ??? 2012, PHP 5.3.11

  - Core:
 +  . Fixed bug #61165 (Segfault - strip_tags()). (Laruence)
   . Improved max_input_vars directive to check nested variables (Dmitry).
   . Fixed bug #61095 (Incorect lexing of 0x00*+NUM). (Etienne)
   . Fixed bug #61072 (Memory leak when restoring an exception handler).

 Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c
 ===
 --- php/php-src/branches/PHP_5_3/Zend/zend_API.c        2012-02-25
 03:19:27 UTC (rev 323488)
 +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c        2012-02-25
 04:36:08 UTC (rev 323489)
 @@ -254,10 +254,15 @@
  static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */
  {
        if (Z_OBJ_HANDLER_PP(arg, cast_object)) {
 -               SEPARATE_ZVAL_IF_NOT_REF(arg);
 -               if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg,
 IS_STRING TSRMLS_CC) == SUCCESS) {
 +               zval *obj;
 +               ALLOC_ZVAL(obj);
 +               MAKE_COPY_ZVAL(arg, obj);
 +               if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj,
 IS_STRING TSRMLS_CC) == SUCCESS) {
 +                       zval_ptr_dtor(arg);
 +                       *arg = obj;
                        return SUCCESS;
                }
 +               zval_ptr_dtor(obj);
        }
        /* Standard PHP objects */
        if (Z_OBJ_HT_PP(arg) ==std_object_handlers ||
 !Z_OBJ_HANDLER_PP(arg, cast_object)) {


 Modified: php/php-src/trunk/NEWS
 ===
 --- php/php-src/trunk/NEWS      2012-02-25 03:19:27 UTC (rev 323488)
 +++ php/php-src/trunk/NEWS      2012-02-25 04:36:08 UTC (rev 323489)
 @@ -6,6 +6,7 @@
   . World domination

  - Core:
 +  . Fixed bug #61165 (Segfault - strip_tags()). (Laruence)
   . Fixed bug #61072 (Memory leak when restoring an exception handler).
     (Nikic, Laruence)
   . Fixed bug #61000 (Exceeding max nesting level doesn't delete
 numerical

 Modified: php/php-src/trunk/Zend/zend_API.c
 ===
 --- php/php-src/trunk/Zend/zend_API.c   2012-02-25 03:19:27 UTC (rev
 323488)
 +++ php/php-src/trunk/Zend/zend_API.c   2012-02-25 04:36:08 UTC (rev
 323489)
 @@ -262,12 +262,17 @@
  static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int
 type TSRMLS_DC) /* {{{ */
  {
        if (Z_OBJ_HANDLER_PP(arg, cast_object)) {
 -               SEPARATE_ZVAL_IF_NOT_REF(arg);
 -               if (Z_OBJ_HANDLER_PP(arg, cast_object

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c

2012-02-27 Thread Laruence
On Mon, Feb 27, 2012 at 4:31 PM, Laruence larue...@php.net wrote:
 On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov dmi...@zend.com wrote:
 Hi Laruence,

 The attached patch looks wired. The patch on top of it (r323563) makes it
 better. However, in my opinion it fixes a common problem just in a single
 place. Each call to __toString() that makes side effects may cause the
 similar problem. It would be great to make a right fix in
 zend_std_cast_object_tostring() itself, but probably it would require API
 Hi:
   before this fix, I thought about the same idea of that.

   but,  you know,  such change will need all exts who implmented
 their own cast_object handler change there codes too.

   for now,  I exam the usage of std_cast_object_tostring,  most of
 them do the similar things like this fix to avoid this issues(like
 ZEND_CAST handler).

   so I think,  maybe it's okey for a temporary fix :)
what I mean temporary is, apply this fix to 5.3 and 5.4

then do the right fix which you said to 5.4.1 :)

thanks

 thanks
 change (e.g. sending zval** instead of zval*). So it could be fixed properly
 only in trunk.

 Thanks. Dmitry.


 On 02/25/2012 08:41 AM, Laruence wrote:

 Dmitry:
    you might want to review this fix.

    let me explain why crash before this fix.

    when doing parse_parameter,  then convert the object to string by
 calling the ce-cast_object,

    and passed the same pointer(although there was a separation), to
 the cast_object..

    then if __toString method stash $this somewhere, after the
 parameters clean up,  the $this pointer will be impending..

    then in the next loop, the return_value will happen used the same
 adress,,

    then balalala, cause the segfault..

    sorry for my poor english,  and hope I have made myself clearly,
 if there is any question , plz write me.

 thanks

 On Sat, Feb 25, 2012 at 12:36 PM, Xinchen Huilarue...@php.net  wrote:

 laruence                                 Sat, 25 Feb 2012 04:36:08 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=323489

 Log:
 Fixed bug #61165 (Segfault - strip_tags())

 Bug: https://bugs.php.net/61165 (Assigned) Segfault - strip_tags()

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/Zend/zend_API.c
    U   php/php-src/trunk/NEWS
    U   php/php-src/trunk/Zend/zend_API.c

 Modified: php/php-src/branches/PHP_5_3/NEWS
 ===
 --- php/php-src/branches/PHP_5_3/NEWS   2012-02-25 03:19:27 UTC (rev
 323488)
 +++ php/php-src/branches/PHP_5_3/NEWS   2012-02-25 04:36:08 UTC (rev
 323489)
 @@ -3,6 +3,7 @@
  ?? ??? 2012, PHP 5.3.11

  - Core:
 +  . Fixed bug #61165 (Segfault - strip_tags()). (Laruence)
   . Improved max_input_vars directive to check nested variables (Dmitry).
   . Fixed bug #61095 (Incorect lexing of 0x00*+NUM). (Etienne)
   . Fixed bug #61072 (Memory leak when restoring an exception handler).

 Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c
 ===
 --- php/php-src/branches/PHP_5_3/Zend/zend_API.c        2012-02-25
 03:19:27 UTC (rev 323488)
 +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c        2012-02-25
 04:36:08 UTC (rev 323489)
 @@ -254,10 +254,15 @@
  static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */
  {
        if (Z_OBJ_HANDLER_PP(arg, cast_object)) {
 -               SEPARATE_ZVAL_IF_NOT_REF(arg);
 -               if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg,
 IS_STRING TSRMLS_CC) == SUCCESS) {
 +               zval *obj;
 +               ALLOC_ZVAL(obj);
 +               MAKE_COPY_ZVAL(arg, obj);
 +               if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj,
 IS_STRING TSRMLS_CC) == SUCCESS) {
 +                       zval_ptr_dtor(arg);
 +                       *arg = obj;
                        return SUCCESS;
                }
 +               zval_ptr_dtor(obj);
        }
        /* Standard PHP objects */
        if (Z_OBJ_HT_PP(arg) ==std_object_handlers ||
 !Z_OBJ_HANDLER_PP(arg, cast_object)) {


 Modified: php/php-src/trunk/NEWS
 ===
 --- php/php-src/trunk/NEWS      2012-02-25 03:19:27 UTC (rev 323488)
 +++ php/php-src/trunk/NEWS      2012-02-25 04:36:08 UTC (rev 323489)
 @@ -6,6 +6,7 @@
   . World domination

  - Core:
 +  . Fixed bug #61165 (Segfault - strip_tags()). (Laruence)
   . Fixed bug #61072 (Memory leak when restoring an exception handler).
     (Nikic, Laruence)
   . Fixed bug #61000 (Exceeding max nesting level doesn't delete
 numerical

 Modified: php/php-src/trunk/Zend/zend_API.c
 ===
 --- php/php-src/trunk/Zend/zend_API.c   2012-02-25 03:19:27 UTC (rev
 323488)
 +++ php/php-src/trunk/Zend/zend_API.c   2012-02-25 04:36:08 UTC (rev
 323489)
 @@ -262,12 +262,17 @@
  static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c

2012-02-24 Thread Laruence
Dmitry:
   you might want to review this fix.

   let me explain why crash before this fix.

   when doing parse_parameter,  then convert the object to string by
calling the ce-cast_object,

   and passed the same pointer(although there was a separation), to
the cast_object..

   then if __toString method stash $this somewhere, after the
parameters clean up,  the $this pointer will be impending..

   then in the next loop, the return_value will happen used the same adress,,

   then balalala, cause the segfault..

   sorry for my poor english,  and hope I have made myself clearly,
if there is any question , plz write me.

thanks

On Sat, Feb 25, 2012 at 12:36 PM, Xinchen Hui larue...@php.net wrote:
 laruence                                 Sat, 25 Feb 2012 04:36:08 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=323489

 Log:
 Fixed bug #61165 (Segfault - strip_tags())

 Bug: https://bugs.php.net/61165 (Assigned) Segfault - strip_tags()

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/Zend/zend_API.c
    U   php/php-src/trunk/NEWS
    U   php/php-src/trunk/Zend/zend_API.c

 Modified: php/php-src/branches/PHP_5_3/NEWS
 ===
 --- php/php-src/branches/PHP_5_3/NEWS   2012-02-25 03:19:27 UTC (rev 323488)
 +++ php/php-src/branches/PHP_5_3/NEWS   2012-02-25 04:36:08 UTC (rev 323489)
 @@ -3,6 +3,7 @@
  ?? ??? 2012, PHP 5.3.11

  - Core:
 +  . Fixed bug #61165 (Segfault - strip_tags()). (Laruence)
   . Improved max_input_vars directive to check nested variables (Dmitry).
   . Fixed bug #61095 (Incorect lexing of 0x00*+NUM). (Etienne)
   . Fixed bug #61072 (Memory leak when restoring an exception handler).

 Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c
 ===
 --- php/php-src/branches/PHP_5_3/Zend/zend_API.c        2012-02-25 03:19:27 
 UTC (rev 323488)
 +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c        2012-02-25 04:36:08 
 UTC (rev 323489)
 @@ -254,10 +254,15 @@
  static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */
  {
        if (Z_OBJ_HANDLER_PP(arg, cast_object)) {
 -               SEPARATE_ZVAL_IF_NOT_REF(arg);
 -               if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_STRING 
 TSRMLS_CC) == SUCCESS) {
 +               zval *obj;
 +               ALLOC_ZVAL(obj);
 +               MAKE_COPY_ZVAL(arg, obj);
 +               if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, IS_STRING 
 TSRMLS_CC) == SUCCESS) {
 +                       zval_ptr_dtor(arg);
 +                       *arg = obj;
                        return SUCCESS;
                }
 +               zval_ptr_dtor(obj);
        }
        /* Standard PHP objects */
        if (Z_OBJ_HT_PP(arg) == std_object_handlers || !Z_OBJ_HANDLER_PP(arg, 
 cast_object)) {

 Modified: php/php-src/trunk/NEWS
 ===
 --- php/php-src/trunk/NEWS      2012-02-25 03:19:27 UTC (rev 323488)
 +++ php/php-src/trunk/NEWS      2012-02-25 04:36:08 UTC (rev 323489)
 @@ -6,6 +6,7 @@
   . World domination

  - Core:
 +  . Fixed bug #61165 (Segfault - strip_tags()). (Laruence)
   . Fixed bug #61072 (Memory leak when restoring an exception handler).
     (Nikic, Laruence)
   . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical

 Modified: php/php-src/trunk/Zend/zend_API.c
 ===
 --- php/php-src/trunk/Zend/zend_API.c   2012-02-25 03:19:27 UTC (rev 323488)
 +++ php/php-src/trunk/Zend/zend_API.c   2012-02-25 04:36:08 UTC (rev 323489)
 @@ -262,12 +262,17 @@
  static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int 
 type TSRMLS_DC) /* {{{ */
  {
        if (Z_OBJ_HANDLER_PP(arg, cast_object)) {
 -               SEPARATE_ZVAL_IF_NOT_REF(arg);
 -               if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, type 
 TSRMLS_CC) == SUCCESS) {
 +               zval *obj;
 +               ALLOC_ZVAL(obj);
 +               MAKE_COPY_ZVAL(arg, obj);
 +               if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, type 
 TSRMLS_CC) == SUCCESS) {
 +                       zval_ptr_dtor(arg);
 +                       *arg = obj;
                        *pl = Z_STRLEN_PP(arg);
                        *p = Z_STRVAL_PP(arg);
                        return SUCCESS;
                }
 +               zval_ptr_dtor(obj);
        }
        /* Standard PHP objects */
        if (Z_OBJ_HT_PP(arg) == std_object_handlers || !Z_OBJ_HANDLER_PP(arg, 
 cast_object)) {


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/tests/basic/bug61000.phpt trunk/tests/basic/bug61000.phpt

2012-02-17 Thread Laruence
Hi:

seems to be my fault,, sorry.

thanks for fixing this.


On Fri, Feb 17, 2012 at 1:48 AM, Rasmus Lerdorf ras...@php.net wrote:
 rasmus                                   Thu, 16 Feb 2012 17:48:30 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=323258

 Log:
 Weird, what happened here?

 Changed paths:
    U   php/php-src/branches/PHP_5_3/tests/basic/bug61000.phpt
    U   php/php-src/trunk/tests/basic/bug61000.phpt

 Modified: php/php-src/branches/PHP_5_3/tests/basic/bug61000.phpt
 ===
 --- php/php-src/branches/PHP_5_3/tests/basic/bug61000.phpt      2012-02-16 
 16:43:04 UTC (rev 323257)
 +++ php/php-src/branches/PHP_5_3/tests/basic/bug61000.phpt      2012-02-16 
 17:48:30 UTC (rev 323258)
 @@ -17,22 +17,3 @@
  Array
  (
  )
 ---TEST--
 -Bug #61000 (Exceeding max nesting level doesn't delete numerical vars)
 ---INI--
 -max_input_nesting_level=2
 ---POST--
 -1[a][]=foo1[a][b][c]=bar
 ---GET--
 -a[a][]=fooa[a][b][c]=bar
 ---FILE--
 -?php
 -print_r($_GET);
 -print_r($_POST);
 ---EXPECTF--
 -Array
 -(
 -)
 -Array
 -(
 -)

 Modified: php/php-src/trunk/tests/basic/bug61000.phpt
 ===
 --- php/php-src/trunk/tests/basic/bug61000.phpt 2012-02-16 16:43:04 UTC (rev 
 323257)
 +++ php/php-src/trunk/tests/basic/bug61000.phpt 2012-02-16 17:48:30 UTC (rev 
 323258)
 @@ -17,22 +17,3 @@
  Array
  (
  )
 ---TEST--
 -Bug #61000 (Exceeding max nesting level doesn't delete numerical vars)
 ---INI--
 -max_input_nesting_level=2
 ---POST--
 -1[a][]=foo1[a][b][c]=bar
 ---GET--
 -a[a][]=fooa[a][b][c]=bar
 ---FILE--
 -?php
 -print_r($_GET);
 -print_r($_POST);
 ---EXPECTF--
 -Array
 -(
 -)
 -Array
 -(
 -)


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/reflection/php_reflection.c branches/PHP_5_3/ext/reflection/tests/bug60367.phpt trunk/NEWS trunk/ext/reflection/php_reflecti

2012-02-04 Thread Laruence
Hi bjori:

On Sat, Feb 4, 2012 at 8:33 PM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:
 On Fri, Feb 3, 2012 at 17:27, Xinchen Hui larue...@php.net wrote:
 laruence                                 Fri, 03 Feb 2012 16:27:35 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=323045

 Log:
 Fixed bug #60968 (Late static binding doesn't work with 
 ReflectionMethod::invokeArgs())

 Bug: https://bugs.php.net/60968 (Assigned) Late static binding doesn't work 
 with ReflectionMethod::invokeArgs()

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c
    U   php/php-src/branches/PHP_5_3/ext/reflection/tests/bug60367.phpt
    U   php/php-src/trunk/NEWS
    U   php/php-src/trunk/ext/reflection/php_reflection.c
    U   php/php-src/trunk/ext/reflection/tests/bug60367.phpt

 There is no need to update the trunk NEWS when its included in
 previous versions.
 I was told that we should update both 5.3/5.4 NEWS when fixe bugs.
since 5.4 is in freeze period, so I update trunk NEWS.

thanks

 -Hannes



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c branches/PHP_5_4/ext/pdo_sqlite/sqlite_driver.c trunk/ext/pdo_sqlite/sqlite_driver.c

2012-02-01 Thread Laruence
2012/2/1 Pierre Joye pierre@gmail.com:
 we should enforce this flag.
+1

 2012/2/1 Johannes Schlüter johan...@schlueters.de:
 Setting CFLAGS=-Wdeclaration-after-statement makes gcc complain about
 this, too.

 johannes

 On Tue, 2012-01-31 at 21:07 +0100, Pierre Joye wrote:
 hi,

 GCC is only being very bad at considering part of C99 as default.

 Cheers,

 On Tue, Jan 31, 2012 at 4:45 PM, Rasmus Lerdorf ras...@lerdorf.com wrote:
  On 01/31/2012 02:14 AM, Pierre Joye wrote:
 
  -     struct pdo_sqlite_collation *collation;
  -
        while (H-collations) {
  +             struct pdo_sqlite_collation *collation;
                collation = H-collations;
                H-collations = collation-next;
 
  Why would this change fix anything? You are just tightening the scope of
  collation there? This compiled perfectly with gcc before this change.
 
  -Rasmus



 --
 Pierre

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






 --
 Pierre

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

 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug60825.phpt branches/PHP_5_3/Zend/zend_vm_def.h branches/PHP_5_3/Zend/zend_vm_execute.h trunk/NEWS trunk/Zend/tests

2012-01-24 Thread Laruence
HI Dmitry:

   could you please review this improved fix?

   thanks
On Tue, Jan 24, 2012 at 10:39 PM, Xinchen Hui larue...@php.net wrote:
 laruence                                 Tue, 24 Jan 2012 14:39:45 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=322678

 Log:
 Re-fixed bug #60825 (Segfault when running symfony 2 tests)

 Bug: https://bugs.php.net/60825 (Critical) Segfault when running symfony 2 
 tests

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    A   php/php-src/branches/PHP_5_3/Zend/tests/bug60825.phpt
    U   php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h
    U   php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h
    U   php/php-src/trunk/NEWS
    U   php/php-src/trunk/Zend/tests/bug60825.phpt
    U   php/php-src/trunk/Zend/zend_vm_def.h
    U   php/php-src/trunk/Zend/zend_vm_execute.h


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_big5.c trunk/ext/mbstring/libmbfl/filters/mbfilter_big5.c

2011-11-20 Thread Laruence
Hi moriyoshi:

 I think this should be a typo, right?

thanks

On Mon, Nov 21, 2011 at 2:07 PM, Xinchen Hui larue...@php.net wrote:
 laruence                                 Mon, 21 Nov 2011 06:07:43 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=319598

 Log:
 Comparison between pointer and integer

 Changed paths:
    U   
 php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_big5.c
    U   php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_big5.c

 Modified: 
 php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_big5.c
 ===
 --- php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_big5.c 
   2011-11-21 05:57:45 UTC (rev 319597)
 +++ php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_big5.c 
   2011-11-21 06:07:43 UTC (rev 319598)
 @@ -319,7 +319,7 @@
  static int mbfl_filt_ident_big5(int c, mbfl_identify_filter *filter)
  {
        int c1;
 -       if (filter-encoding == mbfl_no_encoding_cp950) {
 +       if (filter-encoding-no_encoding == mbfl_no_encoding_cp950) {
                c1 = 0x80;
        } else {
                c1 = 0xa0;

 Modified: php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_big5.c
 ===
 --- php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_big5.c      
 2011-11-21 05:57:45 UTC (rev 319597)
 +++ php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_big5.c      
 2011-11-21 06:07:43 UTC (rev 319598)
 @@ -319,7 +319,7 @@
  static int mbfl_filt_ident_big5(int c, mbfl_identify_filter *filter)
  {
        int c1;
 -       if (filter-encoding == mbfl_no_encoding_cp950) {
 +       if (filter-encoding-no_encoding == mbfl_no_encoding_cp950) {
                c1 = 0x80;
        } else {
                c1 = 0xa0;


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_cp936.c branches/PHP_5_4/ext/mbstring/tests/bug60306.phpt trunk/ext/mbstring/libmbfl/filte

2011-11-18 Thread Laruence
Hi Moriyoshi:

plz sync this fix into libmbfl  :)

thanks

On Fri, Nov 18, 2011 at 4:50 PM, Xinchen Hui larue...@php.net wrote:
 laruence                                 Fri, 18 Nov 2011 08:50:29 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=319452

 Log:
 Fixed bug #60306 (Characters lost while converting from cp936 to utf8)

 Bug: https://bugs.php.net/60306 (Assigned) Characters lost while converting 
 from cp936 to utf8

 Changed paths:
    U   php/php-src/branches/PHP_5_4/NEWS
    U   
 php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_cp936.c
    A   php/php-src/branches/PHP_5_4/ext/mbstring/tests/bug60306.phpt
    U   php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_cp936.c
    A   php/php-src/trunk/ext/mbstring/tests/bug60306.phpt

 Modified: php/php-src/branches/PHP_5_4/NEWS
 ===
 --- php/php-src/branches/PHP_5_4/NEWS   2011-11-18 08:30:04 UTC (rev 319451)
 +++ php/php-src/branches/PHP_5_4/NEWS   2011-11-18 08:50:29 UTC (rev 319452)
 @@ -35,6 +35,10 @@
   . Fixed bug #54682 (Tidy::diagnose() NULL pointer dereference).
     (Maksymilian Arciemowicz, Felipe)

 +- Mbstring
 +  . Fixed bug #60306 (Characters lost while converting from cp936 to utf8).
 +    (Laruence)
 +
  -CLI SAPI:
   . Fixed bug #60159 (Router returns false, but POST is not passed to 
 requested
     resource). (Laruence)

 Modified: 
 php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_cp936.c
 ===
 --- 
 php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_cp936.c  
 2011-11-18 08:30:04 UTC (rev 319451)
 +++ 
 php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_cp936.c  
 2011-11-18 08:50:29 UTC (rev 319452)
 @@ -103,7 +103,7 @@
  mbfl_filt_conv_cp936_wchar(int c, mbfl_convert_filter *filter)
  {
        int k;
 -       int c1, c2, w;
 +       int c1, c2, w = -1;

        switch (filter-status) {
        case 0:
 @@ -304,5 +304,3 @@

        return c;
  }
 -
 -

 Added: php/php-src/branches/PHP_5_4/ext/mbstring/tests/bug60306.phpt
 ===
 --- php/php-src/branches/PHP_5_4/ext/mbstring/tests/bug60306.phpt             
                   (rev 0)
 +++ php/php-src/branches/PHP_5_4/ext/mbstring/tests/bug60306.phpt       
 2011-11-18 08:50:29 UTC (rev 319452)
 @@ -0,0 +1,11 @@
 +--TEST--
 +Bug #60306 (Characters lost while converting from cp936 to utf8)
 +--SKIPIF--
 +?php extension_loaded('mbstring') or die('skip mbstring not available'); ?
 +--FILE--
 +?php
 +$s = 洪仁玕;
 +var_dump($s === mb_convert_encoding(mb_convert_encoding($s, cp936, 
 utf8), utf8, cp936));
 +?
 +--EXPECT--
 +bool(true)

 Modified: php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_cp936.c
 ===
 --- php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_cp936.c     
 2011-11-18 08:30:04 UTC (rev 319451)
 +++ php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_cp936.c     
 2011-11-18 08:50:29 UTC (rev 319452)
 @@ -103,7 +103,7 @@
  mbfl_filt_conv_cp936_wchar(int c, mbfl_convert_filter *filter)
  {
        int k;
 -       int c1, c2, w;
 +       int c1, c2, w = -1;

        switch (filter-status) {
        case 0:
 @@ -304,5 +304,3 @@

        return c;
  }
 -
 -

 Added: php/php-src/trunk/ext/mbstring/tests/bug60306.phpt
 ===
 --- php/php-src/trunk/ext/mbstring/tests/bug60306.phpt                        
   (rev 0)
 +++ php/php-src/trunk/ext/mbstring/tests/bug60306.phpt  2011-11-18 08:50:29 
 UTC (rev 319452)
 @@ -0,0 +1,11 @@
 +--TEST--
 +Bug #60306 (Characters lost while converting from cp936 to utf8)
 +--SKIPIF--
 +?php extension_loaded('mbstring') or die('skip mbstring not available'); ?
 +--FILE--
 +?php
 +$s = 洪仁玕;
 +var_dump($s === mb_convert_encoding(mb_convert_encoding($s, cp936, 
 utf8), utf8, cp936));
 +?
 +--EXPECT--
 +bool(true)


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/sapi/apache/mod_php5.c branches/PHP_5_3/sapi/apache2filter/sapi_apache2.c branches/PHP_5_3/sapi/apache2handler/sapi_apache2.c br

2011-11-03 Thread Laruence
sorry for wrong bug id, should be:

  Fixed bug #60205 (possible integer overflow in content_length)

thanks

On Thu, Nov 3, 2011 at 3:26 PM, Xinchen Hui larue...@php.net wrote:
 laruence                                 Thu, 03 Nov 2011 07:26:09 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=318718

 Log:
 Fixed bug #60206 (possible integer overflow in content_length)

 Bug: https://bugs.php.net/60206 (error getting bug information)

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/sapi/apache/mod_php5.c
    U   php/php-src/branches/PHP_5_3/sapi/apache2filter/sapi_apache2.c
    U   php/php-src/branches/PHP_5_3/sapi/apache2handler/sapi_apache2.c
    U   php/php-src/branches/PHP_5_3/sapi/apache_hooks/mod_php5.c
    U   php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c
    U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_main.c
    U   php/php-src/branches/PHP_5_4/NEWS
    U   php/php-src/branches/PHP_5_4/sapi/apache/mod_php5.c
    U   php/php-src/branches/PHP_5_4/sapi/apache2filter/sapi_apache2.c
    U   php/php-src/branches/PHP_5_4/sapi/apache2handler/sapi_apache2.c
    U   php/php-src/branches/PHP_5_4/sapi/apache_hooks/mod_php5.c
    U   php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c
    U   php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c
    U   php/php-src/trunk/sapi/apache/mod_php5.c
    U   php/php-src/trunk/sapi/apache2filter/sapi_apache2.c
    U   php/php-src/trunk/sapi/apache2handler/sapi_apache2.c
    U   php/php-src/trunk/sapi/apache_hooks/mod_php5.c
    U   php/php-src/trunk/sapi/cgi/cgi_main.c
    U   php/php-src/trunk/sapi/fpm/fpm/fpm_main.c


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] Re: svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/Zend/tests/bug60169.phpt branches/PHP_5_4/Zend/zend_vm_def.h branches/PHP_5_4/Zend/zend_vm_execute.h trunk/Zend/tests/bug601

2011-11-03 Thread Laruence
Hi Arnaud :

I am not sure that can we assume all the ptr_ptr is equal to the
(var.ptr)  if we check this in fetch_dim_r
if so, I think it's is a better fix.  I will try to study further more :)

and if you have a new fix, plz revert this.  I am very glad with
that there is a better way to fix it :)

thanks

On Thu, Nov 3, 2011 at 8:11 PM, Arnaud Le Blanc arnaud...@gmail.com wrote:
 Hi laruence,

 Thanks for this. I didn't seen your comment on bug #60169 until now, and as
 the bug was assigned to me I've also attempted to fix it and ended up with the
 same fix :)

 However, I've noticed that there are other places setting ptr_ptr to NULL, and
 they cause crashes too.

 For example, this crashes:

 $a = 1;
 list($b) = $a-prop = 1;

 So I was wondering if we should always set ptr_ptr, or if we should check its
 value in ZEND_FETCH_DIM_R instead. What do you think ?

 Best regards,

 Le Thursday 3 November 2011 04:59:41, Xinchen Hui a écrit :
 laruence                                 Thu, 03 Nov 2011 03:59:41 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=318716

 Log:
 Fix bug #60169 Conjunction of ternary and list crashes PHP

 Bug: https://bugs.php.net/60169 (Assigned) Conjunction of ternary and list
 crashes PHP

 Changed paths:
     U   php/php-src/branches/PHP_5_4/NEWS
     U   php/php-src/branches/PHP_5_4/Zend/tests/bug60169.phpt
     U   php/php-src/branches/PHP_5_4/Zend/zend_vm_def.h
     U   php/php-src/branches/PHP_5_4/Zend/zend_vm_execute.h
     U   php/php-src/trunk/Zend/tests/bug60169.phpt
     U   php/php-src/trunk/Zend/zend_vm_def.h
     U   php/php-src/trunk/Zend/zend_vm_execute.h

 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/sapi/cli/php_cli_server.c trunk/sapi/cli/php_cli_server.c

2011-10-24 Thread Laruence
Hi:
   it looks like %s didn't match the whole string.

   it is pass in my environ,  I will try to find out the different,  :)

thanks

2011/10/24 Ferenc Kovacs tyr...@gmail.com:
 Hi Laruence,
 I'm still seeing sapi/cli/tests/php_cli_server_009.phpt fail for 5.4 on both
 32 and 64bit debian lenny, and for trunk on 32bit:
 001- [%s] %s
 017+ [Mon Oct 24 12:27:40 2011] 127.0.0.1:48770 [404]: /foo/bar.js - No such
 file or directory
 can you reproduce this?

 On Mon, Oct 24, 2011 at 5:47 AM, Xinchen Hui larue...@php.net wrote:

 laruence                                 Mon, 24 Oct 2011 03:47:42 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=318356

 Log:
 A better fix, sorry for previous thoughtlessness commit.

 Changed paths:
    U   php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c
    U   php/php-src/trunk/sapi/cli/php_cli_server.c

 Modified: php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c
 ===
 --- php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c      2011-10-24
 03:28:59 UTC (rev 318355)
 +++ php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c      2011-10-24
 03:47:42 UTC (rev 318356)
 @@ -1292,14 +1292,10 @@
                                        }
                                        file++;
                                }
 -                               if (!*file) {
 +                               if (!*file || is_static_file) {
                                        pefree(buf, 1);
                                        return;
                                }
 -                               if (is_static_file) {
 -                                       pefree(buf, 1);
 -                                       return;
 -                               }
                        }
                        break; /* regular file */
                }

 Modified: php/php-src/trunk/sapi/cli/php_cli_server.c
 ===
 --- php/php-src/trunk/sapi/cli/php_cli_server.c 2011-10-24 03:28:59 UTC
 (rev 318355)
 +++ php/php-src/trunk/sapi/cli/php_cli_server.c 2011-10-24 03:47:42 UTC
 (rev 318356)
 @@ -1292,14 +1292,10 @@
                                        }
                                        file++;
                                }
 -                               if (!*file) {
 +                               if (!*file || is_static_file) {
                                        pefree(buf, 1);
                                        return;
                                }
 -                               if (is_static_file) {
 -                                       pefree(buf, 1);
 -                                       return;
 -                               }
                        }
                        break; /* regular file */
                }


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



 --
 Ferenc Kovács
 @Tyr43l - http://tyrael.hu




-- 
Laruence  Xinchen Hui
http://www.laruence.com/


Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/sapi/cli/php_cli_server.c trunk/sapi/cli/php_cli_server.c

2011-10-22 Thread Laruence
Hi:
 miss update info:
 Fixed bug #60115 (memory memory definitely lost in cli server)

2011/10/23 Xinchen Hui larue...@php.net:
 laruence                                 Sun, 23 Oct 2011 03:02:24 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=318333

 Log:
 fix memory leak

 Changed paths:
    U   php/php-src/branches/PHP_5_4/NEWS
    U   php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c
    U   php/php-src/trunk/sapi/cli/php_cli_server.c

 Modified: php/php-src/branches/PHP_5_4/NEWS
 ===
 --- php/php-src/branches/PHP_5_4/NEWS   2011-10-23 02:54:06 UTC (rev 318332)
 +++ php/php-src/branches/PHP_5_4/NEWS   2011-10-23 03:02:24 UTC (rev 318333)
 @@ -3,9 +3,11 @@
  ?? ??? 2011, PHP 5.4.0 RC1
  - General improvements:
   . Changed silent conversion of array to string to produce a notice. 
 (Patrick)
 +
  - CLI SAPI:
   . Fixed bug #60112 (If URI does not contain a file, index.php is not served)
     .(Laruence)
 +  . Fixed bug #60115 (memory definitely lost in cli server). (Laruence)

  20 Oct 2011, PHP 5.4.0 beta2
  - General improvements:

 Modified: php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c
 ===
 --- php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c      2011-10-23 
 02:54:06 UTC (rev 318332)
 +++ php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c      2011-10-23 
 03:02:24 UTC (rev 318333)
 @@ -1787,6 +1787,9 @@

        php_cli_server_log_response(client, status, errstr ? errstr : ? 
 TSRMLS_CC);
        php_cli_server_poller_add(server-poller, POLLOUT, client-sock);
 +       if (errstr) {
 +               pefree(errstr, 1);
 +       }
        efree(escaped_request_uri);
        return SUCCESS;


 Modified: php/php-src/trunk/sapi/cli/php_cli_server.c
 ===
 --- php/php-src/trunk/sapi/cli/php_cli_server.c 2011-10-23 02:54:06 UTC (rev 
 318332)
 +++ php/php-src/trunk/sapi/cli/php_cli_server.c 2011-10-23 03:02:24 UTC (rev 
 318333)
 @@ -1787,6 +1787,9 @@

        php_cli_server_log_response(client, status, errstr ? errstr : ? 
 TSRMLS_CC);
        php_cli_server_poller_add(server-poller, POLLOUT, client-sock);
 +       if (errstr) {
 +               pefree(errstr, 1);
 +       }
        efree(escaped_request_uri);
        return SUCCESS;



 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/trunk/ext/mbstring/ php_mbregex.c

2011-10-06 Thread Laruence
cc hirokawa

thanks
2011/10/7 Xinchen Hui larue...@php.net:
 laruence                                 Fri, 07 Oct 2011 04:24:04 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=317850

 Log:
 Fix #55819 crash on mb_ereg_replace_callback
 Need hirokawa to review this.

 Bug: https://bugs.php.net/55819 (Assigned) segfault on 
 mb_ereg_replace_callback

 Changed paths:
    U   php/php-src/trunk/ext/mbstring/php_mbregex.c

 Modified: php/php-src/trunk/ext/mbstring/php_mbregex.c
 ===
 --- php/php-src/trunk/ext/mbstring/php_mbregex.c        2011-10-07 04:14:31 
 UTC (rev 317849)
 +++ php/php-src/trunk/ext/mbstring/php_mbregex.c        2011-10-07 04:24:04 
 UTC (rev 317850)
 @@ -793,11 +793,12 @@

        char *replace;
        int replace_len;
 -       zval **arg_replace_zval;

 +       zend_fcall_info arg_replace_fci;
 +       zend_fcall_info_cache arg_replace_fci_cache;
 +
        char *string;
        int string_len;
 -       zval **arg_string_zval;

        char *p;
        php_mb_regex_t *re;
 @@ -828,20 +829,24 @@
                char *option_str = NULL;
                int option_str_len = 0;

 -               if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ZZZ|s,
 -                                                                 
 arg_pattern_zval,
 -                                                                 
 arg_replace_zval,
 -                                                                 
 arg_string_zval,
 -                                                                 
 option_str, option_str_len) == FAILURE) {
 -                       RETURN_FALSE;
 +               if (!is_callable) {
 +                       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, 
 Zss|s,
 +                                               arg_pattern_zval,
 +                                               replace, replace_len,
 +                                               string, string_len,
 +                                               option_str, option_str_len) 
 == FAILURE) {
 +                               RETURN_FALSE;
 +                       }
 +               } else {
 +                       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, 
 Zfs|s,
 +                                               arg_pattern_zval,
 +                                               arg_replace_fci, 
 arg_replace_fci_cache,
 +                                               string, string_len,
 +                                               option_str, option_str_len) 
 == FAILURE) {
 +                               RETURN_FALSE;
 +                       }
                }

 -               replace = Z_STRVAL_PP(arg_replace_zval);
 -               replace_len = Z_STRLEN_PP(arg_replace_zval);
 -
 -               string = Z_STRVAL_PP(arg_string_zval);
 -               string_len = Z_STRLEN_PP(arg_string_zval);
 -
                if (option_str != NULL) {
                        _php_mb_regex_init_options(option_str, option_str_len, 
 options, syntax, eval);
                } else {
 @@ -876,15 +881,6 @@
        }

        if (is_callable) {
 -               char *callback_name;
 -               if (!zend_is_callable(*arg_replace_zval, 0, callback_name 
 TSRMLS_CC)) {
 -                       php_error_docref(NULL TSRMLS_CC, E_WARNING, Requires 
 argument 2, '%s', to be a valid callback, callback_name);
 -                       efree(callback_name);
 -                       MAKE_COPY_ZVAL(arg_string_zval, return_value);
 -                       RETURN_FALSE;
 -               }
 -               efree(callback_name);
 -
                if (eval) {
                        php_error_docref(NULL TSRMLS_CC, E_WARNING, Option 
 'e' cannot be used with replacement callback);
                        RETURN_FALSE;
 @@ -973,8 +969,10 @@
                                /* null terminate buffer */
                                smart_str_0(eval_buf);

 -                               if (call_user_function_ex(EG(function_table), 
 NULL, *arg_replace_zval, retval_ptr, 1, args, 0,
 -                                                                             
     NULL TSRMLS_CC) == SUCCESS  retval_ptr) {
 +                               arg_replace_fci.param_count = 1;
 +                               arg_replace_fci.params = args;
 +                               arg_replace_fci.retval_ptr_ptr = retval_ptr;
 +                               if (zend_call_function(arg_replace_fci, 
 arg_replace_fci_cache TSRMLS_CC) == SUCCESS  
 arg_replace_fci.retval_ptr_ptr) {
                                        convert_to_string_ex(retval_ptr);
                                        smart_str_appendl(out_buf, 
 Z_STRVAL_P(retval_ptr), Z_STRLEN_P(retval_ptr));
                                        eval_buf.len = 0;


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/sapi/cli/php_cli_server.c trunk/sapi/cli/php_cli_server.c

2011-09-21 Thread Laruence
Hi:
   okey,

   in this case , I will remove it .


thanks

2011/9/21 Pierre Joye pierre@gmail.com:
 VCWD_GETCWD is sufficient.

 On Wed, Sep 21, 2011 at 1:49 AM, Moriyoshi Koizumi m...@mozo.jp wrote:
 Hi,

 Where does HAVE_BROKEN_GETCWD come from? Isn't simply using VCWD_GETCWD 
 sufficient?

 Moriyoshi

 On 2011/09/20, at 16:06, Xinchen Hui wrote:

 laruence                                 Tue, 20 Sep 2011 07:06:55 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=317040

 Log:
 Fix Bug #55726 (Changing the working directory makes router script 
 inaccessible)

 Bug: https://bugs.php.net/55726 (Assigned) Changing the working directory 
 makes router script inaccessible

 Changed paths:
    U   php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c
    U   php/php-src/trunk/sapi/cli/php_cli_server.c

 Modified: php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c
 ===
 --- php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c    2011-09-20 
 05:42:36 UTC (rev 317039)
 +++ php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c    2011-09-20 
 07:06:55 UTC (rev 317040)
 @@ -1877,11 +1877,24 @@
       }
       {
               zend_file_handle zfd;
 +#if HAVE_BROKEN_GETCWD
 +             int old_cwd_fd = -1;
 +             old_cwd_fd = open(., 0);
 +#else
 +             char *old_cwd;
 +             ALLOCA_FLAG(use_heap)
 +#define OLD_CWD_SIZE 4096
 +             old_cwd = do_alloca(OLD_CWD_SIZE, use_heap);
 +             old_cwd[0] = '\0';
 +             php_ignore_value(VCWD_GETCWD(old_cwd, OLD_CWD_SIZE-1));
 +#endif
 +
               zfd.type = ZEND_HANDLE_FILENAME;
               zfd.filename = server-router;
               zfd.handle.fp = NULL;
               zfd.free_filename = 0;
               zfd.opened_path = NULL;
 +
               zend_try {
                       zval *retval = NULL;
                       if (SUCCESS == zend_execute_scripts(ZEND_REQUIRE 
 TSRMLS_CC, retval, 1, zfd)) {
 @@ -1893,6 +1906,18 @@
                               decline = 1;
                       }
               } zend_end_try();
 +
 +#if HAVE_BROKEN_GETCWD
 +             if (old_cwd_fd != -1) {
 +                     fchdir(old_cwd_fd);
 +                     close(old_cwd_fd);
 +             }
 +#else
 +             if (old_cwd[0] != '\0') {
 +                     php_ignore_value(VCWD_CHDIR(old_cwd));
 +             }
 +             free_alloca(old_cwd, use_heap);
 +#endif
       }

       if (decline) {

 Modified: php/php-src/trunk/sapi/cli/php_cli_server.c
 ===
 --- php/php-src/trunk/sapi/cli/php_cli_server.c       2011-09-20 05:42:36 
 UTC (rev 317039)
 +++ php/php-src/trunk/sapi/cli/php_cli_server.c       2011-09-20 07:06:55 
 UTC (rev 317040)
 @@ -1877,11 +1877,24 @@
       }
       {
               zend_file_handle zfd;
 +#if HAVE_BROKEN_GETCWD
 +             int old_cwd_fd = -1;
 +             old_cwd_fd = open(., 0);
 +#else
 +             char *old_cwd;
 +             ALLOCA_FLAG(use_heap)
 +#define OLD_CWD_SIZE 4096
 +             old_cwd = do_alloca(OLD_CWD_SIZE, use_heap);
 +             old_cwd[0] = '\0';
 +             php_ignore_value(VCWD_GETCWD(old_cwd, OLD_CWD_SIZE-1));
 +#endif
 +
               zfd.type = ZEND_HANDLE_FILENAME;
               zfd.filename = server-router;
               zfd.handle.fp = NULL;
               zfd.free_filename = 0;
               zfd.opened_path = NULL;
 +
               zend_try {
                       zval *retval = NULL;
                       if (SUCCESS == zend_execute_scripts(ZEND_REQUIRE 
 TSRMLS_CC, retval, 1, zfd)) {
 @@ -1893,6 +1906,18 @@
                               decline = 1;
                       }
               } zend_end_try();
 +
 +#if HAVE_BROKEN_GETCWD
 +             if (old_cwd_fd != -1) {
 +                     fchdir(old_cwd_fd);
 +                     close(old_cwd_fd);
 +             }
 +#else
 +             if (old_cwd[0] != '\0') {
 +                     php_ignore_value(VCWD_CHDIR(old_cwd));
 +             }
 +             free_alloca(old_cwd, use_heap);
 +#endif
       }

       if (decline) {

 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 --
 Moriyoshi Koizumi
 m...@mozo.jp




 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





 --
 Pierre

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




-- 
Laruence  Xinchen Hui
http://www.laruence.com/


Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/mysqli_api.c branches/PHP_5_4/ext/mysqli/mysqli_api.c trunk/ext/mysqli/mysqli_api.c

2011-09-19 Thread Laruence
Hi:
   hmm, maybe we can revert this change after a libmysql fixed version?

thanks

2011/9/19 Ulf Wendel ulf.wen...@oracle.com:
 Am 17.09.2011 05:12, schrieb Xinchen Hui:

 laruence                                 Sat, 17 Sep 2011 03:12:23 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=316895

 Log:
 Fix Bug #55703(PHP crash when calling mysqli_fetch_fields)
 Since the catalog values always is def now, see
 http://dev.mysql.com/doc/refman/5.0/en/c-api-data-structures.html

 Bug: https://bugs.php.net/55703 (Duplicate) PHP crash when calling
 mysqli_fetch_fields

 Ideally, you would wait for a libmysql fix, after the fix add a version
 change and revert. What if libmysql decides to set a value in the future?
 What about people who still use MySQL 4.1.0 ?

 Ulf

 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_4/NEWS trunk/NEWS

2011-09-17 Thread Laruence
Hi:
  done~ :)
thanks

2011/9/17 Kalle Sommer Nielsen ka...@php.net:
 Hi

 2011/9/17 Xinchen Hui larue...@php.net:
 laruence                                 Sat, 17 Sep 2011 03:23:38 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=316897

 Log:
 Update NEWS

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_4/NEWS
    U   php/php-src/trunk/NEWS

 Modified: php/php-src/branches/PHP_5_3/NEWS
 ===
 --- php/php-src/branches/PHP_5_3/NEWS   2011-09-17 03:14:31 UTC (rev 316896)
 +++ php/php-src/branches/PHP_5_3/NEWS   2011-09-17 03:23:38 UTC (rev 316897)
 @@ -38,6 +38,8 @@
  - MySQLi extension:
   . Fixed bug #55582 (mysqli_num_rows() returns always 0 for unbuffered, when
   mysqlnd is used). (Andrey)
 +  . Fixed bug #55703 (PHP crash when calling mysqli_fetch_fields).
 +    (eran at zend dot com, Laruence)

  - mysqlnd
   . Fixed bug #55609 (mysqlnd cannot be built shared). (Johannes)

 Modified: php/php-src/branches/PHP_5_4/NEWS
 ===
 --- php/php-src/branches/PHP_5_4/NEWS   2011-09-17 03:14:31 UTC (rev 316896)
 +++ php/php-src/branches/PHP_5_4/NEWS   2011-09-17 03:23:38 UTC (rev 316897)
 @@ -4,7 +4,13 @@
  - Core:
   . Fixed bug #55707 (undefined reference to `__sync_fetch_and_add_4' on 
 Linux
     parisc). (Felipe)
 +  . Fixed bug #55705 (Omitting a callable typehinted argument causes a 
 segfault).
 +    (Felipe, Laruence)

 +- MySQLi extension:
 +  . Fixed bug #55703 (PHP crash when calling mysqli_fetch_fields).
 +    (eran at zend dot com, Laruence)
 +
  15 Sep 2011, PHP 5.4.0 Beta
  - General improvements:
   . Added callable typehint. (Hannes)

 Only the 5.3 NEWS should have been updated here.

 --
 regards,

 Kalle Sommer Nielsen
 ka...@php.net




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/fileinfo/libmagic/print.c branches/PHP_5_4/main/snprintf.c trunk/ext/fileinfo/libmagic/print.c trunk/main/snprintf.c

2011-09-15 Thread Laruence
Hi:
  sure, thanks :)


2011/9/15 Kalle Sommer Nielsen ka...@php.net:
 Hi Laruence

 2011/9/15 Xinchen Hui larue...@php.net:
 laruence                                 Thu, 15 Sep 2011 07:09:43 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=316807

 Log:
 Fix warning implicit declaration of function `vasprintf'
 If There is a better fix, plz fixme.

 Changed paths:
    U   php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/print.c
    U   php/php-src/branches/PHP_5_4/main/snprintf.c
    U   php/php-src/trunk/ext/fileinfo/libmagic/print.c
    U   php/php-src/trunk/main/snprintf.c

 Remember to sync the .patch file seeing as you altered the files in
 libmagic/ for when the library is updated :)
 --
 regards,

 Kalle Sommer Nielsen
 ka...@php.net




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWSbranches/PHP_5_4/ext/session/config.m4 branches/PHP_5_4/ext/session/config.w32branches/PHP_5_4/ext/session/mod_user.c branches/PHP_5_4/ext/session

2011-09-14 Thread Laruence
Hi,
  FYI, you might should delete the autom4te.cache folder too :-)

thanks

2011/9/14 Christian Stocker chr...@php.net:
 Hi

 I still have this. even after re-running buildconf (and deleting
 configure before)

 On OS X and x86_64 Linux

 chregu

 On 14.09.11 05:31, Laruence wrote:
 Hi:
   after I re-run buildconf, error has gone

   sorry for mis-report.

 thanks

 2011/9/14 Laruence larue...@php.net:
 Hi:
    trunk build broken:
    ext/session/session.o(.rodata+0x24a8): undefined reference to
 `zim_SessionHandler_open'
 ext/session/session.o(.rodata+0x24c8): undefined reference to
 `zim_SessionHandler_close'
 ext/session/session.o(.rodata+0x24e8): undefined reference to
 `zim_SessionHandler_read'
 ext/session/session.o(.rodata+0x2508): undefined reference to
 `zim_SessionHandler_write'
 ext/session/session.o(.rodata+0x2528): undefined reference to
 `zim_SessionHandler_destroy'
 ext/session/session.o(.rodata+0x2548): undefined reference to
 `zim_SessionHandler_gc'
 collect2: ld returned 1 exit status
 make: *** [sapi/cli/php] Error 1
 make: *** Waiting for unfinished jobs
 ext/session/session.o(.rodata+0x24a8): undefined reference to
 `zim_SessionHandler_open'
 ext/session/session.o(.rodata+0x24c8): undefined reference to
 `zim_SessionHandler_close'
 ext/session/session.o(.rodata+0x24e8): undefined reference to
 `zim_SessionHandler_read'
 ext/session/session.o(.rodata+0x2508): undefined reference to
 `zim_SessionHandler_write'
 ext/session/session.o(.rodata+0x2528): undefined reference to
 `zim_SessionHandler_destroy'
 ext/session/session.o(.rodata+0x2548): undefined reference to
 `zim_SessionHandler_gc'

 thanks

 2011/9/14 Arpad Ray ar...@php.net:
 arpad                                    Tue, 13 Sep 2011 22:28:15 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=316688

 Log:
 Implement object-oriented session handlers 
 (https://wiki.php.net/rfc/session-oo)

 Changed paths:
    U   php/php-src/branches/PHP_5_4/NEWS
    U   php/php-src/branches/PHP_5_4/ext/session/config.m4
    U   php/php-src/branches/PHP_5_4/ext/session/config.w32
    U   php/php-src/branches/PHP_5_4/ext/session/mod_user.c
    A   php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c
    U   php/php-src/branches/PHP_5_4/ext/session/package.xml
    U   php/php-src/branches/PHP_5_4/ext/session/php_session.h
    U   php/php-src/branches/PHP_5_4/ext/session/session.c
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_001.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_002.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_003.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_004.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_005.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_006.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_007.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_008.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_009.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_010.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_011.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_012.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_013.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_014.phpt
    U   php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c
    U   php/php-src/branches/PHP_5_4/ext/standard/basic_functions.h
    U   php/php-src/trunk/ext/session/config.m4
    U   php/php-src/trunk/ext/session/config.w32
    U   php/php-src/trunk/ext/session/mod_user.c
    A   php/php-src/trunk/ext/session/mod_user_class.c
    U   php/php-src/trunk/ext/session/package.xml
    U   php/php-src/trunk/ext/session/php_session.h
    U   php/php-src/trunk/ext/session/session.c
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_001.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_002.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_003.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_004.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_005.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_006.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_007.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_008.phpt
    A   
 php/php-src/trunk/ext/session/tests

Re: [PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/ext/standard/tests/general_functions/parse_ini_file.phpt PHP_5_3/ext/standard/tests/general_functions/parse_ini_string_002.phpt PHP_5_4/ext/standard/t

2011-09-14 Thread Laruence
Hi:

  cjorcl laruence, from earlier: cjorcl who broke
parse_ini_file.phpt and parse_ini_string_002.phpt? laruence_ your
change borked it for me.  Perhaps one of us has out of sync scanner.
I'll check mine later, but no time today

cjorcl laruence, re ini tests.  OK.

thanks

2011/9/14 Hannes Magnusson hannes.magnus...@gmail.com:
 On Tue, Sep 13, 2011 at 15:02, Xinchen Hui larue...@php.net wrote:
 laruence                                 Tue, 13 Sep 2011 13:02:57 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=316621

 Log:
 MFH, fix test

 Changed paths:
    U   
 php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/parse_ini_file.phpt
    U   
 php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/parse_ini_string_002.phpt
    U   
 php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/parse_ini_file.phpt
    U   
 php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/parse_ini_string_002.phpt

 Modified: 
 php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/parse_ini_file.phpt
 ===
 --- 
 php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/parse_ini_file.phpt
        2011-09-13 12:59:51 UTC (rev 316620)
 +++ 
 php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/parse_ini_file.phpt
        2011-09-13 13:02:57 UTC (rev 316621)
 @@ -137,11 +137,11 @@
   string(0) 
  }

 -Warning: syntax error, unexpected '=' in %sparse_ini_file.dat on line 2
 +Warning: syntax error, unexpected '=', expecting $end or TC_SECTION or 
 TC_LABEL or TC_OFFSET in %sparse_ini_file.dat on line 2
  in %sparse_ini_file.php on line 20
  bool(false)

 -Warning: syntax error, unexpected '=' in %sparse_ini_file.dat on line 2
 +Warning: syntax error, unexpected '=', expecting $end or TC_SECTION or 
 TC_LABEL or TC_OFFSET in %sparse_ini_file.dat on line 2
  in %sparse_ini_file.php on line 26
  bool(false)


 These changes broke the test for me...

 -Hannes




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug55509.phpt branches/PHP_5_3/Zend/zend_alloc.c branches/PHP_5_4/Zend/tests/bug55509.phpt branches/PHP_5_4/Zend/zend

2011-09-13 Thread Laruence
Hi:
   anyone has Zend karma,  plz help dmitry to fix this litte bug.

   specifically, change the expect warning to :

   Fatal error: Allowed memory size of %d bytes exhausted at %s (tried
to allocate %d bytes) in %s/bug55509.php on line %d

thanks

2011/9/14 Christopher Jones christopher.jo...@oracle.com:

 Dmitry,

 This is diffing for me in 5.4 (I've haven't looked at 5.3 or trunk):

 007+ Fatal error: Allowed memory size of 3221225472 bytes exhausted at
 /home/cjones/phpsrc/php/php-src/branches/PHP_5_4/ext/standard/string.c:4636
 (tried to allocate 536870913 bytes) in
 /home/cjones/phpsrc/php/php-src/branches/PHP_5_4/Zend/tests/bug55509.php on
 line 12
 007- Fatal error: Allowed memory size of %d bytes exhausted (tried to
 allocate %d bytes) in %s/bug55509.php on line %d

 Chris

 On 09/13/2011 12:01 AM, Dmitry Stogov wrote:

 dmitry                                   Tue, 13 Sep 2011 07:01:46 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=316590

 Log:
 Fixed bug #55509 (segfault on x86_64 using more than 2G memory).
 (Laruence)

 Bug: https://bugs.php.net/55509 (Verified) segfault on x86_64 using more
 than 2G memory

 Changed paths:
     U   php/php-src/branches/PHP_5_3/NEWS
     A   php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt
     U   php/php-src/branches/PHP_5_3/Zend/zend_alloc.c
     A   php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt
     U   php/php-src/branches/PHP_5_4/Zend/zend_alloc.c
     A   php/php-src/trunk/Zend/tests/bug55509.phpt
     U   php/php-src/trunk/Zend/zend_alloc.c

 Modified: php/php-src/branches/PHP_5_3/NEWS
 ===
 --- php/php-src/branches/PHP_5_3/NEWS   2011-09-13 06:22:25 UTC (rev
 316589)
 +++ php/php-src/branches/PHP_5_3/NEWS   2011-09-13 07:01:46 UTC (rev
 316590)
 @@ -8,6 +8,7 @@
    . Fixed bug #55366: keys lost when using substr_replace an array.
 (Arpad)
    . Fixed bug #55510: $_FILES 'name' missing first character after
 upload.
      (Arpad)
 +  . Fixed bug #55509 (segfault on x86_64 using more than 2G memory).
 (Laruence)
    . Fixed bug #55576: Cannot conditionally move uploaded file without
 race
      condition. (Gustavo)
    . Fixed bug #55504 (Content-Type header is not parsed correctly on

 Added: php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt
 ===
 --- php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt
               (rev 0)
 +++ php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt       2011-09-13
 07:01:46 UTC (rev 316590)
 @@ -0,0 +1,33 @@
 +--TEST--
 +Bug #55509 (segfault on x86_64 using more than 2G memory)
 +--SKIPIF--
 +?php
 +if (PHP_INT_SIZE == 4) {
 +  die('skip Not for 32-bits OS');
 +}
 +?
 +--INI--
 +memory_limit=3G
 +--FILE--
 +?php
 +$a1 = str_repeat(1, 1024 * 1024 * 1024 * 0.5);
 +echo 1\n;
 +$a2 = str_repeat(2, 1024 * 1024 * 1024 * 0.5);
 +echo 2\n;
 +$a3 = str_repeat(3, 1024 * 1024 * 1024 * 0.5);
 +echo 3\n;
 +$a4 = str_repeat(4, 1024 * 1024 * 1024 * 0.5);
 +echo 4\n;
 +$a5 = str_repeat(5, 1024 * 1024 * 1024 * 0.5);
 +echo 5\n;
 +$a6 = str_repeat(6, 1024 * 1024 * 1024 * 0.5);
 +echo 6\n;
 +?
 +--EXPECTF--
 +1
 +2
 +3
 +4
 +5
 +
 +Fatal error: Allowed memory size of %d bytes exhausted (tried to allocate
 %d bytes) in %s/bug55509.php on line %d

 Modified: php/php-src/branches/PHP_5_3/Zend/zend_alloc.c
 ===
 --- php/php-src/branches/PHP_5_3/Zend/zend_alloc.c      2011-09-13
 06:22:25 UTC (rev 316589)
 +++ php/php-src/branches/PHP_5_3/Zend/zend_alloc.c      2011-09-13
 07:01:46 UTC (rev 316590)
 @@ -510,7 +510,7 @@
  #define ZEND_MM_IS_GUARD_BLOCK(b)             (((b)-info._size
  ZEND_MM_TYPE_MASK) == ZEND_MM_GUARD_BLOCK)

  #define ZEND_MM_NEXT_BLOCK(b)                 ZEND_MM_BLOCK_AT(b,
 ZEND_MM_BLOCK_SIZE(b))
 -#define ZEND_MM_PREV_BLOCK(b)                  ZEND_MM_BLOCK_AT(b,
 -(int)((b)-info._prev  ~ZEND_MM_TYPE_MASK))
 +#define ZEND_MM_PREV_BLOCK(b)                  ZEND_MM_BLOCK_AT(b,
 -(ssize_t)((b)-info._prev  ~ZEND_MM_TYPE_MASK))

  #define ZEND_MM_PREV_BLOCK_IS_FREE(b) (!((b)-info._prev
  ZEND_MM_USED_BLOCK))


 Added: php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt
 ===
 --- php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt
               (rev 0)
 +++ php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt       2011-09-13
 07:01:46 UTC (rev 316590)
 @@ -0,0 +1,33 @@
 +--TEST--
 +Bug #55509 (segfault on x86_64 using more than 2G memory)
 +--SKIPIF--
 +?php
 +if (PHP_INT_SIZE == 4) {
 +  die('skip Not for 32-bits OS');
 +}
 +?
 +--INI--
 +memory_limit=3G
 +--FILE--
 +?php
 +$a1 = str_repeat(1, 1024 * 1024 * 1024 * 0.5);
 +echo 1\n;
 +$a2 = str_repeat(2, 1024 * 1024 * 1024 * 0.5);
 +echo 2\n;
 +$a3 = str_repeat(3, 1024 * 1024 * 1024 * 0.5);
 +echo 3\n;
 +$a4 = str_repeat(4, 1024 * 1024 * 1024 * 0.5);
 +echo 4\n;
 +$a5

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/ext/session/config.m4 branches/PHP_5_4/ext/session/config.w32 branches/PHP_5_4/ext/session/mod_user.c branches/PHP_5_4/ext/sessi

2011-09-13 Thread Laruence
/session_set_save_handler_class_014.phpt
    U   php/php-src/trunk/ext/standard/basic_functions.c
    U   php/php-src/trunk/ext/standard/basic_functions.h


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/ext/session/config.m4 branches/PHP_5_4/ext/session/config.w32 branches/PHP_5_4/ext/session/mod_user.c branches/PHP_5_4/ext/sessi

2011-09-13 Thread Laruence
Hi:
  after I re-run buildconf, error has gone

  sorry for mis-report.

thanks

2011/9/14 Laruence larue...@php.net:
 Hi:
    trunk build broken:
    ext/session/session.o(.rodata+0x24a8): undefined reference to
 `zim_SessionHandler_open'
 ext/session/session.o(.rodata+0x24c8): undefined reference to
 `zim_SessionHandler_close'
 ext/session/session.o(.rodata+0x24e8): undefined reference to
 `zim_SessionHandler_read'
 ext/session/session.o(.rodata+0x2508): undefined reference to
 `zim_SessionHandler_write'
 ext/session/session.o(.rodata+0x2528): undefined reference to
 `zim_SessionHandler_destroy'
 ext/session/session.o(.rodata+0x2548): undefined reference to
 `zim_SessionHandler_gc'
 collect2: ld returned 1 exit status
 make: *** [sapi/cli/php] Error 1
 make: *** Waiting for unfinished jobs
 ext/session/session.o(.rodata+0x24a8): undefined reference to
 `zim_SessionHandler_open'
 ext/session/session.o(.rodata+0x24c8): undefined reference to
 `zim_SessionHandler_close'
 ext/session/session.o(.rodata+0x24e8): undefined reference to
 `zim_SessionHandler_read'
 ext/session/session.o(.rodata+0x2508): undefined reference to
 `zim_SessionHandler_write'
 ext/session/session.o(.rodata+0x2528): undefined reference to
 `zim_SessionHandler_destroy'
 ext/session/session.o(.rodata+0x2548): undefined reference to
 `zim_SessionHandler_gc'

 thanks

 2011/9/14 Arpad Ray ar...@php.net:
 arpad                                    Tue, 13 Sep 2011 22:28:15 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=316688

 Log:
 Implement object-oriented session handlers 
 (https://wiki.php.net/rfc/session-oo)

 Changed paths:
    U   php/php-src/branches/PHP_5_4/NEWS
    U   php/php-src/branches/PHP_5_4/ext/session/config.m4
    U   php/php-src/branches/PHP_5_4/ext/session/config.w32
    U   php/php-src/branches/PHP_5_4/ext/session/mod_user.c
    A   php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c
    U   php/php-src/branches/PHP_5_4/ext/session/package.xml
    U   php/php-src/branches/PHP_5_4/ext/session/php_session.h
    U   php/php-src/branches/PHP_5_4/ext/session/session.c
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_001.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_002.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_003.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_004.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_005.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_006.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_007.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_008.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_009.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_010.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_011.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_012.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_013.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_014.phpt
    U   php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c
    U   php/php-src/branches/PHP_5_4/ext/standard/basic_functions.h
    U   php/php-src/trunk/ext/session/config.m4
    U   php/php-src/trunk/ext/session/config.w32
    U   php/php-src/trunk/ext/session/mod_user.c
    A   php/php-src/trunk/ext/session/mod_user_class.c
    U   php/php-src/trunk/ext/session/package.xml
    U   php/php-src/trunk/ext/session/php_session.h
    U   php/php-src/trunk/ext/session/session.c
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_001.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_002.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_003.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_004.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_005.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_006.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_007.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_008.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_009.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_010.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_011.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_012.phpt

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/session/mod_user_class.c trunk/ext/session/mod_user_class.c

2011-09-13 Thread Laruence
Hi:
   arpad, plz review this change,
   and btw, most mod_use_class phpt test failed in my environ
due to %x, like:

003+ Read 2dv964ea5joi1pah2nad6e3pm5
004+ string(26) 2dv964ea5joi1pah2nad6e3pm5
003- Read %x
004- string(32) %x

thanks

2011/9/14 Xinchen Hui larue...@php.net:
 laruence                                 Wed, 14 Sep 2011 04:10:45 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=316711

 Log:
 Fix bug #55688 (Crash when calling SessionHandler::gc())
 Need arpad to review this change

 Bug: https://bugs.php.net/55688 (Open) Crash when calling SessionHandler::gc()

 Changed paths:
    U   php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c
    U   php/php-src/trunk/ext/session/mod_user_class.c

 Modified: php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c
 ===
 --- php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c   2011-09-14 
 04:06:32 UTC (rev 316710)
 +++ php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c   2011-09-14 
 04:10:45 UTC (rev 316711)
 @@ -133,7 +133,7 @@
        long maxlifetime;
        int nrdels;

 -       PS_SANITY_CHECK;
 +       PS_SANITY_CHECK_IS_OPEN;

        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, 
 maxlifetime) == FAILURE) {
                return;

 Modified: php/php-src/trunk/ext/session/mod_user_class.c
 ===
 --- php/php-src/trunk/ext/session/mod_user_class.c      2011-09-14 04:06:32 
 UTC (rev 316710)
 +++ php/php-src/trunk/ext/session/mod_user_class.c      2011-09-14 04:10:45 
 UTC (rev 316711)
 @@ -133,7 +133,7 @@
        long maxlifetime;
        int nrdels;

 -       PS_SANITY_CHECK;
 +       PS_SANITY_CHECK_IS_OPEN;

        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, 
 maxlifetime) == FAILURE) {
                return;


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/trunk/ext/phar/ stream.c

2011-09-12 Thread Laruence
2011/9/12 Hannes Magnusson hannes.magnus...@gmail.com:
 On Sun, Aug 7, 2011 at 07:24, Xinchen Hui larue...@php.net wrote:
 laruence                                 Sun, 07 Aug 2011 05:24:11 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=314401

 Log:
 Initialize temp with 0, avoiding compile warning

 Changed paths:
    U   php/php-src/trunk/ext/phar/stream.c


 What about 5_4 and 5_3?

 -Hannes

Hi:
   they have be fixed,  and there are some inconformity in branch and
trunk, I will fix soon.

thanks

-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_explain_metadata.phpt branches/PHP_5_4/ext/mysqli/tests/mysqli_explain_metadata.phpt trunk/ext/mysqli/tests/mysqli_explain_met

2011-09-12 Thread Laruence
Hi:
   did you test with mysqlnd?
   I did before and get same segfault,  you also said it was server issue?

thanks

2011/9/12 Ulf Wendel u...@php.net:
 uw                                       Mon, 12 Sep 2011 13:14:16 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=316533

 Log:
 Hits libmysql/MySQL bug, works with mysqlnd

 Changed paths:
    U   
 php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_explain_metadata.phpt
    U   
 php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_explain_metadata.phpt
    U   php/php-src/trunk/ext/mysqli/tests/mysqli_explain_metadata.phpt

 Modified: 
 php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_explain_metadata.phpt
 ===
 --- 
 php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_explain_metadata.phpt  
 2011-09-12 13:06:48 UTC (rev 316532)
 +++ 
 php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_explain_metadata.phpt  
 2011-09-12 13:14:16 UTC (rev 316533)
 @@ -5,6 +5,9 @@
  require_once('skipif.inc');
  require_once('skipifemb.inc');
  require_once('skipifconnectfailure.inc');
 +require_once(connect.inc);
 +if (!$IS_MYSQLND)
 +  die(skip Open libmysql/MySQL issue http://bugs.mysql.com/?id=62350;);
  ?
  --FILE--
  ?php

 Modified: 
 php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_explain_metadata.phpt
 ===
 --- 
 php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_explain_metadata.phpt  
 2011-09-12 13:06:48 UTC (rev 316532)
 +++ 
 php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_explain_metadata.phpt  
 2011-09-12 13:14:16 UTC (rev 316533)
 @@ -5,6 +5,9 @@
  require_once('skipif.inc');
  require_once('skipifemb.inc');
  require_once('skipifconnectfailure.inc');
 +require_once(connect.inc);
 +if (!$IS_MYSQLND)
 +  die(skip Open libmysql/MySQL issue http://bugs.mysql.com/?id=62350;);
  ?
  --FILE--
  ?php

 Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_explain_metadata.phpt
 ===
 --- php/php-src/trunk/ext/mysqli/tests/mysqli_explain_metadata.phpt     
 2011-09-12 13:06:48 UTC (rev 316532)
 +++ php/php-src/trunk/ext/mysqli/tests/mysqli_explain_metadata.phpt     
 2011-09-12 13:14:16 UTC (rev 316533)
 @@ -5,6 +5,9 @@
  require_once('skipif.inc');
  require_once('skipifemb.inc');
  require_once('skipifconnectfailure.inc');
 +require_once(connect.inc);
 +if (!$IS_MYSQLND)
 +  die(skip Open libmysql/MySQL issue http://bugs.mysql.com/?id=62350;);
  ?
  --FILE--
  ?php


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/mysqli/mysqli_api.c trunk/ext/mysqli/mysqli_api.c

2011-09-09 Thread Laruence
Hi:
  uw has already added tests for this
  http://svn.php.net/viewvc/?view=revisionamp;revision=316455

thanks

-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/sapi/cli/php_cli_server.c trunk/NEWS trunk/sapi/cli/php_cli_server.c

2011-08-22 Thread Laruence
Hi:

Added SERVER[SERVER_SOFTWARE],
http://svn.php.net/viewvc?view=revisionrevision=315300

but server_addr is a litte diffcult since there is no a ready value
for that,  needs a litte more works, I think we'd better not do that
much changes for this,  at least need the author to review, :)

thanks

2011/8/22 Pierre Joye pierre@gmail.com:
 open a new FR please. Easier than following php-cvs for new FR.

 On Mon, Aug 22, 2011 at 2:17 PM, Kalle Sommer Nielsen ka...@php.net wrote:
 Hi

 2011/8/22 Xinchen Hui larue...@php.net:
 laruence                                 Mon, 22 Aug 2011 11:55:41 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=315278

 Log:
 Fixed #55463 (cli-server missing _SERVER[REMOTE_ADDR])

 We might as well add SERVER_ADDR (+ SERVER_SOFTWARE) if not available too

 --
 regards,

 Kalle Sommer Nielsen
 ka...@php.net

 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





 --
 Pierre

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




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] Re: utf-8?q?svn:_/php/php-src/_branches/PHP=5F5=5F4/ext/ereg/ereg.c_br anches/PHP=5F5=5F4/ext/ereg/regex/regerror.c_branches/PHP=5F5=5F4/ext/stan dard/var.c_branches/PHP=5F5=5F4/main/streams

2011-08-14 Thread Laruence
Hi Derick:
   -smart_str_append_long(buf, 
(long)Z_OBJCE_P(struc)-name_length);
+   smart_str_append_long(buf, 
(int)Z_OBJCE_P(struc)-name_length);

this is the commit message try to description,

I was plan to commit them separately,   but by mistake,   I committed
them both,,


thanks

2011/8/14 Derick Rethans der...@php.net:
 On Fri, 12 Aug 2011, Xinchen Hui wrote:

 laruence                                 Fri, 12 Aug 2011 07:47:03 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=314808

 Log:
 Omitted GCC warning comparison is always false

 I don't get this commit message, as you seem to have changed \0 issues
 almost exclusively in this patch.

 Derick


 Changed paths:
     U   php/php-src/branches/PHP_5_4/ext/ereg/ereg.c
     U   php/php-src/branches/PHP_5_4/ext/ereg/regex/regerror.c
     U   php/php-src/branches/PHP_5_4/ext/standard/var.c
     U   php/php-src/branches/PHP_5_4/main/streams/cast.c
     U   php/php-src/trunk/ext/ereg/ereg.c
     U   php/php-src/trunk/ext/ereg/regex/regerror.c
     U   php/php-src/trunk/ext/ereg/regex.patch
     U   php/php-src/trunk/ext/standard/var.c
     U   php/php-src/trunk/main/streams/cast.c



 --
 http://derickrethans.nl | http://xdebug.org
 Like Xdebug? Consider a donation: http://xdebug.org/donate.php
 twitter: @derickr and @xdebug




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] utf-8?q?svn:_/php/php-src/_branches/PHP=5F5=5F4/ext/ereg/ereg.c_br anches/PHP=5F5=5F4/ext/ereg/regex/regerror.c_branches/PHP=5F5=5F4/ext/stan dard/var.c_branches/PHP=5F5=5F4/main/streams

2011-08-14 Thread Laruence
Hi:
   smart_str_append_long(buf, (long)Z_OBJCE_P(struc)-name_length);

   if you expand the macro,  then it will result a :

   if (num  0) {  \
smart_str_print_unsigned4((buf), -(num), vartype, (result));\
*--(result) = '-';  \
} else {\
smart_str_print_unsigned4((buf), (num), vartype, (result)); \
}

   and the Compiler(GCC) will complain that  num  have no chance to be
a negative,  if you wondering why:

   because, in 64-bit os,   when do the type cast  (unsigned int)  -
(long),  the highest bit (which known as sign bit two) will always set
to 0,

   I was plan to change the (long) to (long)(signed),   gwynne
suggesting me to use (int), and leave the second step type conversion
to complier,  and I agree with him at last


thanks


2011/8/15 Stas Malyshev smalys...@sugarcrm.com:
 On 8/14/11 4:25 AM, Derick Rethans wrote:

 On Fri, 12 Aug 2011, Xinchen Hui wrote:

 laruence                                 Fri, 12 Aug 2011 07:47:03 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=314808

 Log:
 Omitted GCC warning comparison is always false

 I don't get this commit message, as you seem to have changed \0 issues
 almost exclusively in this patch.

 I'm not sure also why you did this change:

 http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/ext/standard/var.c?r1=314808r2=314807pathrev=314808

 Or why here:

 http://svn.php.net/viewvc/php/php-src/trunk/ext/ereg/regex/regerror.c?r1=314808r2=314807pathrev=314808

 zero-termination applies only to one clause.


 --
 Stanislav Malyshev, Software Architect
 SugarCRM: http://www.sugarcrm.com/
 (408)454-6900 ext. 227




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] utf-8?q?svn:_/php/php-src/_branches/PHP=5F5=5F4/ext/ereg/ereg.c_br anches/PHP=5F5=5F4/ext/ereg/regex/regerror.c_branches/PHP=5F5=5F4/ext/stan dard/var.c_branches/PHP=5F5=5F4/main/streams

2011-08-14 Thread Laruence
Hi:
 also you may wondering that this change could bring in a issue,
that is the class name length could not greater than 2G, or it will
considered as a negative length,

 and yes,  we have disscussed this in IRC, and the conclusion is ,
if a class name length greater than 2G,  there must be some more fatal
error than this, and might not pass the lex/yacc phase at all.


 ps: sorry for missed the list.

2011/8/15 Laruence larue...@php.net:
 Hi:
   smart_str_append_long(buf, (long)Z_OBJCE_P(struc)-name_length);

   if you expand the macro,  then it will result a :

   if (num  0) {                                                  \
        smart_str_print_unsigned4((buf), -(num), vartype, (result));    \
        *--(result) = '-';                                          \
    } else {                                                        \
        smart_str_print_unsigned4((buf), (num), vartype, (result)); \
    }

   and the Compiler(GCC) will complain that  num  have no chance to be
 a negative,  if you wondering why:

   because, in 64-bit os,   when do the type cast  (unsigned int)  -
 (long),  the highest bit (which known as sign bit two) will always set
 to 0,

   I was plan to change the (long) to (long)(signed),   gwynne
 suggesting me to use (int), and leave the second step type conversion
 to complier,  and I agree with him at last


 thanks


 2011/8/15 Stas Malyshev smalys...@sugarcrm.com:
 On 8/14/11 4:25 AM, Derick Rethans wrote:

 On Fri, 12 Aug 2011, Xinchen Hui wrote:

 laruence                                 Fri, 12 Aug 2011 07:47:03 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=314808

 Log:
 Omitted GCC warning comparison is always false

 I don't get this commit message, as you seem to have changed \0 issues
 almost exclusively in this patch.

 I'm not sure also why you did this change:

 http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/ext/standard/var.c?r1=314808r2=314807pathrev=314808

 Or why here:

 http://svn.php.net/viewvc/php/php-src/trunk/ext/ereg/regex/regerror.c?r1=314808r2=314807pathrev=314808

 zero-termination applies only to one clause.


 --
 Stanislav Malyshev, Software Architect
 SugarCRM: http://www.sugarcrm.com/
 (408)454-6900 ext. 227




 --
 Laruence  Xinchen Hui
 http://www.laruence.com/




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c trunk/ext/fileinfo/libmagic/softmagic.c

2011-08-08 Thread Laruence
Hi all:

trunk/ext/fileinfo/libmagic/softmagic.c seems to be a third-party
source, I was wondering can I directly modify it?

it can't be compiled with -Wall -Werror, with a lots of warnings..

thanks

2011/8/9 larue...@baidu.com



  Original Message   Subject: [PHP-CVS] svn: /php/php-src/
 branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c
 branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c
 trunk/ext/fileinfo/libmagic/softmagic.c  Date: Tue, 9 Aug 2011 00:57:46
 +0800  From: Xinchen Hui larue...@php.net larue...@php.net  To:
 php-cvs@lists.php.net php-cvs@lists.php.net php-cvs@lists.php.net

 laruence Mon, 08 Aug 2011 16:57:46 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=314565

 Log:
 Remove unnecessary(no sense) memset and making the static analyzer silent

 Changed paths:
 U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c
 U   php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c
 U   php/php-src/trunk/ext/fileinfo/libmagic/softmagic.c

 Modified: php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c
 ===
 --- php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c  
 2011-08-08 16:49:43 UTC (rev 314564)
 +++ php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c  
 2011-08-08 16:57:46 UTC (rev 314565)
 @@ -1652,7 +1652,6 @@
 char *t;

 t = (char *) safe_emalloc(Z_STRLEN_P(pattern), 2, 5);
 -   memset(t, '\0', sizeof(t));

 t[j++] = '~';


 Modified: php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c
 ===
 --- php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c  
 2011-08-08 16:49:43 UTC (rev 314564)
 +++ php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c  
 2011-08-08 16:57:46 UTC (rev 314565)
 @@ -1652,7 +1652,6 @@
 char *t;

 t = (char *) safe_emalloc(Z_STRLEN_P(pattern), 2, 5);
 -   memset(t, '\0', sizeof(t));

 t[j++] = '~';


 Modified: php/php-src/trunk/ext/fileinfo/libmagic/softmagic.c
 ===
 --- php/php-src/trunk/ext/fileinfo/libmagic/softmagic.c 2011-08-08 16:49:43 
 UTC (rev 314564)
 +++ php/php-src/trunk/ext/fileinfo/libmagic/softmagic.c 2011-08-08 16:57:46 
 UTC (rev 314565)
 @@ -1652,7 +1652,6 @@
 char *t;

 t = (char *) safe_emalloc(Z_STRLEN_P(pattern), 2, 5);
 -   memset(t, '\0', sizeof(t));

 t[j++] = '~';






-- 
Laruence  Xinchen Hui
http://www.laruence.com/


Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/basic_functions.c branches/PHP_5_4/ext/standard/basic_functions.c trunk/ext/standard/basic_functions.c

2011-08-07 Thread Laruence
Hi:
   This was what it was before I edit it. I also don't very sure about it.

   and after tracking, I found this statements was introduced in -r243300

   diff: 
http://svn.php.net/viewvc/php/php-src/trunk/ext/standard/basic_functions.c?r1=243098r2=243300

   looks like it was wrong in the rewrite phase,,

   I have delete these no sense statements..


thanks
2011/8/8 Stas Malyshev smalys...@sugarcrm.com:
 Hi!

 On 8/7/11 7:25 AM, Xinchen Hui wrote:

 laruence                                 Sun, 07 Aug 2011 14:25:30 +
                memset(opts, 0, count * sizeof(opt_struct));

 +               if (!opts) {
 +                       RETURN_FALSE;
 +               }
 +

 I'm not sure I understand this code. You first use opts as memset target and
 then check if for null. How that works?
 --
 Stanislav Malyshev, Software Architect
 SugarCRM: http://www.sugarcrm.com/
 (408)454-6900 ext. 227




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php