Commit Graph

9357 Commits

Author SHA1 Message Date
Andrea Faulds
2cca4d0193 Fix undefined behaviour in strnatcmp 2014-12-13 22:06:27 +00:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
bb66f385d0 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (37 commits)
  NEWS
  NEWS
  Fix bug #68601 buffer read overflow in gd_gif_in.c
  Fixed compilation warnings
  Removed unnecessary checks
  pcntl_signal_dispatch: Speed up by preventing system calls when unnecessary
  Merged PR #911.
  Removed ZEND_ACC_FINAL_CLASS which is unnecessary. This also fixed some currently defined classes as final which were just not being considered as such before.
  Updated NEWS
  Updated NEWS
  Updated NEWS
  Fix bug #68532: convert.base64-encode omits padding bytes
  Updated NEWS
  Updated NEWS
  Updated NEWS
  Fixed Bug #65576 (Constructor from trait conflicts with inherited constructor)
  Updated NEWS
  Updated NEWS
  Fix MySQLi tests
  Fixed gd test
  ...
2014-12-13 19:43:45 +01:00
Andrea Faulds
0ea0b591d7 Merge branch 'zppFailOnOverflow'
* zppFailOnOverflow:
  Fix MySQLi tests
  Fixed gd test
  Refactor ZEND_LONG_MAX/MIN checks into ZEND_DOUBLE_FITS_LONG()
  Fixed copy-and-paste error
  Fix more 32-bit tests
  Skip buncha tests on 32-bit
  skip simplexml
  skip posix 32-bit
  skip tests on 32-bit
  Fixes simplexml test
  Fixes posix tests
  Fixes iconv tests
  Marked tests as 32-bit
  Fixed more 32-bit tests
  Fixed some 32-bit tests
  Mark said ext/date tests as 32-bit only
  Fixed ext/date tests broken by zpp error on overflow
  Fixed broken tests
  Make zpp fail if NaN passed for int, or out-of-range float for non-capping int

Conflicts:
	ext/date/tests/getdate_variation7.phpt
	ext/date/tests/localtime_variation3.phpt
2014-12-13 18:38:15 +00:00
Julien Pauli
446eed10ee Merge branch 'PHP-5.6'
* PHP-5.6:
  Updated NEWS
  Updated NEWS
  Fix bug #68532: convert.base64-encode omits padding bytes
2014-12-12 16:51:50 +01:00
Julien Pauli
a0d848f795 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Updated NEWS
  Fix bug #68532: convert.base64-encode omits padding bytes
2014-12-12 16:50:42 +01:00
mcq8
86f1875536 Fix bug #68532: convert.base64-encode omits padding bytes 2014-12-12 16:42:38 +01:00
Anatol Belski
dfb18b1188 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  updated NEWS
  PowerPC64 support for add and sub with overflow check
  PowerPC64 support for operators with overflow check
  Fixed bug #68583 Crash in timeout thread
  Reduced size of zend_op on 64-bit systems.
  Make ZEND_INIT_FCALL keep predcalculted size of necessary stack space in opline->op1.num to avoid its recalculation on each execution.
  Removed unused variables
  Improved array_merge() and array_replace() (1-st array may be added using simple procedure).
  Replaced zendi_convert_to_long() with _zval_get_long_func()
  Moved zend_is_true() from zend_execute.h/zend_execute_API.c into zend_operators.h/zend_operators.c. Splited the most expensive part of inline i_zend_is_true() into a separate zend_object_is_true(). Replaced zendi_convert_to_long() with cals to zend_is_true().
  Revert "Save one xor instr"
  Save one xor instr

Conflicts:
	Zend/zend_execute_API.c
2014-12-12 14:25:59 +01:00
Anatol Belski
0323f66fa2 move the test to the right place 2014-12-11 10:39:47 -08:00
Anatol Belski
13f1c276ab Fixed bug #68545 NULL pointer dereference in unserialize.c 2014-12-11 10:39:37 -08:00
Dmitry Stogov
381438e5df Improved array_merge() and array_replace() (1-st array may be added using simple procedure). 2014-12-11 19:18:31 +03:00
Dmitry Stogov
e087d3ac7f Merge branch 'master' into native-tls
* master: (23 commits)
  move the test to the right place
  fix TS build and C89 compat
  updated NEWS
  Fixed bug #68545 NULL pointer dereference in unserialize.c
  Updated NEWS
  Updated NEWS
  Updated NEWS
  NEWS
  Fix bug #68526 Implement POSIX Access Control List for UDS
  Improved basic zval copying primitives: ZVAL_COPY_VALUE(), ZVAL_COPY(), ZVAL_DUP()
  Wrap RETURN_VALUE_USED() with EXPECTED() or UNEXPECTED() macros according to more frequent usage patterns.
  Improved ASSIGN_<OP>, ASSIGN_DIM and UNSET_DIM
  drop dead/unused code
  simplified code
  Move ZVAL_DEREF() and make_real_object() into slow paths.
  Pass znode_op structure by value (it fits into one word) instead of pointer to structure.
  Move checks for references into slow paths.
  Improved ASSIGN_DIM and ASSIGN_OBJ
  Fixed typo
  Move checks for references into slow paths of handlers or helpers. Remove duplicate opcode handlers.
  ...
2014-12-10 23:24:11 +03:00
Anatol Belski
92a9477cc3 Merge branch 'PHP-5.6'
* PHP-5.6:
  move the test to the right place
2014-12-10 13:23:15 +01:00
Anatol Belski
21da246807 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  move the test to the right place
2014-12-10 13:22:52 +01:00
Anatol Belski
c5f7dcd1dc move the test to the right place 2014-12-10 13:19:51 +01:00
Anatol Belski
aeb30576f6 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fixed bug #68545 NULL pointer dereference in unserialize.c
  Updated NEWS
  Updated NEWS

Conflicts:
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
2014-12-10 11:54:31 +01:00
Anatol Belski
4a82cdce66 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #68545 NULL pointer dereference in unserialize.c

Conflicts:
	ext/standard/var_unserializer.c
2014-12-10 11:47:34 +01:00
Anatol Belski
20d93534d5 Fixed bug #68545 NULL pointer dereference in unserialize.c 2014-12-10 11:43:33 +01:00
Anatol Belski
ba35b22bc4 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (35 commits)
  Fixed bug #68398 msooxml matches too many archives
  Fix zpp call in apache_getenv()
  Drop unnecessary zval containers
  fixed test
  C89 compat
  add include for missing localeconv_r proto
  updated NEWS
  Fixed bug #65230 setting locale randomly broken
  Fix compilation error (ref #68424)
  Removed useless handlers
  Move checks for references into slow paths of operator functions. Remove duplicate opcode handlers.
  Revert unintentional docblock change
  Restored zip/oci8 PHP 4 code, add PHP 7 checks
  Note macro removal in UPGRADING.INTERNALS
  Removed ZEND_ENGINE_2 checks (and ZE1 code, it's been a decade!)
  Zend Engine 3
  Updated NEWS
  Updated NEWS
  Updated NEWS
  Start adding new attribute to control multi statements
  ...
2014-12-06 21:37:15 +01:00
Nikita Popov
204e3f8d5a Drop unnecessary zval containers 2014-12-06 12:38:56 +01:00
Anatol Belski
51bae8805d Merge branch 'PHP-5.6'
* PHP-5.6:
  fixed test
2014-12-06 12:32:16 +01:00
Anatol Belski
0854fd8b81 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fixed test
2014-12-06 12:31:55 +01:00
Anatol Belski
5d126245a3 fixed test 2014-12-06 12:31:27 +01:00
Anatol Belski
42d7cb4c2c Merge branch 'PHP-5.6'
* PHP-5.6:
  C89 compat
  add include for missing localeconv_r proto
2014-12-06 12:18:36 +01:00
Anatol Belski
08241ee3f3 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  C89 compat
  add include for missing localeconv_r proto
2014-12-06 12:18:05 +01:00
Anatol Belski
373aa7c81f add include for missing localeconv_r proto 2014-12-06 12:09:35 +01:00
Anatol Belski
3d68d843cb Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fixed bug #65230 setting locale randomly broken
2014-12-06 12:01:09 +01:00
Anatol Belski
ebaf130a15 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #65230 setting locale randomly broken
2014-12-06 12:00:17 +01:00
Anatol Belski
1b4d5ad46a Fixed bug #65230 setting locale randomly broken 2014-12-06 11:59:43 +01:00
Anatol Belski
653bba5e60 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fixed bug #65769 localeconv() broken in TS builds
2014-12-05 11:09:27 +01:00
Anatol Belski
0e09e5e6fa Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #65769 localeconv() broken in TS builds
2014-12-05 11:08:55 +01:00
Anatol Belski
7943f944c2 Fixed bug #65769 localeconv() broken in TS builds 2014-12-05 11:06:06 +01:00
Anatol Belski
6cf5ac7567 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix dir separators in test
2014-12-05 07:08:35 +01:00
Anatol Belski
c65143d571 fix dir separators in test 2014-12-05 07:07:58 +01:00
Anatol Belski
88bb9fedc4 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (111 commits)
  Fix zend_fcall_info_arg*() to use ZVAL_COPY
  Fixed #65213 - cannot cast SplFileInfo to boolean
  add initial install
  switch to C travis project instead of PHP
  use the generic TRAVIS environment var to check for travis (see http://docs.travis-ci.com/user/ci-environment/)
  fix TS build
  add config option to target codegen architectures
  updated NEWS
  updated NEWS
  Fixed bug #55541 errors spawn MessageBox, which blocks test automation
  Get rid of duplicate handlers (ZEND_ADD_SPEC_TMP_TMP and ZEND_ADD_SPEC_VAR_VAR are absolutely the same).
  Use zend_string* for op_array->arg_info[]->name and op_array->arg_info[]->class_name. For internal functions we still use char*.
  Fixed __debugInfo() support
  Update UPGRADING for the new variadic functions, and re-sort.
  Improved POST INC/DEC
  make sure that we don't truncate the stack trace and cause false test failures when the test is executed in a directory with long path
  Missed closed folder mark
  Revert "Unecessary assignment"
  Fixed improper memory release
  Unecessary assignment
  ...
2014-12-05 03:50:02 +01:00
Remi Collet
8199278ffb Merge branch 'PHP-5.6'
* PHP-5.6:
  NEWS
  Fix Bug #68536 Pack for 64bits integer is broken on bigendian.
2014-12-02 08:41:35 +01:00
Remi Collet
6f3714a8fc Fix Bug #68536 Pack for 64bits integer is broken on bigendian.
Covered by ext/standard/tests/strings/pack64.phpt
2014-12-02 08:38:39 +01:00
Remi Collet
9aabfeb6c4 fix string is optional, set default length, thanks laruence 2014-12-02 07:41:35 +01:00
Remi Collet
67fc5d6bbb Fix type of string length in zpp call
Fix 23 failed tests (detected on bigendian)
2014-12-02 07:06:10 +01:00
Tjerk Meesters
7ccd7b5975 Added more useful warning messages 2014-11-30 22:42:31 -08:00
Tjerk Meesters
0109eb07cf Changed based on comments and make its behaviour equal to the Windows version 2014-11-30 22:42:31 -08:00
Tjerk Meesters
f2b7aeda2b Fix #53092 - dns_get_record does not return false on dns server failure 2014-11-30 22:42:31 -08:00
Tjerk Meesters
bfe7c6988f Added more useful warning messages 2014-11-30 22:42:13 -08:00
Tjerk Meesters
904dca6392 Changed based on comments and make its behaviour equal to the Windows version 2014-11-30 22:42:13 -08:00
Tjerk Meesters
d037785165 Fix #53092 - dns_get_record does not return false on dns server failure 2014-11-30 22:42:13 -08:00
Tjerk Meesters
85e2e6c1fd Added more useful warning messages 2014-11-30 22:39:25 -08:00
Tjerk Meesters
977d84490b Changed based on comments and make its behaviour equal to the Windows version 2014-11-30 22:39:18 -08:00
Tjerk Meesters
7b44790db5 Fix #53092 - dns_get_record does not return false on dns server failure 2014-11-30 22:39:09 -08:00
Stanislav Malyshev
bfc8d297be Merge branch 'PHP-5.6'
* PHP-5.6:
  update news
  update news
  update NEWS
  Apply error-code-salt fix to Windows too
  Bug fixes in light of failing bcrypt tests
  Add tests from 1.3. Add missing tests.
  Upgrade crypt_blowfish to version 1.3
  Apply error-code-salt fix to Windows too
  Bug fixes in light of failing bcrypt tests
  Add tests from 1.3. Add missing tests.
  Upgrade crypt_blowfish to version 1.3

Conflicts:
	ext/standard/crypt.c
2014-11-30 21:47:40 -08:00
Stanislav Malyshev
720ba67948 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  update news
  update news
  update NEWS
  Apply error-code-salt fix to Windows too
  Bug fixes in light of failing bcrypt tests
  Add tests from 1.3. Add missing tests.
  Upgrade crypt_blowfish to version 1.3
  Apply error-code-salt fix to Windows too
  Bug fixes in light of failing bcrypt tests
  Add tests from 1.3. Add missing tests.
  Upgrade crypt_blowfish to version 1.3
2014-11-30 21:39:49 -08:00
Stanislav Malyshev
84be568366 update news 2014-11-30 21:37:39 -08:00
Stanislav Malyshev
abf5b9481b Merge branch 'pull-request/868' into PHP-5.5
* pull-request/868:
  Apply error-code-salt fix to Windows too
  Bug fixes in light of failing bcrypt tests
  Add tests from 1.3. Add missing tests.
  Upgrade crypt_blowfish to version 1.3
2014-11-30 21:09:41 -08:00
Leigh
7e870c596d Bug fixes in light of failing bcrypt tests
Conflicts:
	ext/standard/crypt.c
2014-11-30 21:06:39 -08:00
Leigh
2d9d10fbbf Add tests from 1.3. Add missing tests.
3 of the missing tests fail. // TODO
2014-11-30 21:05:40 -08:00
Leigh
29f51e1ca9 Upgrade crypt_blowfish to version 1.3 2014-11-30 21:05:32 -08:00
Stanislav Malyshev
b564e7b0de Merge branch 'PHP-5.6'
* PHP-5.6:
  Update NEWS
  fix typo
  Added test and review suggestion
  Fix bug #68335: rmdir doesnt work with file:// stream wrapper
2014-11-30 17:35:11 -08:00
Stanislav Malyshev
60d5b2ec24 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Added test and review suggestion
  Fix bug #68335: rmdir doesnt work with file:// stream wrapper
2014-11-30 17:07:02 -08:00
mcq8
04808aa7e1 Added test and review suggestion 2014-11-30 16:38:20 -08:00
Andrea Faulds
f90b877f41 Refactor ZEND_LONG_MAX/MIN checks into ZEND_DOUBLE_FITS_LONG() 2014-11-29 02:13:20 +00:00
Andrea Faulds
01554bf3e4 Merge branch 'master' into zppFailOnOverflow 2014-11-29 01:45:54 +00:00
Andrea Faulds
65c8edd525 Fix more 32-bit tests 2014-11-29 01:26:34 +00:00
Andrea Faulds
ebaa42302a Skip buncha tests on 32-bit 2014-11-29 01:05:19 +00:00
Anatol Belski
e7a6c15b93 Fixed bug #68225 unpack and X format code
This is done by reverting some parts to the state of pre 7, whereby
that means all the size_t potential isn't exhausted. This might be
a subject of the subsequent fix, the functionality can be ensured
with the supplied test.
2014-11-28 10:22:03 +01:00
Anatol Belski
3ca0ca1548 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (102 commits)
  fix dir separator in test
  fix TS build
  fix TS build
  Better fix for bug #68446
  Revert "Merge remote-tracking branch 'origin/PHP-5.6'"
  Revert NEWS and set test to XFAIL
  Revert "Fix bug #68446 (bug with constant defaults and type hints)"
  Improved zend_hash_clean() and added new optimized zend_symtable_clean()
  Use inline version of zval_ptr_dtor()
  Added new optimized zend_array_destroy() function
  Moved i_zval_ptr_dtor() from zend_execute.h to zend_variables.h
  fix REGISTER_NS_*_CONSTANT macros
  Removed useless assert. EG(uninitialized_zval) can't be refcounted.
  Use specialized destructors when types of zvals are known.
  move tests into proper place
  Improved assignment to object property
  Reuse zend_assign_to_variable() in zend_std_write_property()
  cleanup comments from svn/cvs era
  fix dir separator in test
  fork test for windows
  ...
2014-11-26 08:17:35 +01:00
Stanislav Malyshev
f782d6710d Merge branch 'PHP-5.6'
* PHP-5.6:
  test to function addcslashes
  test
  Test PHP Init Fail Without Params
  Add my information to this test
  Add a test for the exception cases of readline_read_history
  added some tests to datetime and dateinterval functions
  added various tests for XSLTProcessor and one test for iconv extension
  teste basico da funcao timezone_version_get
2014-11-23 17:26:35 -08:00
marcosptf
49a133dd0b test to function addcslashes
test to function bin2hex
2014-11-23 17:19:56 -08:00
Alexander Lisachenko
a5aae1b66c Fix incorrect argument reflection info for array_multisort() 2014-11-23 16:38:30 -08:00
Stanislav Malyshev
3f263c44f4 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix incorrect argument reflection info for array_multisort()
2014-11-23 16:32:57 -08:00
Alexander Lisachenko
a023e032b9 Fix incorrect argument reflection info for array_multisort() 2014-11-23 16:29:15 -08:00
Veres Lajos
06fdf359e3 typo fixes - https://github.com/vlajos/misspell_fixer 2014-11-23 14:52:47 -08:00
Veres Lajos
4dc994571d typo fixes - https://github.com/vlajos/misspell_fixer
Conflicts:
	ext/ftp/ftp.h
	ext/pcre/pcrelib/pcre_printint.c
	ext/pcre/pcrelib/sljit/sljitLir.c
	ext/pcre/pcrelib/sljit/sljitLir.h
	ext/pcre/pcrelib/sljit/sljitNativeARM_32.c
	ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c
	ext/pgsql/pgsql.c
	ext/phar/func_interceptors.c
	ext/soap/soap.c
	ext/standard/image.c
2014-11-23 14:33:43 -08:00
Stanislav Malyshev
9d7c5dbed9 secured unserialize
- update for BC-compatible unserialize
- add tests
2014-11-22 22:25:18 -08:00
Anatol Belski
bcd9c6b256 Merge branch 'PHP-5.6'
* PHP-5.6:
  added test for things done so far for bug #66265
  partially fixed bug #66265
  forked bug67052.phpt for Windows
2014-11-21 10:25:18 +01:00
Anatol Belski
0581e877a5 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  added test for things done so far for bug #66265
  partially fixed bug #66265
  forked bug67052.phpt for Windows
2014-11-21 10:24:53 +01:00
Anatol Belski
56fac96bec partially fixed bug #66265
NTS mode should additionally use _putenv to satisfy libs like gettext
relying on _getenv. As _putenv isn't thread safe, it wouldn't bring
much for the TS mode as it would change locale across all the threads
and require locking to avoid random fails with concurrent _getenv
calls.
2014-11-21 09:57:12 +01:00
Anatol Belski
4f3ac2cdbe Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (36 commits)
  NEWS
  adapt test for error message introduce in fix for #68463
  Fix bug #68463 listen.allowed_clients can silently result in no allowed access
  run a few request in this test
  fix test
  fix test
  added info about some other macro changes
  added note about toolset and phpize
  added note about the response files
  split msgfmt_format_intlcalendar_variant*.phpt for ICU 54.1
  split formatter_format*.phpt for ICP 54.1
  split dateformat_timezone_arg_variations*.phpt for ICU 54.1
  split dateformat_get_set_timezone_variant*.phpt for ICU 54.1
  fix icu version to test
  split ext/intl/tests/dateformat_get_set_calendar_variant*.phpt for 54.1
  split dateformat_formatObject_datetime_variant*.phpt for ICU 54.1
  split dateformat_formatObject_calendar_variant*.phpt for ICU 54.1
  split dateformat_create_cal_arg_variant2.phpt for ICU 53.1 and 54.1
  clone dateformat_calendars_variant3.phpt for ICU 54.1
  split collator_get_sort_key_variant3.phpt for icu 54.1
  ...
2014-11-20 15:20:18 +01:00
Anatol Belski
00c856250f fix test 2014-11-20 14:35:04 +01:00
Veres Lajos
4b9535341a typo fixes - https://github.com/vlajos/misspell_fixer 2014-11-19 20:23:00 +00:00
Anatol Belski
c6bad96f30 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (398 commits)
  NEWS
  add test for bug #68381
  Fixed bug #68381 Set FPM log level earlier during init
  proper dllexport
  move to size_t where zend_string is used internally
  fix some datatype mismatches
  return after the warning, to fix uninitialized salt usage
  fix datatype mismatches
  add missing type specifier
  fix datatype mismatches
  fix unsigned check
  "extern" shouldn't be used for definitions
  joined identical conditional blocks
  simplify fpm tests
  SEND_VAR_NO_REF optimization
  Add test for bug #68442
  Add various tests for FPM - covering recent bugs (68420, 68421, 68423, 68428) - for UDS - for ping and status URI - for multi pool and multi mode
  Include small MIT FastCGI client library from https://github.com/adoy/PHP-FastCGI-Client
  Get rid of zend_free_op structure (use zval* instead). Get rid of useless TSRMLS arguments.
  Add new FPM test for IPv4/IPv6
  ...

Conflicts:
	win32/build/config.w32
2014-11-18 21:18:52 +01:00
Anatol Belski
5400f92c75 proper dllexport 2014-11-18 15:38:35 +01:00
Anatol Belski
376a366f0c move to size_t where zend_string is used internally 2014-11-18 13:19:53 +01:00
Anatol Belski
f8f86a44ef return after the warning, to fix uninitialized salt usage 2014-11-18 13:19:52 +01:00
Anatol Belski
82c2e3f201 fix build
ifdef this var declaration to avoid the vs warning
2014-11-14 22:19:41 +01:00
Anatol Belski
a85ce501da partial cleanup to work with size_t str length in password_hash
php_crypt() and co use int, though this is fair enough. Could
be refactored later for tidiness reasons.
2014-11-14 17:39:41 +01:00
Anatol Belski
dbddbcc950 remove unused var 2014-11-14 17:39:40 +01:00
Stanislav Malyshev
32fd4590a5 fix loop - size_t is unsigned so can not be negative 2014-11-11 16:34:50 -08:00
Stanislav Malyshev
1b143f4033 fix loop - size_t is unsigned so can not be negative 2014-11-11 16:33:02 -08:00
Stanislav Malyshev
4571cc2195 fix copypaste error 2014-11-11 16:33:02 -08:00
Andrea Faulds
5b52fb5f9f Marked tests as 32-bit 2014-11-09 20:03:13 +00:00
Andrea Faulds
26bb809c21 Fixed more 32-bit tests 2014-11-09 19:36:07 +00:00
Andrea Faulds
b70779304c Fixed some 32-bit tests 2014-11-09 01:53:52 +00:00
Andrea Faulds
d22f3b18ea Merge branch 'master' into zppFailOnOverflow 2014-11-08 18:28:43 +00:00
Anatol Belski
b9f1daa976 basic clang compatibility on windows 2014-11-07 10:17:59 +01:00
Bob Weinand
90b4ec51ad Fix bad merge 2014-11-04 18:23:20 +01:00
Bob Weinand
ad8ee74225 Merge remote-tracking branch 'origin/PHP-5.6'
Conflicts:
	ext/standard/file.c
2014-11-04 17:16:49 +01:00
Bob Weinand
342d56b23d arg1-3 are not variable names to use; removed useless buffer variable 2014-11-04 16:59:32 +01:00
Andrea Faulds
71566b994f Merge branch 'master' into zppFailOnOverflow 2014-11-01 22:49:53 +00:00
Anatol Belski
d77ce31763 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix output globals importing
  export output globals
  use portable strndup implementation
  unix sockets aren't available on windows
  dll export APIs needed by phpdbg
  fix sapi/phpdbg/config.w32
  Don't treat warnings as failures in the junit output
2014-10-29 20:04:56 +01:00
Anatol Belski
fdbfcc0b51 dll export APIs needed by phpdbg 2014-10-29 19:32:52 +01:00
Matteo Beccati
551cb82a59 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed test to work with recent libcurl versions
  PHP 5.5.20 now
2014-10-29 11:32:57 +01:00
Matteo Beccati
eb4e4b7bca Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed test to work with recent libcurl versions
  PHP 5.5.20 now

Conflicts:
	configure.in
	main/php_version.h
2014-10-29 11:32:12 +01:00
Matteo Beccati
daf9357d27 Fixed test to work with recent libcurl versions 2014-10-29 11:28:27 +01:00
Anatol Belski
e7945419dd fix datatype mismatches 2014-10-28 17:24:56 +01:00
Anatol Belski
11b119d526 fix datatype mismatches 2014-10-27 16:38:47 +01:00
Anatol Belski
4262663e4c Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  refix the broken place
2014-10-25 02:17:41 +02:00
Anatol Belski
0a5b7d1316 refix the broken place
typecast from signed to unsigned of a bigger size
2014-10-25 02:13:44 +02:00
Anatol Belski
173659d341 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  fix infinite loop
2014-10-25 00:33:58 +02:00
Anatol Belski
010f4b7979 fix infinite loop 2014-10-25 00:32:45 +02:00
Anatol Belski
c51a42076c Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (214 commits)
  fix datatype mismatch warnings
  fix datatype mismatches
  fix datatype mismatches
  fix datatype mismatches
  fix datatype mismatch warnings
  fix datatype mismatch warnings
  fix datatype mismatch warnings
  fix datatype mismatch warning
  fix datatype mismatches
  fix datatype mismatch warnings
  Re-add phpdbg to travis
  Added some NEWS
  Make xml valid (missing space between attrs)
  Fix info classes file name in xml
  Add note about <eval> tag for errors in xml.md
  Name the tag <eval> if the error id during ev cmd
  Do not print out xml as PHP print...
  Fix output to wrong function
  Fixed parameter order on %.*s
  Too much copypaste...
  ...
2014-10-24 22:28:32 +02:00
Anatol Belski
2af99b1866 fix datatype mismatch warnings 2014-10-24 20:50:03 +02:00
Anatol Belski
9ccc3a0c3c fix datatype mismatch warning 2014-10-24 20:50:02 +02:00
Anatol Belski
ff02a1416e fix datatype mismatches 2014-10-24 20:50:01 +02:00
Anatol Belski
4cb58a3936 fix datatype mismatch warnings 2014-10-24 20:50:00 +02:00
Anatol Belski
53560ca06b rework the previous fix for var names with size_t, no ugly casts anymore 2014-10-23 16:50:35 +02:00
Anatol Belski
4fa92438f4 fix datatype mismatches 2014-10-23 16:38:25 +02:00
Anatol Belski
5b9f3a24d6 fix datatype mismatch 2014-10-23 16:31:19 +02:00
Anatol Belski
99e236e3cc fix datatype mismatches 2014-10-23 16:29:02 +02:00
Anatol Belski
744c19eed8 fix datatype mismatches 2014-10-23 16:22:20 +02:00
Anatol Belski
df6aff48a6 fix pack64.phpt related fail on win64 2014-10-23 15:47:47 +02:00
Anatol Belski
f375b530bb fix datatype mismatches 2014-10-23 15:47:46 +02:00
Anatol Belski
4f9bb66e99 fix datatype mismatch 2014-10-23 15:47:45 +02:00
Anatol Belski
29b43af072 exhaust zend_long/size_t potential in levenstein 2014-10-23 15:47:44 +02:00
Anatol Belski
88ca46d92b fix datatype mismatches 2014-10-23 11:45:44 +02:00
Anatol Belski
f010efc924 fix datatype mismatches 2014-10-23 11:36:34 +02:00
Anatol Belski
91652cf3c7 fix datatype mismatches 2014-10-23 11:05:47 +02:00
Anatol Belski
451065a434 fix datatype mismatches 2014-10-23 10:30:05 +02:00
Anatol Belski
0413a6e7a3 fix datatype mismatches 2014-10-23 10:30:04 +02:00
Anatol Belski
c448023bd0 fix datatype mismatches 2014-10-23 10:30:03 +02:00
Anatol Belski
a61f6ab737 fix datatype mismatches 2014-10-23 10:30:02 +02:00
Anatol Belski
50cc4abbf7 fix datatype mismatch 2014-10-23 10:30:00 +02:00
Anatol Belski
303973f076 fix datatype mismatches 2014-10-23 10:29:59 +02:00
Anatol Belski
ddaae1a02c fix datatype mismatch 2014-10-23 10:29:58 +02:00
Anatol Belski
e91b669e23 catch up with the latest key length change 2014-10-23 10:29:55 +02:00
Anatol Belski
958c6d1c5d fix datatype mismatch warning 2014-10-22 20:46:35 +02:00
Anatol Belski
afb65adefa fix datatype mismatches 2014-10-22 20:46:34 +02:00
Anatol Belski
0565a29e4d fix datatype mismatches 2014-10-22 20:46:33 +02:00
Anatol Belski
58b8227240 fix assert, zero diff would be valid, too 2014-10-22 20:46:32 +02:00
Anatol Belski
5b4b0f8368 fix datatype mismatch warning 2014-10-22 20:46:31 +02:00
Anatol Belski
1a727e519b fix datatype mismatch warnings 2014-10-22 20:46:30 +02:00
Anatol Belski
b80853d942 fix datatype mismatches 2014-10-22 20:46:29 +02:00
Anatol Belski
a5e4f1f598 fix several datatype mismatches 2014-10-22 17:56:30 +02:00
Anatol Belski
cccd538512 fix dir separator in test 2014-10-22 17:56:29 +02:00
Anatol Belski
f58edcd996 fix datatype warnings 2014-10-22 17:56:28 +02:00
Anatol Belski
09a01a834e this should be uint32 2014-10-22 17:56:26 +02:00
Anatol Belski
36ce467402 fix datatype mismatches 2014-10-22 17:56:25 +02:00
Anatol Belski
1ea5982d07 fixing datatype mismatches 2014-10-22 17:56:23 +02:00
Anatol Belski
80163b4a2b fix datatype mismatch warnings 2014-10-22 17:56:21 +02:00
Anatol Belski
2a7f9dcf5b fix datatype mismatch and warning 2014-10-22 17:56:20 +02:00
Anatol Belski
944d2c65e1 fix datatype mismatches 2014-10-22 17:56:19 +02:00
Anatol Belski
f37b4cdb8f use zend_bool where zend_long isn't needed
spare at least 24 bytes per globals item on 64 bit
2014-10-22 17:56:18 +02:00
Xinchen Hui
f03100cb80 Better convert 2014-10-22 17:25:41 +08:00
Xinchen Hui
baddb1c73a Extra comma 2014-10-21 11:02:15 +08:00
Anatol Belski
83b8e281db Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  Don't make difference between undefined and unaccessible properies when call __get() and family
  Don't make useless CSE
  array_pop/array_shift optimization
2014-10-17 13:58:47 +02:00
Dmitry Stogov
35dc0a2e30 array_pop/array_shift optimization 2014-10-17 12:30:27 +04:00
Anatol Belski
2942a4aa45 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  check for zlib headers as well as lib for mysqlnd
  a realpath cache key can be int or float, catching this
  TLS 1.0, 1.1 and 1.2 Curl constants - bug #68247
  Micro optimizations for isset/empty
  Micro optimization for zend_hash_next_index_insert_new()
  Fix array_keys() on $GLOBALS
  Fix procedural finfo calls in methods

Conflicts:
	ext/mysqlnd/config.w32
2014-10-17 10:13:08 +02:00
Anatol Belski
35d703d00a a realpath cache key can be int or float, catching this 2014-10-17 10:09:39 +02:00
Nikita Popov
fc6ce7d1c1 Fix array_keys() on $GLOBALS 2014-10-16 14:44:35 +02:00
Anatol Belski
d6d856b6db Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  Fixed ext/standard/tests/strings/pack64_32.phpt failure (In PHP7, we must not free array of arguments recieved using "+")
2014-10-15 12:09:14 +02:00
Dmitry Stogov
52b93004d0 Fixed ext/standard/tests/strings/pack64_32.phpt failure (In PHP7, we must not free array of arguments recieved using "+") 2014-10-15 12:38:04 +04:00
Anatol Belski
c00424e427 bring back all the TSRMLS_FETCH() stuff
for better comparability with the mainstream
2014-10-15 09:37:55 +02:00
Anatol Belski
382f95e612 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (25 commits)
  Fix return code (merges are hard :( )
  fix bad merge
  Fix bug #68113 (Heap corruption in exif_thumbnail())
  Fix bug #68089 - do not accept options with embedded \0
  Fixed bug #68044: Integer overflow in unserialize() (32-bits only)
  Fix bug #68027 - fix date parsing in XMLRPC lib
  Fix bug #68113 (Heap corruption in exif_thumbnail())
  Fix bug #68089 - do not accept options with embedded \0
  Fixed bug #68044: Integer overflow in unserialize() (32-bits only)
  Fix bug #68027 - fix date parsing in XMLRPC lib
  Fix bug #68113 (Heap corruption in exif_thumbnail())
  Fix bug #68089 - do not accept options with embedded \0
  Fixed bug #68044: Integer overflow in unserialize() (32-bits only)
  Fix bug #68027 - fix date parsing in XMLRPC lib
  Fixed bug #68128
  Added API function to retrive current custom heap handlers
  update NEWS and UPGRADING
  Allow to substitute storage layer in memory manager.
  Upated NEWS
  Address issues raised by @nikic
  ...
2014-10-15 08:32:54 +02:00
Stanislav Malyshev
3eb679b952 Fixed bug #68044: Integer overflow in unserialize() (32-bits only) 2014-10-14 10:51:24 -07:00
Stanislav Malyshev
88eb7ea47d Fixed bug #68044: Integer overflow in unserialize() (32-bits only) 2014-10-14 10:44:57 -07:00
Stanislav Malyshev
9aa9014523 Fixed bug #68044: Integer overflow in unserialize() (32-bits only) 2014-10-14 10:43:13 -07:00
Stanislav Malyshev
56754a7f9e Fixed bug #68044: Integer overflow in unserialize() (32-bits only) 2014-10-13 23:14:25 -07:00
Anatol Belski
e1cd0e0a38 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (40 commits)
  int to size_t where the underlaying API supports it
  use php_socket_t instead of int
  fix signed/unsigned mismatch warning
  fix compilation warning
  Improved specialisation $this variable accessed through IS_UNUSED operand must be IS_OBJECT, so we don't have to check for its type or perform dereference.
  Add notes about get_class_entry/get_class_name to UPGRADING
  Fix casts in GD
  Drop redundant casting code from ext/filter
  update NEWS
  update NEWS
  update NEWS
  update NEWS
  Added note to UPGRADING regarding 64-bit support in pack()/unpack()
  pack(): Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG
  Add 64 bit formats to pack() and unpack()
  Help to CPU branch predictor
  Removed unused EG(orig_error_reporting)
  Update get_class_name semantics
  Remove Z_OBJ_CLASS_NAME_P
  Improved VM stack primitives for fast paths. Slow paths are not inlined anymore.
  ...
2014-10-10 22:51:13 +02:00
Anatol Belski
6445c4bd48 use php_socket_t instead of int 2014-10-10 19:00:19 +02:00
Tjerk Meesters
2a765d313e pack(): Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG 2014-10-10 07:20:10 +08:00
Tjerk Meesters
284358b317 Merge branch 'PHP-5.6'
* PHP-5.6:
  Add 64 bit formats to pack() and unpack()
2014-10-10 07:05:36 +08:00
Leigh
63fd969300 Add 64 bit formats to pack() and unpack() 2014-10-09 21:02:42 +01:00
Nikita Popov
df79b9b27a Update get_class_name semantics
* get_class_name is now only used for displaying the class name
   in debugging functions like var_dump, print_r, etc. It is no
   longer used in get_class() etc.
 * As it is no longer used in get_parent_class() the parent
   argument is now gone. This also fixes incorrect parent classes
   being reported in COM.
 * get_class_name is now always required (previously some places
   made it optional and some required it) and is also required
   to return a non-NULL value.
 * Remove zend_get_object_classname. This also fixes a number of
   potential leaks due to incorrect usage of this function.
2014-10-09 20:48:27 +02:00
Nikita Popov
e5e9d8346f Remove zend_get_class_entry function 2014-10-09 14:17:30 +02:00
Nikita Popov
ee5b30fa19 Remove support for classes without class entries
get_class_entry must be non-NULL and return non-NULL.
2014-10-09 13:58:14 +02:00
Nikita Popov
a3b880364f Directly use zend_string for php_implode/php_explode
Also drop some unnecessary zval separations and copies
2014-10-09 12:05:56 +02:00
Tjerk Meesters
78156520ae Merge branch 'PHP-5.6'
* PHP-5.6:
  Updated NEWS for #68129
  Updated NEWS for #68129
  Fixed bug #68129
2014-10-09 08:24:58 +08:00
Tjerk Meesters
f92c9b3ced Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Updated NEWS for #68129
  Fixed bug #68129
2014-10-09 08:24:05 +08:00
Tjerk Meesters
d0e51f5ce9 Fixed bug #68129
Empty usernames and passwords are now treated differently from no username or password

For example, empty password:

    ftp://user:@example.org

Empty username:

    ftp://:password@example.org

Empty username and empty password

    ftp://:@example.org
2014-10-09 08:21:30 +08:00
Leigh
f66013df94 Apply error-code-salt fix to Windows too 2014-10-07 13:12:38 +01:00
Leigh
4e8c876120 Bug fixes in light of failing bcrypt tests 2014-10-07 12:27:57 +01:00
Leigh
a0420a72af Add tests from 1.3. Add missing tests.
3 of the missing tests fail. // TODO
2014-10-07 11:50:36 +01:00
Leigh
e331f9af73 Upgrade crypt_blowfish to version 1.3 2014-10-07 11:23:24 +01:00
Anatol Belski
b946348969 enable static tsrm ls cache in ext/standard 2014-10-05 19:49:41 +02:00
Anatol Belski
11cf279196 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  Fix test gc_029_zts.phpt
  Fixed a bug that causes crash when environment variable is access while parsing php.ini
  fix asinh delivering -0 when the arg is 0
  Mark test for full GC root buffer as XFAIL
  Fix two date tests
  Mark three foreach tests as XFAIL
  reveal some newer libcurl features in MINFO
  Fix bug number
  Fix bug #68188
  Fix bug #68133 and bug #68135
2014-10-04 11:14:01 +02:00
Anatol Belski
e9b2340151 fix asinh delivering -0 when the arg is 0 2014-10-03 22:18:21 +02:00
Anatol Belski
ee4ae7fbc3 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  remove the remains of dsp files handling
  fix EX usage
  remove misprint parentheses
  remove misprint parentheses
  Replaced EG(This) and EX(object) with EX(This). Internal functions now recieves zend_execute_data as the first argument.
  And this one...
  It should be in extern c
  Remove useless condition
  NEWS entry for previous commit
  NEWS entry for previous commit
  add IPv6 support to php-fpm
  Micro optimization for the most frequency case
  Add hash to EXTENSIONS file
  Remove extensions which are long gone
  we also have xz release tarballs since 5.5
  Fix ZTS build
  improved file size computation in stat()
  Fixed incorrect compilation
  5.5.19 now
2014-10-03 20:30:49 +02:00
Dmitry Stogov
bd9a234645 Replaced EG(This) and EX(object) with EX(This).
Internal functions now recieves zend_execute_data as the first argument.
2014-10-03 19:32:46 +04:00
Anatol Belski
f5292fbe51 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  Expose zend_throw_exception_internal()
  Use inline finction for OBJ_RELEASE() macro
  update NEWS about the release date of 5.6.1
  only no_NO.ISO-8859-1 have to be ignored
  remove bogus locale use from test
  use $PHP_LIBDIR instread of "lib" in skel example
  Removed zend_execute_data->prev_nested_call. Reuse prev_execute_data instead.
2014-10-01 22:05:51 +02:00
Remi Collet
26a5627cc6 only no_NO.ISO-8859-1 have to be ignored (merged) 2014-10-01 10:15:13 +02:00
Remi Collet
3e6f176733 only no_NO.ISO-8859-1 have to be ignored 2014-10-01 10:14:14 +02:00
krakjoe
7cbd8f8b8a remove bogus locale use from test 2014-10-01 10:12:06 +02:00
Anatol Belski
d624b0d5eb Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (26 commits)
  Micro optimization
  Drop unused INIT_STRING opcode
  Drop unused RAISE_ABSTRACT_ERROR opcode
  CT substitute unqualified true/false/null in namespaces
  Fix a couple compile warnings
  fix test filename
  one more test to illustrate transfer of an arbitrary data amount throug pipes
  fix tests on linux
  better test cleanup
  Use more readable inline functions
  increase the polling period to not to break existing behaviours
  updated NEWS
  Fixed bug #51800 proc_open on Windows hangs forever
  Fixed segfault
  Set an LDAP error code when failing ldap_bind due to null bytes
  Fix segmentation fault in debug_backtrace()
  Drop support for GMP 4.1
  Make gmp_setbit and gmp_clrbit return values consistent
  removed *.dsw and *.dsp files
  Opcache compatibility for coalesce operator
  ...
2014-10-01 01:33:46 +02:00
Nikita Popov
142a01db92 Fix a couple compile warnings 2014-09-29 20:57:17 +02:00
Anatol Belski
e46187daf5 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix test filename
2014-09-29 20:31:02 +02:00
Anatol Belski
df4d559881 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix test filename
2014-09-29 20:30:43 +02:00
Anatol Belski
7f1239232e fix test filename 2014-09-29 20:30:18 +02:00
Anatol Belski
a81a392117 Merge branch 'PHP-5.6'
* PHP-5.6:
  one more test to illustrate transfer of an arbitrary data amount throug pipes
2014-09-29 20:19:51 +02:00
Anatol Belski
cc3849f039 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  one more test to illustrate transfer of an arbitrary data amount throug pipes
2014-09-29 20:19:31 +02:00
Anatol Belski
1a2a8c6d4e one more test to illustrate transfer of an arbitrary data amount throug pipes 2014-09-29 20:18:33 +02:00
Anatol Belski
6090c3cf83 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix tests on linux
  better test cleanup
2014-09-29 18:13:16 +02:00
Anatol Belski
70ff3ad7d1 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix tests on linux
  better test cleanup
2014-09-29 18:12:56 +02:00
Anatol Belski
859913f6d4 fix tests on linux 2014-09-29 18:12:25 +02:00
Anatol Belski
91d3cd8559 better test cleanup
and even force the XFAIL to fail as it would take too long anyway, even if it passes
2014-09-29 18:11:06 +02:00
Anatol Belski
78e23758b7 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fixed bug #51800 proc_open on Windows hangs forever

Conflicts:
	main/streams/plain_wrapper.c
2014-09-29 16:30:40 +02:00
Anatol Belski
87a37f4090 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #51800 proc_open on Windows hangs forever
2014-09-29 16:27:33 +02:00
Anatol Belski
0c982798e0 Fixed bug #51800 proc_open on Windows hangs forever
This loop can block for some minutes, theoretically. Practially
however, this is a 99% non issue for a normal use case. This is
required because read() is synchronous. The PHP streams API wants
to fill its internal buffers, therefore it might try to read some
more data than user has demanded. Also, for a case where we want
to read X bytes, but neither enough data nor EOF arrives, read()
will block until it could fill the buffer. If a counterpart station
runs slowly or delivers not all the data at once, read() would
still be waiting. If we quit too early, we possibly could loose
some data from the pipe. Thus it has to emulate the read()
behaviour, but obviously not completely, just to some grade.

Reading big data amount is for sure an issue on any platforms, it
depends on the pipe buffer size, which is controlled by the system.
On Windows, the buffer size seems to be way too small, which causes
buffer congestion and a dead lock. It is essential to read the pipe
descriptors simultaneously and possibly in the same order as the
opposite writes them.

Thus, this will work with smaller buffer data sizes passed through
pipes. As MSDN states, anonymous pipes don't support asynchronous
operations. Neither anonymous pipes do support select() as they are
not SOCKETs but file descriptors. Consequently - bigger data sizes
will need a better solution based on threads. However it is much
more expencive. Maybe a better solution could be exporting a part
of the internal doing as a userspace function which could perform
some kind of lookahead operation on the pipe descriptor.

This is just the first stone, depending on the user feedback we
might go for further improvements in this area.
2014-09-29 16:24:34 +02:00
Anatol Belski
283609e3d6 cleanup TSRMLS_FETCH in ext/standard 2014-09-26 21:05:55 +02:00
krakjoe
52fa340902 remove fetches 2014-09-26 09:37:15 +01:00
Anatol Belski
d11734b4b0 reworked the patch, less new stuff but worky
TLS is already used in TSRM, the way exporting the tsrm cache through
a thread local variable is not portable. Additionally, the current
patch suffers from bugs which are hard to find, but prevent it to
be worky with apache. What is done here is mainly uses the idea
from the RFC patch, but

- __thread variable is removed
- offset math and declarations are removed
- extra macros and definitions are removed

What is done merely is

- use an inline function to access the tsrm cache. The function uses
  the portable tsrm_tls_get macro which is cheap
- all the TSRM_* macros are set to placebo. Thus this opens the way
  remove them later

Except that, the logic is old. TSRMLS_FETCH will have to be done once
per thread, then tsrm_get_ls_cache() can be used. Things seeming to be
worky are cli, cli server and apache. I also tried to enable bz2
shared and it has worked out of the box. The change is yet minimal
diffing to the current master bus is a worky start, IMHO. Though will
have to recheck the other previously done SAPIs - embed and cgi.

The offsets can be added to the tsrm_resource_type struct, then
it'll not be needed to declare them in the userspace. Even the
"done" member type can be changed to int16 or smaller, then adding
the offset as int16 will not change the struct size. As well on the
todo might be removing the hashed storage, thread_id != thread_id and
linked list logic in favour of the explicit TLS operations.
2014-09-25 18:48:27 +02:00
Anatol Belski
a2dd606942 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (31 commits)
  Fixed C++ incompatibility
  update the certificate used for the test, as it expired recently
  Fixed immutable arrays support
  Fix counting of "R:" references in serialize()
  Remove dead code
  Test use($this) being an error
  Move list() condition into assign_znode
  typo
  NEWS
  Fix bug #68074 Allow to use system cipher list instead of hardcoded value
  Avoid double checks
  the order of the blocks should be Core, then exts in alphabetical order
  add missing NEWS entry for the phpdbg compilation fix
  add NEWS entry for #68088
  Make QM_ASSIGN, JMP_SET and CAST return IS_TMP_VAR.
  Removed useless helper
  Drop unused result argument
  Fix ct binding for cuf/cufa functions
  Fix detection of write to built-in function for references
  Test use of string names with \ prefix
  ...
2014-09-24 21:39:49 +02:00
Nikita Popov
75860fa8e1 Fix counting of "R:" references in serialize() 2014-09-24 12:06:19 +02:00
Anatol Belski
7099736dfa Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  Fix tests/serialize/bug64146.phpt
  Remove zend_dynamic_array
  Remove static allocator
  Fixed typo
  Fix list() destructuring to special variables
  Remove php_varname_check
  Avoid useless reference counting
  Specialization (only IS_VAR ad IS_CV operands may be references)
  Optimized unset()
  Make error paths to be UNEXPECTED
  Replace IS_OP?_TMP_FREE() with more clear (OP?_TYPE == IS_TMP_VAR)
2014-09-23 00:32:48 +02:00
Nikita Popov
8be73f2650 Fix tests/serialize/bug64146.phpt
The var hash now retains a reference to its elements, to ensure
that addresses are not reused.

Furthermore the var hash now only stores objects and references
and directly uses their pointer as key, thus making serialization
about two times faster.
2014-09-22 23:48:31 +02:00
Nikita Popov
483697617f Remove php_varname_check
This is a leftover from PHP < 5.4.

Also removed the php_create_empty_class declaration, which no longer
exists.
2014-09-22 18:34:40 +02:00
Andrea Faulds
25eb496763 Fixed broken tests 2014-09-22 17:33:56 +01:00
Anatol Belski
6bb530d1eb Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (24 commits)
  added a comment
  fix the REPARSE_DATA_BUFFER struct def
  simplify the condition
  Fix two memory errors by interning earlier
  Add smart_str_append for appending zend_strings
  Rename smart_str_append to smart_str_append_smart_str
  Use smart_str for exception stack traces
  Use smart_str in get_function_declaration
  Move smart_str implementation into Zend/
  UPGRADING for Integer Semantics
  Fixed bug #66242 (don't assume char is signed)
  Fixed bug #67633
  Fixed if/else if ordering
  Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG
  Use zend_ polyfilled nan/finite, check finite
  Updated 32-bit << test
  Updated << 64-bit tests
  Prevent bit shift count wrapping quirkiness on some CPUs for left shift
  Cast NaN and Infinity to zero
  Updated >> 64-bit tests
  ...
2014-09-22 10:26:17 +02:00
Anatol Belski
0885e4b1b9 simplify the condition 2014-09-22 09:41:53 +02:00
Nikita Popov
a770d29df7 Add smart_str_append for appending zend_strings
Also replaces usages in Zend/ and ext/standard
2014-09-21 20:58:31 +02:00
Nikita Popov
2a7de9fdbb Rename smart_str_append to smart_str_append_smart_str
It's used only rarely and I'm running out of append names...
2014-09-21 20:49:39 +02:00
Nikita Popov
e33f3d3b7c Move smart_str implementation into Zend/
So we can use it there as well...

For now I've retained the zend_smart_str_public.h header, though
it would probably be better to just move that one struct into
zend_types.h.
2014-09-21 20:49:39 +02:00
Anatol Belski
fb17d6516d Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  fixed copying of the struct as it's not being modified
  avoid strlen usage in loop
  Removes accidentally added files.
  Reverts some unwanted changes
  Deletes patch leftovers
  Replaces php5 with php7, without whitespace changes.
2014-09-20 21:37:19 +02:00
krakjoe
b3aebda9ea native tls initial patch 2014-09-20 20:22:14 +01:00
Anatol Belski
132cd8be0d Merge branch 'pull-request/805'
* pull-request/805:
  Removes accidentally added files.
  Reverts some unwanted changes
  Deletes patch leftovers
  Replaces php5 with php7, without whitespace changes.
2014-09-20 19:46:44 +02:00
Anatol Belski
763bfb4f3b refixed printf fmt, used portable macros 2014-09-20 15:46:19 +02:00
Anatol Belski
1b3569235a forked bug41655 test for windows 2014-09-20 15:14:31 +02:00
Florian MARGAINE
8eb7e7bf7f Merge branch 'master' into issue-67910
Conflicts:
	README.PARAMETER_PARSING_API
	ext/gmp/tests/001.phpt
2014-09-20 10:09:21 +02:00
Florian MARGAINE
cf0303e782 Replaces php5 with php7, without whitespace changes. 2014-09-20 10:01:44 +02:00
Nikita Popov
0cd982f15c Make header C++ compatible 2014-09-19 23:54:58 +02:00
Nikita Popov
31e842472f Make number printing functions less generic
Now that zend_ulong is 64bit on 64bit platforms, it should be
sufficient to always use it, rather than supporting multiple
types.

API changes:
 * _zend_print_unsigned_to_buf and _zend_print_signed_to_buf
   no longer exist.
 * smart_str(ing)_print_long and smart_str(ing)_print_unsigned
   no longer exist.
 * Instead of all these, zend_print_ulong_to_buf and
   zend_print_long_to_buf should be used.
 * smart_str_append_generic_ex no longer exists.
 * smart_str(ing)_append_off_t(_ex) no longer exists, use
   smart_str(ing)_append_long(_ex) instead.
2014-09-19 23:39:07 +02:00
Nikita Popov
ad3e1830ba Use append_unsigned instead of append_long where appropriate 2014-09-19 23:39:07 +02:00
Nikita Popov
37aaccad7d Use inline functions for most of smart_str
smart_str_free_ex no longer exists, always use smart_str_free instead.

smart_str_alloc no longer requires a newlen variable to be in scope,
instead it returns the new length.
2014-09-19 23:39:07 +02:00
Nikita Popov
070667de8d Remove SMART_STR_USE_REALLOC 2014-09-19 23:39:07 +02:00
Anatol Belski
f6c02239ca Merge branch 'PHP-5.6'
* PHP-5.6:
  fix possible array underflow

Conflicts:
	ext/standard/image.c
2014-09-19 20:15:56 +02:00
Anatol Belski
6213d9fc91 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix possible array underflow
2014-09-19 20:13:46 +02:00
Anatol Belski
5d9403f56c fix possible array underflow
there are multiple issues with this code

- php_stream_read() returns an unsigned val, so is >= 0
- if it read less than sizeof(a) bytes, the function operates on garbage
- result->channels is an unsigned val, so >= 0
2014-09-19 20:12:24 +02:00
Anatol Belski
2be8fdcfd6 updated the comment to charset_hint 2014-09-19 19:45:38 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Dmitry Stogov
bccc653185 Avoid double IS_INTERNED() check 2014-09-19 17:32:50 +04:00
Dmitry Stogov
3bc8a958c5 Fixed useless or duplicated IS_INTERNED() checks 2014-09-19 15:41:01 +04:00
Anatol Belski
953386edfd fix an always true condition and improve the error check 2014-09-19 10:33:01 +02:00
Anatol Belski
79bb2a1474 fix conditions 2014-09-19 09:49:32 +02:00
Anatol Belski
6fab907920 there can be only one ... of the identical expressions 2014-09-19 09:26:07 +02:00
Anatol Belski
f25f672916 fix condition 2014-09-19 09:09:20 +02:00
Anatol Belski
4d60f23630 fix printf format 2014-09-19 08:44:35 +02:00
Anatol Belski
c45f4f5461 generalized the case with secure memory zeroing 2014-09-19 01:46:14 +02:00
Anatol Belski
adf753159b remove useless condition 0 > unsigned 2014-09-19 00:06:40 +02:00
Anatol Belski
4722d85c1e zero sensitive data more secure way 2014-09-19 00:06:38 +02:00
Anatol Belski
bb89ac8408 zero sensitive data more secure way 2014-09-19 00:06:37 +02:00
Anatol Belski
732c49b433 fix sprintf format 2014-09-19 00:06:35 +02:00
Anatol Belski
2b77a57d88 zero sensitive data more secure way 2014-09-19 00:06:34 +02:00
Anatol Belski
3fa5064173 remove useless check 2014-09-19 00:06:32 +02:00
Anatol Belski
d41ac22a54 avoid strlen() usage in the loop 2014-09-17 08:59:19 +02:00
Anatol Belski
d594809f27 fix printf fmt 2014-09-17 00:56:42 +02:00
Anatol Belski
dda7a01480 fix signed/unsigned mismatch 2014-09-17 00:56:40 +02:00
Anatol Belski
f2e728616c fix signed/unsigned mismatch warnings 2014-09-17 00:56:38 +02:00
Anatol Belski
7ba43ea052 fix signed/unsigned mismatch 2014-09-16 22:15:27 +02:00
Anatol Belski
8c4ab0d02e fix signed/unsigned mismatch 2014-09-16 21:17:27 +02:00
Nikita Popov
079409bbc2 Switch (un)mangle property name to size_t and zend_string
Also use the _ex variants where possible.
2014-09-16 00:31:27 +02:00
Anatol Belski
066d39020b fix types 2014-09-15 19:46:32 +02:00
Anatol Belski
e591c78d09 revamp serialization to work with size_t for Serializable 2014-09-15 19:46:28 +02:00
Anatol Belski
172ca172d1 correct fix to the natcmp_ex
Till now the actualy length diff between the strings was under
circumstances returned. Whereby for a compare function only return
values of (1, 0, -1) make sense. Thus the old behavior isn't
present anymore, natcmp_ex now behaves as a standard compare function.
2014-09-15 12:58:46 +02:00
Anatol Belski
29f8b21cd7 fix int overflow preserving the old behavior 2014-09-14 16:39:25 +02:00
Anatol Belski
8d075b6e4d better way to zero away sensitive data
memset could be optimized away by the compiler
2014-09-14 11:48:51 +02:00
Anatol Belski
34e39783b1 remove useless casts and checks 2014-09-14 11:00:22 +02:00
Anatol Belski
79f51bd1a0 use the generator to produce the header 2014-09-14 00:43:58 +02:00
Anatol Belski
da10603ec9 update the html table generator 2014-09-14 00:42:48 +02:00
Anatol Belski
26cf7df133 removed the emalloc result check, out of memory will bailout 2014-09-14 00:00:52 +02:00
Anatol Belski
7d194a0e0b replaced the check with assert as it's kinda unusual case 2014-09-13 23:57:53 +02:00
Anatol Belski
87a5aae166 removed extra 1 byte member, padding will be done anyway by the compiler 2014-09-13 23:55:30 +02:00
Anatol Belski
a7690fea7a check if the winver was indeed fetched 2014-09-13 23:21:48 +02:00
Anatol Belski
bce562b75e check emalloc() result 2014-09-13 23:21:47 +02:00
Anatol Belski
e00d48490b better way to check for an empty string 2014-09-13 23:21:46 +02:00
Anatol Belski
f357628fc9 reduce the union size from 24 to 16 bytes on 64 bit 2014-09-13 23:21:44 +02:00
Anatol Belski
47fb7a46ac reduced struct sizes by 8 byte each on 64 bit 2014-09-13 23:21:39 +02:00
Anatol Belski
d578e351a9 fix condition
substraction of two unsigned
2014-09-13 23:21:38 +02:00
Anatol Belski
5092c5490a reduce struct sizes by 8 byte on 64 bit 2014-09-13 23:21:37 +02:00
Anatol Belski
1f9893d0ef avoid strlen() usage in the loop 2014-09-13 23:21:36 +02:00
Anatol Belski
e251ecb6e9 fix possible null ptr deref 2014-09-12 22:31:02 +02:00
Anatol Belski
7ac5a36a2f fix possible nullptr derefrence 2014-09-12 22:18:06 +02:00
Anatol Belski
5257ac4925 fix test which fails if prevous run cleanup failed 2014-09-12 21:35:24 +02:00
Anatol Belski
e254ba32d5 fixed the tests, related to the basename behaviour, bug #66395 2014-09-07 20:11:49 +02:00
Nikita Popov
f4f9b54983 Revert "Move safe_address into zend_multiply.h"
This reverts commit 43b02e169c.

I'm getting symbol resolution issues for zend_error_noreturn in the
opcache.so, so reverting this for now.
2014-09-06 22:12:37 +02:00
Nikita Popov
43b02e169c Move safe_address into zend_multiply.h
This allows reuse in zend_arena_calloc.

Also renamed the function to zend_safe_address as it's no longer
private to the allocator.
2014-09-06 14:03:59 +02:00
Nikita Popov
0c5ac39796 Fix smart_str_append()
Would segfault if src->s == NULL.
2014-09-04 21:55:27 +02:00
Tjerk Meesters
6f6541dc84 Merge branch 'pr/804'
* pr/804:
  Adds phpversion test to prevent #67959
2014-09-05 02:17:42 +08:00
Florian MARGAINE
e338e26ab7 Adds phpversion test to prevent #67959 2014-09-04 20:13:43 +02:00
Tjerk Meesters
6951f8adb0 Merge branch 'pr/803'
* pr/803:
  Fixes zpp parameter from int to size_t
2014-09-05 02:02:20 +08:00
Florian MARGAINE
c24c7ff224 Fixes zpp parameter from int to size_t 2014-09-04 19:59:39 +02:00
Nikita Popov
2b133e9149 Separate php_mb_reset() from php_mblen()
Instead of fighting against warnings ...
2014-09-03 20:37:04 +02:00
Nikita Popov
6cceb54c09 Fix a number of format issues 2014-09-03 15:57:28 +02:00
Dmitry Stogov
e51677b2e6 fixed reference counting 2014-09-02 11:24:52 +04:00
Dmitry Stogov
1670772dc6 Avoid string duplication 2014-09-02 09:52:23 +04:00
Dmitry Stogov
88d7ca44f6 Refactored INI subsystem to use zend_string* instead of char* 2014-09-01 20:57:33 +04:00
Tjerk Meesters
5d5a7b1f7f Merge branch 'PHP-5.6'
* PHP-5.6:
  Updated UPGRADING for #38409
  Updated NEWS for #38409
  Added test case
  Making ini parser typed - Added ZEND_INI_SCANNER_TYPED mode for parse_ini_string() and parse_ini_file() - Added NULL_NULL token to separate it from BOOL_FALSE and BOOL_TRUE - Added zend_ini_copy_typed_value() function for zval initialisation - Updated RETURN_TOKEN() to observe scanner_mode

Conflicts:
	Zend/zend_ini_parser.y
	Zend/zend_ini_scanner.c
2014-09-01 22:43:17 +08:00
Tjerk Meesters
1bf996b324 Added test case 2014-09-01 22:04:25 +08:00
Tjerk Meesters
5270ee1aef Making ini parser typed
- Added ZEND_INI_SCANNER_TYPED mode for parse_ini_string() and parse_ini_file()
- Added NULL_NULL token to separate it from BOOL_FALSE and BOOL_TRUE
- Added zend_ini_copy_typed_value() function for zval initialisation
- Updated RETURN_TOKEN() to observe scanner_mode
2014-09-01 22:04:06 +08:00
Anatol Belski
f4ed876db1 fix acosh for vs2012 and earlier 2014-09-01 15:34:42 +02:00
Anatol Belski
3aa5583cab fix asinh() on win64 for big negative values 2014-09-01 15:34:40 +02:00
Anatol Belski
312181bc13 fix iptcembed() 2014-08-31 14:02:28 +02:00
Nikita Popov
f1c2017851 Don't depend on exact parse error messages in assert tests 2014-08-29 22:07:25 +02:00
Anatol Belski
13ccda7249 fix implicit st_rdev element handling when negative value was passed 2014-08-29 13:30:53 +02:00