Commit Graph

88953 Commits

Author SHA1 Message Date
Dmitry Stogov
aee2985f35 Merge branch 'scalar_type_hints_v5' of github.com:ircmaxell/php-src into scalar_type_hints_v5
* 'scalar_type_hints_v5' of github.com:ircmaxell/php-src: (54 commits)
  Add check for maintaining reference all the way through both type and return values
  Reduce the number of times that the zval needs to be separated in return type checking to those that are necessary
  Add test to ensure namespaced code can't use scalar types as class names
  Disallow relative namespace type declarations
  Add support and tests for null constant default values. Refactor complex conditionals into an extracted function for clarity and code-reuse
  Refactor as to not use call info, but add the flag to the op_array.
  Fix severity issues with callbacks, start work porting ZEND_STRLEN opcode to work with strict mode, more refactoring to come
  Fix C89 compatibility by moving a misplaced if statement
  Refactor gotos into more elaborate ifs to eliminate goto failure
  Fix return type separation with references. It now includes a check in the opcode handler and properly separates the value in both cases
  Add error case with invalid type declaration default value
  Add tests for using constants as defaults with scalar type declarations
  Refactor error messages to only append defined in the event of rendering as a fatal error. Fix relative typehints to not work
  Revert gd and mysqli to former calls for arg count errors. Fix first identified issues with zend_compile.c from nikic. Add tests for generator returns prior to first yield
  Style cleanup, as well as fixing bug with missing argument for WRONG_PARAM_COUNT_WITH_RETVAL
  Clean up API renames for zend_wrong_param_count to maintain BC, introducing a zend_wrong_param_count_ex() function when you know strict value
  Fix executor issue with ignoring strict types, which cleans up a bunch of errors. Additionally fix the expected error of 2 unrelated tests that was caused by a change to the core error messages
  Fix more tests, improve error messages in failure output for thrown exception
  Refactor error implementation significantly to centralize error mode behavior. Add zend_internal_type_error() function
  Refactor declare placement detection, allow encoding declares before type declares
  ...
2015-03-20 10:51:41 +03:00
Stanislav Malyshev
288424fa4a Merge branch 'PHP-5.6'
* PHP-5.6:
  add CVEs
2015-03-19 23:06:19 -07:00
Stanislav Malyshev
eebd7c66ee Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  add CVEs
2015-03-19 23:05:49 -07:00
Stanislav Malyshev
72c19d8260 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  add CVEs
2015-03-19 23:05:34 -07:00
Stanislav Malyshev
95b9c34f02 add CVEs 2015-03-19 22:54:48 -07:00
Dmitry Stogov
0a6bb2dfd4 Fixed optimization patterns 2015-03-20 05:24:04 +03:00
Dmitry Stogov
d146d15003 Optimize zend_string_realloc() add more specialized versions zend_string_extend() and zend_string_truncate() 2015-03-20 02:02:42 +03:00
Anthony Ferrara
8c76c331a5 Add check for maintaining reference all the way through both type and return values 2015-03-19 17:51:19 -04:00
Anthony Ferrara
2e4401512f Reduce the number of times that the zval needs to be separated in return type checking to those that are necessary 2015-03-19 17:47:43 -04:00
Anatol Belski
184793b5c1 fix condition 2015-03-19 22:33:16 +01:00
Anatol Belski
9bcd64fd83 fix condition 2015-03-19 22:33:15 +01:00
Anatol Belski
49fdb8a91d fix include 2015-03-19 22:33:14 +01:00
Anatol Belski
d3ab945d9c using zend_stat_t 2015-03-19 22:33:13 +01:00
Anatol Belski
743541b311 fix datatype mismatch warnings 2015-03-19 22:33:12 +01:00
Dmitry Stogov
452a5d8e6b String reference counters may be increased when string copied 2015-03-19 23:42:39 +03:00
Anthony Ferrara
c11cab3255 Add test to ensure namespaced code can't use scalar types as class names 2015-03-19 14:11:48 -04:00
Anthony Ferrara
aaf0c8b594 Disallow relative namespace type declarations 2015-03-19 14:07:03 -04:00
Anthony Ferrara
62fc556764 Add support and tests for null constant default values. Refactor complex conditionals into an extracted function for clarity and code-reuse 2015-03-19 13:51:24 -04:00
Anthony Ferrara
7044f9c6df Refactor as to not use call info, but add the flag to the op_array. 2015-03-19 13:30:11 -04:00
Anthony Ferrara
0ef80ac351 Fix severity issues with callbacks, start work porting ZEND_STRLEN opcode to work with strict mode, more refactoring to come 2015-03-19 12:26:34 -04:00
Lior Kaplan
ed9d3f9a50 Merge branch 'PHP-5.6'
* PHP-5.6:
  Add CVE ID for #68735
  Add CVE ID for #68735
2015-03-19 18:25:57 +02:00
Lior Kaplan
a0927357a3 Add CVE ID for #68735 2015-03-19 18:25:01 +02:00
Lior Kaplan
b20b0ffe4e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Add CVE ID for #68735
2015-03-19 18:24:28 +02:00
Lior Kaplan
8f18444cd9 Add CVE ID for #68735 2015-03-19 18:23:34 +02:00
Xinchen Hui
ecd6de157d Merge branch 'master' of https://git.php.net/repository/php-src 2015-03-19 17:03:44 +08:00
Dmitry Stogov
ca783218e7 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #69152

Conflicts:
	ext/soap/soap.c
2015-03-19 11:54:56 +03:00
Xinchen Hui
61e31b6e29 Fixed global register checking 2015-03-19 16:54:13 +08:00
Dmitry Stogov
0c3de98368 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #69152
2015-03-19 11:48:10 +03:00
Dmitry Stogov
9bdbc7490f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #69152
2015-03-19 11:42:49 +03:00
Dmitry Stogov
51856a76f8 Fixed bug #69152 2015-03-19 11:36:01 +03:00
Lior Kaplan
9c5ded46d7 Merge branch 'PHP-5.6'
* PHP-5.6:
  Add CVE to bug #69253
  Align entries format
  Add CVE assigned to 5.6.6 bugs after the release
  Add CVE to bug #69248
  Align entries format
  Add CVE to bug #69248
  Add CVE assigned to 5.5.22 bugs after the release
2015-03-19 02:47:22 +02:00
Lior Kaplan
56cda02e11 Add CVE to bug #69253 2015-03-19 02:44:45 +02:00
Lior Kaplan
9bbf9fedff Align entries format 2015-03-19 02:42:35 +02:00
Lior Kaplan
c824de432d Add CVE assigned to 5.6.6 bugs after the release 2015-03-19 02:40:22 +02:00
Lior Kaplan
df340b5d8e Add CVE to bug #69248 2015-03-19 02:37:50 +02:00
Lior Kaplan
61d11d7e10 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Align entries format
  Add CVE to bug #69248
  Add CVE assigned to 5.5.22 bugs after the release
2015-03-19 02:36:28 +02:00
Lior Kaplan
6a4399a8d9 Align entries format 2015-03-19 02:35:20 +02:00
Lior Kaplan
3eba942eb2 Add CVE to bug #69248 2015-03-19 02:30:31 +02:00
Lior Kaplan
4680f08607 Add CVE assigned to 5.5.22 bugs after the release 2015-03-19 02:29:43 +02:00
Anthony Ferrara
78d2399493 Fix C89 compatibility by moving a misplaced if statement 2015-03-18 18:38:16 -04:00
Anthony Ferrara
d8ef608f3d Refactor gotos into more elaborate ifs to eliminate goto failure 2015-03-18 18:24:00 -04:00
Anthony Ferrara
427ecdc5eb Fix return type separation with references. It now includes a check in the opcode handler and properly separates the value in both cases 2015-03-18 18:10:08 -04:00
Bob Weinand
dac2b060e4 Remove bogus ZEND_ASSERT(hash != 0)
There's always a possibility that the has will end up as equal to zero due to overflowing.
See the tests for strings whose hash overflow.
Yes, there's a check for whether the hash already was calculated... and strings with a hash equal to zero always need the hash recalculated, in one of 2^32 respectively 2^64 cases - which should not be a major issue.
2015-03-18 22:25:55 +01:00
Anthony Ferrara
f040538448 Add error case with invalid type declaration default value 2015-03-18 16:53:45 -04:00
Anthony Ferrara
94fe6c42fa Add tests for using constants as defaults with scalar type declarations 2015-03-18 16:50:51 -04:00
Anthony Ferrara
724f7118f1 Refactor error messages to only append defined in the event of rendering as a fatal error. Fix relative typehints to not work 2015-03-18 16:38:51 -04:00
Anthony Ferrara
1df033c5cd Revert gd and mysqli to former calls for arg count errors. Fix first identified issues with zend_compile.c from nikic. Add tests for generator returns prior to first yield 2015-03-18 16:14:02 -04:00
Anatol Belski
eb5dfedb6b don't expect set/get title symbols are always there 2015-03-18 20:50:54 +01:00
Anthony Ferrara
579e7fa457 Style cleanup, as well as fixing bug with missing argument for WRONG_PARAM_COUNT_WITH_RETVAL 2015-03-18 15:45:16 -04:00
Anthony Ferrara
8be4266f6a Clean up API renames for zend_wrong_param_count to maintain BC, introducing a zend_wrong_param_count_ex() function when you know strict value 2015-03-18 15:42:49 -04:00