Commit Graph

213 Commits

Author SHA1 Message Date
Dmitry Stogov
560e4fa393 Removed or simplified incorrect SEPARATE_*() macros usage. 2015-09-29 11:17:43 +03:00
Xinchen Hui
3fc5f5cdb5 Fixed bug #70535 (XSLT: free(): invalid pointer) 2015-09-20 09:30:50 -07:00
Anatol Belski
4e66cce87c switch to the unified globals accessor where appropriate 2015-07-29 13:26:35 +02:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Christoph M. Becker
b8d8c75c4c added LIBXML_BIGLINES constant 2015-06-08 09:59:37 +02:00
Christoph M. Becker
a1951c2e0a added tests for bug #54138 2015-06-08 09:59:36 +02:00
Christoph M. Becker
f661b10536 replaced / in filename with DIRECTORY_SEPARATOR according to performance warning on DOMDocument::load man page 2015-06-08 09:40:06 +02:00
Christoph M. Becker
03399721f4 added SKIPIF conditional to check for DOM availability 2015-06-08 09:40:05 +02:00
Christoph M. Becker
5fed10e109 added XFAIL test for bug #69753 2015-06-08 09:40:04 +02:00
Anatol Belski
06332e6706 introduced DllMain for the main php DLL
The particular need on this is because of the current situation
with determining the background functionality for the
gettimeofday. DllMain allows to initialize stuff before the DLL
can be actually used. Thus, we use different time API on win7
and win8 and later, so the function pointer needs to be
initialized before anything in the DLL could even demand it.

The change also opens the door for the further optimizations,
as now we're able to do the very basic initializations for the
whole DLL before it could ever start to live. Fe on this way the
TLS initialization could be done, when utilizing the
DLL_THREAD_ATTACH/DETACH case. Whether it's really usable in
portable way should be synced with other platforms.

Be aware that it's dangerous as it possibly causes dead locks.
So to use with care. One willing to add items to DllMain should
better read the documentation twice and even then try to defer
the necessary action.
2015-06-02 15:56:32 +02:00
Anatol Belski
b312a7ee38 extend libxml exports 2015-05-13 15:20:20 +02:00
Anatol Belski
becfdeb2ff improve searchability for libxml2 headers
and bring the configs inline with the current libxml2 build
2015-05-10 22:22:03 +02:00
Anatol Belski
2d78023244 cleanup the mod version macros, round 2 2015-03-23 20:33:54 +01:00
Anatol Belski
8f0dbe2355 Merge branch 'PHP-5.6'
* PHP-5.6:
  libxml-2.9.2 compatibility
2015-03-15 18:39:38 +01:00
Anatol Belski
af2b066911 libxml-2.9.2 compatibility 2015-03-15 18:38:50 +01:00
Anatol Belski
8742276eb3 abstain from using xmlCleanupParser
Depending on circumstances, usage of xmlCleanupParser can affect
the thread local storage, or even cause crashes in single threaded
programs. On shutdown the memory will be freed anyway, however
not using xmlCleanupParser helps to avoid possible shutdown
crashes.
2015-02-17 10:37:52 +01:00
Anatol Belski
af3ca74501 made ZEND_TSRMLS_CACHE_* macros look like function calls
which also comply with the current semantics for such macros
2015-02-16 17:19:32 +01:00
Stanislav Malyshev
463611714c Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #64938: libxml_disable_entity_loader setting is shared between threads
2015-02-01 00:09:04 -08:00
Martin Jansen
de31324c22 Fix bug #64938: libxml_disable_entity_loader setting is shared between threads
The availability of entity loading is stored in a module global which
previously was only initialized in the GINIT constructor. This had the
effect that disabling the entity loader in one request caused
subsequent requests hitting the same Apache child process to  also have
the loader disabled.

With this change the loader is explicitely enabled in the request init
phase.
2015-02-01 00:08:35 -08:00
Martin Jansen
3a39f3ad70 Fix typos 2015-01-22 21:08:28 +01:00
Martin Jansen
c1eb87ab1a Fix bug #64938: libxml_disable_entity_loader setting is shared between threads
The availability of entity loading is stored in a module global which
previously was only initialized in the GINIT constructor. This had the
effect that disabling the entity loader in one request caused
subsequent requests hitting the same Apache child process to  also have
the loader disabled.

With this change the loader is explicitely enabled in the request init
phase.
2015-01-22 20:58:15 +01:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +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
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
Anatol Belski
7a6a3d923b fix arg order, CFLAGS is the fifth arg in m4 2014-10-17 16:03:40 +02:00
Anatol Belski
5749b4a997 ext/libxml, ext/xml and ext/soap use static tsrmls pointer 2014-10-17 14:31:17 +02: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
krakjoe
216c6b0f13 remove fetches from libxml 2014-09-26 11:25:10 +01: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
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski
760c51a644 avoid usage of strlen() in the loop 2014-09-13 23:21:53 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
63d3f0b844 basic macro replacements, all at once 2014-08-19 08:07:31 +02:00
Matteo Beccati
8cfdf20ccf Fixed DOM tests when using libxml2 versions patched against CVE-2014-0191
DOMDocument::substituteEntities needs to be set to true in order for
external entities to be parsed.
2014-06-09 07:08:04 +02:00
Matteo Beccati
6eaadc0228 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed DOM tests when using libxml2 versions patched against CVE-2014-0191
2014-06-09 07:07:17 +02:00
Matteo Beccati
af5057bea7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed DOM tests when using libxml2 versions patched against CVE-2014-0191
2014-06-09 07:07:07 +02:00
Matteo Beccati
5c8c57aa6c Fixed DOM tests when using libxml2 versions patched against CVE-2014-0191
DOMDocument::substituteEntities needs to be set to true in order for
external entities to be parsed.
2014-06-09 07:05:23 +02:00
Dmitry Stogov
04456f8fab Allow just set or get context passing NULL pointers 2014-05-15 11:14:12 +04:00
Xinchen Hui
41f6889436 Fixed SimpleXMl build with DOM 2014-05-04 11:46:17 +08:00
Xinchen Hui
d8651fbe1c Make they are in the same style of Z_ISREF 2014-05-03 16:08:58 +08:00
Dmitry Stogov
f9927a6c97 Merge mainstream 'master' branch into refactoring
During merge I had to revert:
	Nikita's patch for php_splice() (it probably needs to be applyed again)
	Bob Weinand's patches related to constant expression handling (we need to review them carefully)
	I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway)

Conflicts:
	Zend/zend.h
	Zend/zend_API.c
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_constants.c
	Zend/zend_exceptions.c
	Zend/zend_execute.c
	Zend/zend_execute.h
	Zend/zend_execute_API.c
	Zend/zend_hash.c
	Zend/zend_highlight.c
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_variables.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/date/php_date.c
	ext/dom/documenttype.c
	ext/hash/hash.c
	ext/iconv/iconv.c
	ext/mbstring/tests/zend_multibyte-10.phpt
	ext/mbstring/tests/zend_multibyte-11.phpt
	ext/mbstring/tests/zend_multibyte-12.phpt
	ext/mysql/php_mysql.c
	ext/mysqli/mysqli.c
	ext/mysqlnd/mysqlnd_reverse_api.c
	ext/mysqlnd/php_mysqlnd.c
	ext/opcache/ZendAccelerator.c
	ext/opcache/zend_accelerator_util_funcs.c
	ext/opcache/zend_persist.c
	ext/opcache/zend_persist_calc.c
	ext/pcre/php_pcre.c
	ext/pdo/pdo_dbh.c
	ext/pdo/pdo_stmt.c
	ext/pdo_pgsql/pgsql_driver.c
	ext/pgsql/pgsql.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/array.c
	ext/standard/basic_functions.c
	ext/standard/html.c
	ext/standard/mail.c
	ext/standard/php_array.h
	ext/standard/proc_open.c
	ext/standard/streamsfuncs.c
	ext/standard/user_filters.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_variables.c
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_bp.c
	sapi/phpdbg/phpdbg_frame.c
	sapi/phpdbg/phpdbg_help.c
	sapi/phpdbg/phpdbg_list.c
	sapi/phpdbg/phpdbg_print.c
	sapi/phpdbg/phpdbg_prompt.c
2014-04-26 00:32:51 +04:00
Dmitry Stogov
5864ce8a44 Fixed compilation warnings 2014-04-22 17:46:34 +04:00
Nikita Popov
8a14276701 Fix libxml external entity loading 2014-04-18 00:15:13 +02:00
Nikita Popov
c3c47c431e Move libxml_destroy_fci to RSHUTDOWN
If this is only done in post shutdown and the function name is
an object (e.g. closure), the object will already be freed during
zend_deactivate.

I left the rest of the shutdown procedure in post shutdown, as it
presumably has a reason to be there...
2014-04-18 00:15:13 +02:00