Commit Graph

708 Commits

Author SHA1 Message Date
Anatol Belski
871ea20e9c Merge branch 'PHP-7.1'
* PHP-7.1:
  fix error handling
2017-04-15 18:29:37 +02:00
Anatol Belski
5bd0baa891 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix error handling
2017-04-15 18:25:31 +02:00
Anatol Belski
9719621e07 fix error handling 2017-04-15 18:19:33 +02:00
Anatol Belski
4d64a49fcd export the main thread info 2017-04-15 17:48:40 +02:00
Anatol Belski
c698299550 Interned strings unification for TS/NTS
Hereby, interned strings are supported in thread safe PHP. The patch
implements two types of interned strings

- interning per process, strings are not freed till process end
- interning per request, strings are freed at request end

There is no runtime interning.

With Opcache, all the permanent iterned strings are copied into SHM on
startup, additional copying into SHM might happen on demand.
2017-03-04 10:39:13 +01:00
Brian Evans
2fe9208ee3
Use modern autotools name of configure.ac instead of configure.in
configure.ac was introduced in 2001 with automake-1.15 and autoconf-2.50
to replace the file named configure.in.
Autotools is preparing to remove configure.in in Automake 2.0.
All new software should be using configure.ac.
This also fixes Bug #69770 where extensions are creating configure.in

Signed-off-by: Brian Evans <grknight@gentoo.org>
2017-01-27 06:07:40 +00:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Anatol Belski
758af77e9d Path handling related refactorings
Primarily related to the path handling datatypes, to avoid unnecessary
casts, where possible. Also some rework to avoid code dup. Probably
more places are to go, even not path related, primarily to have less
casts and unsigned integers where possible. That way, we've not only
less warnings and casts, but are also safer with regard to the
integer overflows. OFC it's not a panacea, but still significantly
reduces the vulnerability potential.
2016-12-22 14:56:47 +01:00
Kalle Sommer Nielsen
75ea28a7ae Remove more NetWare leftovers 2016-11-21 15:22:30 +01:00
Kalle Sommer Nielsen
2104bea5d7 Remove Netware support
If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
2016-11-12 11:20:01 +01:00
Bob Weinand
07a6321228 Merge branch 'PHP-7.1' 2016-10-29 18:50:36 +02:00
Bob Weinand
be6bf71274 Merge branch 'PHP-7.0' into PHP-7.1 2016-10-29 18:50:06 +02:00
Bob Weinand
36527eccbb Fixed build failure introduced by PR #2158
Note: AC_TRY_LINK interprets the source as part of a main function, ending up with int main() { /* ... */ int main() { /* ... */ } ; return 0; } here - Using AC_LINK_IFELSE with AC_LANG_SOURCE directly instead.
2016-10-29 18:49:38 +02:00
Joe Watkins
8d6cc00cbd Merge branch 'pull-request/2158' 2016-10-17 15:48:32 +01:00
Joe Watkins
ae6fc21f14 Merge branch 'pull-request/2158' 2016-10-17 14:46:03 +01:00
Fabrice Fontaine
e6bbc00964 Fix pthreads detection when cross-compiling
pthreads are not working when cross-compiling, indeed configure
sets pthreads_working to no if cross_compiling is detected.
This behavior is implemented in PTHREADS_CHECK. This function call
AC_CACHE_CHECK twice to retrieve ac_cv_pthreads_cflags and
ac_cv_pthreads_lib.
In these calls, the function PTHREADS_CHECK_COMPILE will call AC_TRY_RUN
function which will update the global pthreads_working variable.
This is not compliant with autoconf AC_CACHE_CHECK rules which specify
that "The commands-to-set-it must have no side effects except for
setting the variable cache-id".

So, this patch replaces pthread_working assignments with assignments on
a new local pthread_checked variable. Value of ptreads_working is
computed outside AC_CACHE_CHECK function depending on value of
ac_cv_pthreads_cflags and ac_cv_pthreads_lib.

Moreover, AC_TRY_RUN call is replaced by AC_TRY_LINK which will work
when cross-compiling.

Without this modification, thread safety option (--enable-maintainer-zts)
can not be enabled on embedded buildsystems such as buildroot.

Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
2016-10-11 15:16:26 +02:00
Anatol Belski
41b502c8c7 Merge branch 'PHP-7.1'
* PHP-7.1:
  fix HANDLE leak
2016-08-29 21:49:28 +02:00
Anatol Belski
2bfe926eb1 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix HANDLE leak
2016-08-29 21:48:50 +02:00
Anatol Belski
1b227de970 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix HANDLE leak
2016-08-29 21:47:54 +02:00
Anatol Belski
c7b4cd1a51 fix HANDLE leak 2016-08-29 21:45:39 +02:00
Anatol Belski
a1ff39ffe5 backport relevant part from bug #72858 patch in 7.0 2016-08-25 12:46:28 +02:00
Anatol Belski
becc5cd11b sync shm* implementation signatures with POSIX 2016-08-23 00:27:17 +02:00
Anatol Belski
de570f5017 Merge branch 'PHP-7.1'
* PHP-7.1:
  avoid other efforts if memory mapping fails
2016-08-18 16:02:22 +02:00
Anatol Belski
2f430a4b6c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  avoid other efforts if memory mapping fails
2016-08-18 16:01:23 +02:00
Anatol Belski
98d8794eae avoid other efforts if memory mapping fails 2016-08-18 15:58:33 +02:00
Anatol Belski
61bc6618b7 Merge branch 'PHP-7.1'
* PHP-7.1:
  map ell the err code
2016-08-18 15:31:36 +02:00
Anatol Belski
20aae1caa3 map ell the err code 2016-08-18 15:28:15 +02:00
Anatol Belski
634b382e47 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #72858 shm_attach null dereference
2016-08-18 14:41:08 +02:00
Anatol Belski
b81a073b85 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #72858 shm_attach null dereference
2016-08-18 14:40:20 +02:00
Anatol Belski
67f8c14c29 Fixed bug #72858 shm_attach null dereference 2016-08-18 14:15:10 +02:00
Kalle Sommer Nielsen
447e57a1e1 Fixed 7.1 build, decls first please! 2016-08-17 20:26:32 +02:00
Kalle Sommer Nielsen
c192bdecd5 Also fix TSRM on Windows 2016-07-30 17:32:53 +02:00
Anatol Belski
3d3f11ede4 Fixed the UTF-8 and long path support in the streams on Windows.
Since long the default PHP charset is UTF-8, however the Windows part is
out of step with this important point. The current implementation in PHP
doesn't technically permit to handle UTF-8 filepath and several other
things. Till now, only the ANSI compatible APIs are being used. Here is more
about it

https://msdn.microsoft.com/en-us/library/windows/desktop/dd317752%28v=vs.85%29.aspx

The patch fixes not only issues with multibyte filenames under
incompatible codepages, but indirectly also issues with some other multibyte
encodings like BIG5, Shift-JIS, etc. by providing a clean way to access
filenames in UTF-8. Below is a small list of issues from the bug tracker,
that are getting fixed:

https://bugs.php.net/63401
https://bugs.php.net/41199
https://bugs.php.net/50203
https://bugs.php.net/71509
https://bugs.php.net/64699
https://bugs.php.net/64506
https://bugs.php.net/30195
https://bugs.php.net/65358
https://bugs.php.net/61315
https://bugs.php.net/70943
https://bugs.php.net/70903
https://bugs.php.net/63593
https://bugs.php.net/54977
https://bugs.php.net/54028
https://bugs.php.net/43148
https://bugs.php.net/30730
https://bugs.php.net/33350
https://bugs.php.net/35300
https://bugs.php.net/46990
https://bugs.php.net/61309
https://bugs.php.net/69333
https://bugs.php.net/45517
https://bugs.php.net/70551
https://bugs.php.net/50197
https://bugs.php.net/72200
https://bugs.php.net/37672

Yet more related tickets can for sure be found - on bugs.php.net, Stackoverflow
and Github. Some of the bugs are pretty recent, some descend to early
2000th, but  the user comments in there last even till today. Just for example,
bug #30195 was opened in 2004, the latest comment in there was made in 2014. It
is certain, that these bugs descend not only to pure PHP use cases, but get also
redirected from the popular PHP based projects. Given the modern systems (and
those supported by PHP) are always based on NTFS, there is no excuse to keep
these issues unresolved.

The internalization approach on Windows is in many ways different from
UNIX and Linux, while it supports and is based on Unicode. It depends on the
current system code page, APIs used and exact kind how the binary was compiled
The locale doesn't affect the way Unicode or ANSI API work. PHP in particular
is being compiled without _UNICODE defined and this is conditioned by the
way we handle strings. Here is more about it

https://msdn.microsoft.com/en-us/library/tsbaswba.aspx

However, with any system code page ANSI functions automatically convert
paths to UTF-16. Paths in some encodings incompatible with the
current system code page, won't work correctly with ANSI APIs. PHP
till now only uses the ANSI Windows APIs.

For example, on a system with the current code page 1252, the paths
in cp1252 are supported and transparently converted to UTF-16 by the
ANSI functions. Once one wants to handle a filepath encoded with cp932 on
that particular system, an ANSI or a POSIX compatible function used in
PHP will produce an erroneous result. When trying to convert that cp932 path
to UTF-8 and passing to the ANSI functions, an ANSI function would
likely interpret the UTF-8 string as some string in the current code page and
create a filepath that represents every single byte of the UTF-8 string.
These behaviors are not only broken but also disregard the documented
INI settings.

This patch solves the issies with the multibyte paths on Windows by
intelligently enforcing the usage of the Unicode aware APIs. For
functions expect Unicode (fe CreateFileW, FindFirstFileW, etc.), arguments
will be converted to UTF-16 wide chars. For functions returning Unicode
aware data (fe GetCurrentDirectoryW, etc.), resulting wide string is
converted back to char's depending on the current PHP charset settings,
either to the current ANSI codepage (this is the behavior prior to this patch)
or to UTF-8 (the default behavior).

In a particular case, users might have to explicitly set
internal_encoding or default_charset, if filenames in ANSI codepage are
necessary. Current tests show no regressions and witness that this will be an
exotic case, the current default UTF-8 encoding is compatible with any
supported system. The dependency libraries are long switching to Unicode APIs,
so some tests were also added for extensions not directly related to streams.
At large, the patch brings over 150 related tests into the core. Those target
and was run on various environments with European, Asian, etc. codepages.
General PHP frameworks was tested and showed no regressions.

The impact on the current C code base is low, the most places affected
are the Windows only places in the three files tsrm_win32.c, zend_virtual_cwd.c
and plain_wrapper.c. The actual implementation of the most of the wide
char supporting functionality is in win32/ioutil.* and win32/codepage.*,
several  low level functionsare extended in place to avoid reimplementation for
now. No performance impact was sighted. As previously mentioned, the ANSI APIs
used prior the patch perform Unicode conversions internally. Using the
Unicode  APIs directly while doing custom conversions just retains the status
quo. The ways to optimize it are open (fe. by implementing caching for the
strings converted to wide variants).

The long path implementation is user transparent. If a path exceeds the
length of _MAX_PATH, it'll be automatically prefixed with \\?\. The MAXPATHLEN
is set to 2048 bytes.

Appreciation to Pierre Joye, Matt Ficken, @algo13 and others for tips, ideas
and testing.

Thanks.
2016-06-20 12:45:39 +02:00
Joe Watkins
233115ea23 fix #71609: Segmentation fault on ZTS with gethostbyname 2016-03-31 12:39:01 +01:00
Nikita Popov
1ac152938c Move semicolon into TSRMLS_CACHE_EXTERN/DEFINE
Also re bug #71575.
2016-03-03 16:50:01 +01:00
Xinchen Hui
97a9470d97 bump year which is missed in rev 49493a2 2016-01-02 17:56:11 +08:00
Lior Kaplan
c51e73c803 Happy new year (Update copyright to 2016) 2016-01-01 19:23:04 +02:00
Anatol Belski
0e50a4c008 correct snprintf usage 2015-10-27 17:07:51 +01:00
Anatol Belski
4224907864 fix stack overflow 2015-10-10 18:37:16 +02:00
Anatol Belski
d5bd999a8f don't leak handles 2015-10-05 21:59:26 +02:00
Anatol Belski
3331d870aa use correct function to close handles 2015-10-05 21:59:22 +02:00
Anatol Belski
afe04911a7 unmap correct handle 2015-09-22 21:20:50 +02:00
Anatol Belski
faa50318a3 nullify the memory chunk to avoid crashes when freeing resource 2015-09-22 20:33:46 +02:00
Anatol Belski
0e843a4582 check for NULL return 2015-09-22 20:05:12 +02:00
Anatol Belski
59d3529f29 cleanup an atavism
no DOS support here )
2015-09-02 17:05:47 +02:00
Anatol Belski
94e272f1b3 TSRM_TLS should be usable in NTS build 2015-08-17 23:12:49 +02:00
Anatol Belski
ffa341de59 add macro to access globals as whole 2015-07-30 09:05:08 +02:00
Anatol Belski
fca341699e don't pass zero to malloc() 2015-03-10 09:10:23 +01:00
Anatol Belski
d428bf2d4e improve debugability in TS debug builds
gdb seems to be not always able to fetch the correct context for
thread locals. Thus, the "if (TSRMLS_CACHE)" clause causes gdb to
show crashes which aren't recognized neither with helgrind nor
in release builds. This is reproducable by setting breakpoints on
the exact line where PHP has a tsrm_get_ls_cache() call.
2015-02-17 19:15:22 +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
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
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Anatol Belski
2bc63e7b6d missed include for intptr_t/uintptr_t 2014-12-22 11:28:13 +01:00
Anatol Belski
d59fc5951e use cleaner tsrm_intptr_t/tsrm_uintptr_t typedef 2014-12-22 11:08:52 +01:00
Ferenc Kovacs
a9e86957c7 fix zts build on mac/clang 2014-12-21 20:01:39 +01:00
Anatol Belski
24f0d2ed54 make the TSRM macros depend no the macroed cache name 2014-12-16 10:44:43 +01:00
Anatol Belski
64b423d6ed removed the extra tsrm pointer passed to ctor/dtor 2014-12-16 08:03:15 +01:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
de99a94c38 explicit passing of *tsrm_ls isn't needed anymore 2014-12-12 08:11:14 +01:00
Anatol Belski
22be00cb3c TSRMLS_D should be void, thanks Dmitry 2014-12-11 10:03:39 +01:00
Anatol Belski
0180912823 default tsrmls cache to NULL 2014-11-19 12:26:24 +01: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
e6ea376a91 avoid repeated strlen usage, remove unused vars 2014-11-13 19:57:34 +01:00
Anatol Belski
999d387bf8 move these functions to the appropriate place
and include the necessary header
2014-11-10 10:58:19 +01:00
Anatol Belski
20f8f533e1 fix datatype mismatch warns 2014-10-29 15:30:03 +01:00
Anatol Belski
8aeffdd74c moved most of the core to use static tsrm ls cache pointer
plus apache2handler, cli and cgi
2014-10-15 16:33:40 +02:00
Anatol Belski
1fc8220b65 TSRMLS_FETCH() is a spent force 2014-10-15 09:46:35 +02:00
Anatol Belski
a91d3580a7 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  properly export tsrm_strtok_r()
  Fixed list() behavior inconsistency (string handling is disabled for all cases, ArrayAccess objects handling is enabled for all cases, ZEND_FETCH_DIM_TMP_VAR opcode is renamed into ZEND_FETCH_LIST, ZEND_FETCH_ADD_LOCK flag is removed).
  Fix accidental edit in previous commit
  Fix arginfo
  DateTimeZone::getOffset() now accepts a DateTimeInterface
  DateTimeZone::getOffset() now accepts a DateTimeInterface
  Moved checks and error reporting related to static methods from DO_FCALL inti INTI_FCALL* opcodes that may really deal with static methods. (In some rare cases it may lead to different order of warning messages).
  Fixed a bug that causes crash when environment variable is access while parsing php.ini
  Fixed a bug that causes crash when environment variable is access while parsing php.ini
2014-10-05 19:26:17 +02:00
Anatol Belski
d58b70622a properly export tsrm_strtok_r()
for this particular case fixing phar shared build, but for the
general usage anyway
2014-10-05 13:20:27 +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
Anatol Belski
55c6737b73 remove misprint parentheses 2014-10-03 19:23:32 +02:00
Anatol Belski
45e23645a4 linux compat for the static tsrm ls cache pointer 2014-10-02 08:45:53 +02:00
Anatol Belski
76081df168 using pointer to the tsrm ls cache instead of a function call
yet another approach
2014-10-01 22:04:21 +02:00
Anatol Belski
24f9c924d7 prepare some macros to use tsrm cache as pointer
instead of a function call
2014-09-30 19:16:23 +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
Anatol Belski
9f9b3585b9 revert the local speedup approach 2014-10-01 01:33:01 +02:00
Anatol Belski
4b3e198023 removed *.dsw and *.dsp files 2014-09-28 19:02:09 +02:00
krakjoe
7d4f7c04b3 approach local pointers in performance sensitive areas 2014-09-27 17:11:56 +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
aa8c424e0f call ctor if it's not done yet 2014-09-24 02:11:05 +02:00
Anatol Belski
58a2b05d7b fix indent 2014-09-23 17:14:41 +02:00
Anatol Belski
bec9fd7917 define explicit export/impot spec 2014-09-23 01:22:58 +02:00
Anatol Belski
4db75dc853 basic windows fix 2014-09-22 20:58:45 +02:00
Anatol Belski
2720743636 vars with __declspec(thread) cannot use __declspec(dllexport) 2014-09-20 22:13:10 +02:00
krakjoe
b3aebda9ea native tls initial patch 2014-09-20 20:22:14 +01:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski
d1131d4278 reverted some previous IS_ABSOLUTE_PATH related changes
It's fine with strlen usage now, only one call
2014-09-19 16:30:05 +02:00
Anatol Belski
f162b3f736 correct type for the thread id 2014-09-18 17:14:52 +02:00
Anatol Belski
90972355b3 avoid repeated strlen usage 2014-09-14 17:00:34 +02:00
Anatol Belski
34f536693c avoid usage of 'type' before the null pointer check 2014-08-29 11:21:07 +02:00
Anatol Belski
8ee2a4a9b5 first shot on merging the core fro the int64 branch 2014-08-16 11:16:11 +02:00
Anatol Belski
60ed3f78bd Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fixed macro
2014-02-24 10:13:11 +01:00
Anatol Belski
bca0e5edd5 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fixed macro
2014-02-24 10:12:50 +01:00
Anatol Belski
c6a4a7cad6 fixed macro 2014-02-24 10:12:18 +01:00
Anatol Belski
07f3bac6ca fix *.dsp files related to bug #50333 2014-01-28 13:09:29 +01:00
Anatol Belski
4e7c9ea896 Fixed bug #66009 Failed compilation of PHP extension with C++ std library using VS 2012
Visual Studio 2012 includes sanity checks for C++11 features, see
http://msdn.microsoft.com/en-us/library/vstudio/bb531344(v=vs.110).aspx
To fix the 'inline' keyword redefinition for C++ in debug mode, the
new macros ZEND_WIN32_KEEP_INLINE is introduced, ZEND_WIN32_FORCE_INLINE is
automatically appended in release mode.
2014-01-04 01:41:27 +01:00
Anatol Belski
ae1cc83f98 Fixed bug #66009 Failed compilation of PHP extension with C++ std library using VS 2012
Visual Studio 2012 includes sanity checks for C++11 features, see
http://msdn.microsoft.com/en-us/library/vstudio/bb531344(v=vs.110).aspx
To fix the 'inline' keyword redefinition for C++ in debug mode, the
new macros ZEND_WIN32_KEEP_INLINE is introduced, ZEND_WIN32_FORCE_INLINE is
automatically appended in release mode.
2014-01-04 01:41:01 +01:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Xinchen Hui
c0d060f5c0 Bump year 2014-01-03 11:04:26 +08:00
Anatol Belski
e30b2aae5a initial move on renaming files and fixing includes 2013-10-17 09:43:52 +02:00
Andrey Hristov
92d27ccb05 Constify streams API and a few other calls down the rabbit hole.
(`char *` to `const char *` for parameters and few return values)
In a few places int len moved to size_t len.
2013-07-30 12:49:36 +02:00
Anatol Belski
25f924abf6 fixed possible null deref 2013-07-22 14:50:18 +02:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Xinchen Hui
153bfada90 Merge branch 'PHP-5.3' into PHP-5.4 2012-11-02 18:56:17 +08:00
Xinchen Hui
3fe3029ecb Fixed bug #62444 (Handle leak in is_readable on windows). 2012-11-02 18:53:06 +08:00
Anatoliy Belsky
24e4af0b8f Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #63241 PHP fails to open Windows deduplicated files.
2012-10-31 22:55:32 +01:00
Anatoliy Belsky
a2e4404bc8 Fixed bug #63241 PHP fails to open Windows deduplicated files.
Fix by (daniel dot stelter-gliese at innogames dot de).
No test is supplied because the issue addresses
the new feature of the Windows Server 2012 and
would need a very specific filesystem setup.
2012-10-31 22:41:03 +01:00
Dmitry Stogov
ce9f1a4313 Fixed bug #51860 (Include fails with toplevel symlink to /) 2012-01-30 10:08:11 +00:00
Dmitry Stogov
2c90b8a06b Fixed bug #51860 (Include fails with toplevel symlink to /) 2012-01-30 10:08:11 +00:00
Felipe Pena
e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Pierre Joye
0e3ec21e6f - Fix #55295, check if malloc failed 2011-07-27 14:23:06 +00:00
Pierre Joye
ef7229ed17 - Fix #55295, check if malloc failed 2011-07-27 14:23:06 +00:00
Pierre Joye
7e0b627b02 - WS 2011-07-27 11:58:39 +00:00
Pierre Joye
bbd6fe7011 - do not resolve the link if all we want is to open that file 2011-07-27 11:57:44 +00:00
Ilia Alshanetsky
34d93f0c06 Zend Signal Handling 2011-06-22 14:23:21 +00:00
Rasmus Lerdorf
00842d6996 Fix CS 2011-05-19 23:18:55 +00:00
Rasmus Lerdorf
4ad9f1970c Fix CS 2011-05-19 23:18:55 +00:00
Rasmus Lerdorf
e40c470c9d Fix bug 54866 2011-05-19 23:09:58 +00:00
Rasmus Lerdorf
01a6840bbd Fix bug 54866 2011-05-19 23:09:58 +00:00
Johannes Schlüter
db6a29e533 - Fix possible memory leak
# Found by parfait - http://labs.oracle.com/projects/parfait/
2011-05-16 19:46:32 +00:00
Johannes Schlüter
9ea582a76c - Fix possible memory leak
# Found by parfait - http://labs.oracle.com/projects/parfait/
2011-05-16 19:46:32 +00:00
Rasmus Lerdorf
353077d234 Get rid of autoconf warnings 2011-05-16 00:14:47 +00:00
Pierre Joye
366e7170fa - WS 2011-01-10 00:59:19 +00:00
Pierre Joye
ab4ce5516d - some more possible NULL deref 2011-01-10 00:43:08 +00:00
Pierre Joye
9a0771d846 - some more possible NULL deref 2011-01-10 00:43:08 +00:00
Pierre Joye
8640b61c68 - fix possible NULL deref 2011-01-10 00:30:07 +00:00
Pierre Joye
26bb38e68b - fix possible NULL deref 2011-01-10 00:30:07 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Pierre Joye
8efec79ffe - expose php_sys_(l)stat, doing will prevent me to have to provide pecl's builds for <5.3.3 and another set for 5.3.4+. Trunk remains the same, A(B/P)I can be broken there 2010-11-04 01:16:20 +00:00
Pierre Joye
8c0682f89f - Fix #52908, fix declaration 2010-10-04 10:35:32 +00:00
Pierre Joye
f1d2e1453c - Fix #52908, fix declaration 2010-09-22 21:28:37 +00:00
Pierre Joye
c4334c7c38 - restore VOLUME_NAME_NT and VOLUME_NAME_DOS definition, thx Andrey for the headup 2010-09-17 11:34:49 +00:00
Pierre Joye
88117e6128 - restore VOLUME_NAME_NT and VOLUME_NAME_DOS definition, thx Andrey for the headup 2010-09-17 11:34:49 +00:00
Pierre Joye
b154864cc9 - drop tsrmls_fetch in popen_ex 2010-09-17 10:00:01 +00:00
Pierre Joye
83527d16a3 - drop tsrmls_fetch in tsrm_win32_access 2010-09-17 09:27:19 +00:00
Pierre Joye
65942d343f - sanity check for the path length and don't treat UNC as local path (no functional change, only less ops) 2010-09-13 10:58:18 +00:00
Pierre Joye
2beb341374 - sanity check for the path length and don't treat UNC as local path (no functional change, only less ops) 2010-09-13 10:58:18 +00:00
Pierre Joye
8a18e0b716 - use php_sys_lstat 2010-09-13 10:27:55 +00:00
Pierre Joye
ffd60af473 - use php_sys_lstat 2010-09-13 10:27:55 +00:00
Pierre Joye
d5ca12b03e - use php_sys_readlink 2010-09-13 09:30:07 +00:00
Pierre Joye
ba5b4afc32 - WS 2010-09-13 09:08:42 +00:00
Pierre Joye
3a2f5c2219 - WS 2010-09-13 09:08:42 +00:00
Pierre Joye
cd727b4e9a - remove 'UNC' from the target 2010-09-10 19:21:02 +00:00
Pierre Joye
e0591d0ea1 - remove 'UNC' from the target 2010-09-10 19:21:02 +00:00
Pierre Joye
ae50441266 - WS 2010-09-10 14:02:19 +00:00
Pierre Joye
391ff7682c - add php_sys_readlink 2010-09-10 14:01:44 +00:00
Pierre Joye
bf0a5ea745 - add php_sys_readlink 2010-09-10 14:01:44 +00:00
Pierre Joye
6396a3272c - add lstat support for Windows 2010-09-01 09:49:53 +00:00
Pierre Joye
dec8593fac - add lstat support for Windows 2010-09-01 09:49:53 +00:00
Pierre Joye
100228aae1 - use TSRMLS_CC instead of TSRMLS_FETCH in virtual_file_ex 2010-08-30 09:38:47 +00:00
Pierre Joye
3c3ddb39b4 - WS 2010-08-27 10:09:52 +00:00
Pierre Joye
cde759600b - WS 2010-08-27 10:09:52 +00:00
Pierre Joye
0f34683304 - WS 2010-08-26 14:23:48 +00:00
Pierre Joye
a5e51efff8 - Symlink resolution fails when target is a DFS path 2010-08-26 14:23:17 +00:00
Pierre Joye
b777280933 - Symlink resolution fails when target is a DFS path 2010-08-26 14:23:17 +00:00
Antony Dovgal
9badd4f0fb fix bug #50101 (name clash between global and local variable) 2010-06-08 13:27:30 +00:00
Antony Dovgal
dd73c48d57 fix bug #50101 (name clash between global and local variable) 2010-06-08 13:27:30 +00:00
Pierre Joye
6d675f3f4b - we don't need that anymore 2010-04-28 22:26:08 +00:00
Pierre Joye
f4735e72e4 - we don't need that anymore 2010-04-28 22:25:31 +00:00
Ilia Alshanetsky
3ea4abe92c update copyright 2010-02-16 13:01:50 +00:00
Pierre Joye
3a239b15e9 - silent warning 2010-02-04 15:34:19 +00:00
Pierre Joye
3247c2595d - vc6 does not expose it 2010-02-03 16:11:56 +00:00
Pierre Joye
6d913a0272 - oops, wrong one applied, fix build. 2010-02-01 15:31:58 +00:00
Pierre Joye
f25710db92 - set errno on failure so that the caller can still rely on strerror (reporting wrong error w/o this change) 2010-02-01 15:22:31 +00:00
Pierre Joye
565af741e4 - fix leak 2010-01-31 15:22:17 +00:00
Pierre Joye
1bbc4f1721 - fix write access check when write mode only is requested (not RW) 2010-01-30 20:55:01 +00:00
Pierre Joye
5d360fa1ce - fix leak 2010-01-27 16:52:36 +00:00
Pierre Joye
e130a31441 - don't go through the reparse code when we have a share or DFS path (should fix #50542) 2010-01-27 16:46:43 +00:00
Pierre Joye
84b59b8582 - little comment to avoid undesired changes in this section 2010-01-27 16:44:48 +00:00
Pierre Joye
b37f2257a4 - fix leak, win only 2010-01-27 16:43:16 +00:00
Pierre Joye
79aa615b55 - fix leak when the SID is already used and duplicated 2010-01-27 14:41:06 +00:00
Pierre Joye
3111aa2638 - ws 2010-01-25 09:01:22 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Felipe Pena
da22aa9aad - Fixed ZTS build 2009-12-08 01:51:34 +00:00
Stanislav Malyshev
7beb1af8de add realpath cache inspect functions 2009-12-08 01:35:08 +00:00
Pierre Joye
26e3082abc - fix lenght for alloc and cpy (Kanwal) 2009-11-03 10:48:12 +00:00
Pierre Joye
5e0f3731ac - MFH: fix realloc usage 2009-10-19 23:41:14 +00:00
Pierre Joye
0304ec7900 - Fix ACL support and add support for ACL for TS SAPI. Be sure to get the impersonated token when the impersonation has been done. Add the SID as part of the key for the cache (so each SID gets its cache and not previous requests run under other SID) 2009-10-19 23:32:07 +00:00
Pierre Joye
6711276b3c - fix ACL cache for read check 2009-09-19 20:54:34 +00:00
Pierre Joye
ada5eb95ad - Fix #48746, improve fix to support all possible cases (see latest comment in the report) 2009-09-14 18:46:56 +00:00
Pierre Joye
542c087a86 - be sure that we use the user token by default (Christian Wenz) 2009-09-04 06:59:08 +00:00
Pierre Joye
511c923785 - #27051, improve fix on xp/2k3 2009-09-03 19:16:50 +00:00
Pierre Joye
a8c40d5b3a - #48746, len includes null already 2009-09-02 22:59:58 +00:00
Pierre Joye
da9aee9703 - #27051, we need the thread token here, not the process 2009-09-02 01:59:17 +00:00
Pierre Joye
ddab8be51e - #27051, create process as impersonated user 2009-09-01 22:51:31 +00:00
Pierre Joye
b6882eddf6 - #48746, revert previous about volume. Fix volume support to allow all mounted points (with or without drives) 2009-09-01 17:50:59 +00:00
Pierre Joye
ceb607af13 - Fixed leak on error in popen/exec (and related functions) 2009-08-30 17:13:45 +00:00
Pierre Joye
45c58fc449 - Fix #48746, mounted volume support & resolution 2009-08-29 12:21:47 +00:00
Pierre Joye
17a4191575 - Fix for #48746, fix mounted volume and junctions when used from vista or later, they are actually prepended with \??\ 2009-08-27 09:39:01 +00:00
Pierre Joye
0c366503a6 - fix #48746, regression with file operaiton on path with junctions 2009-08-26 20:44:05 +00:00
Pierre Joye
bae3df7505 - fix #44683, popen crashes when an invalid mode is passed (works on 2k8/vista/win7) 2009-08-26 19:57:01 +00:00
Pierre Joye
eeb9429de5 - be sure that the directory flag is set when we save a path in the cache 2009-08-25 09:32:31 +00:00
Pierre Joye
056f0aea30 - fix #49047, touch may fail on directory 2009-08-25 09:16:53 +00:00
Pierre Joye
ebd24fc10f - sigh. that too (separate fix). 2009-08-24 20:33:36 +00:00