Commit Graph

661 Commits

Author SHA1 Message Date
Christoph M. Becker
d4927668bb Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78538: shmop memory leak
2020-01-03 18:13:44 +01:00
Christoph M. Becker
4c6ad099c6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78538: shmop memory leak
2020-01-03 18:13:04 +01:00
Christoph M. Becker
18172303f4 Fix #78538: shmop memory leak
If the descriptor's refcount drops to zero, we have to unmap the
respective file view, to avoid leaking memory.
2020-01-03 18:10:29 +01:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Christoph M. Becker
e0a213d98f Make MSVC happy again
MSVC complains about unsupported preprocessor syntax, so we employ the
same workaround as in zend_cpuinfo.h.
2019-09-20 12:51:03 +02:00
Dmitry Stogov
2aefd11211 Optimize access to thread local cache.
This patch saves one CPU instruction on each "_tsrm_ls_cache" access in ZTS CLI/CGI/FPM builds.
This reduce typical instruction sequence for EG(current_execute_data) access from 4 to 3 CPU instructions.
2019-09-18 14:03:07 +03:00
Christoph M. Becker
9ea39d15ab Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78282: atime and mtime mismatch
2019-08-06 17:28:11 +02:00
Christoph M. Becker
954543cec6 Fix #78282: atime and mtime mismatch
The fix for bug #78241 assumed that `time_t` would always be 64bit, but
actually is 32bit for x86.  We therefore enforce 64bit arithmetic to
avoid wrapping.

(cherry picked from commit bf242d58e7)
2019-08-06 17:25:54 +02:00
Christoph M. Becker
6e630fe79b Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78282: atime and mtime mismatch
2019-07-13 09:45:14 +02:00
Christoph M. Becker
bf242d58e7 Fix #78282: atime and mtime mismatch
The fix for bug #78241 assumed that `time_t` would always be 64bit, but
actually is 32bit for x86.  We therefore enforce 64bit arithmetic to
avoid wrapping.
2019-07-13 09:44:46 +02:00
Peter Kokot
930e38ec5c Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove tsrm_config_common.h
2019-07-13 01:58:38 +02:00
Peter Kokot
33994ebd95 Remove tsrm_config_common.h
- Checks and defines are not relevant for files that include it anymore
- Some code is not used anymore
- Defines are a bit duplicated in zend_portability.h and TSRM.h file
- MAXPATHLEN defs moved to zend_virtual_cwd.h
2019-07-13 01:58:01 +02:00
Nikita Popov
98495f7f30 Merge branch 'PHP-7.4' 2019-07-12 13:14:38 +02:00
Nikita Popov
709897c2a5 Remove unused tsrm_strtok_r() function
There is also a php_strtok_r() function, which is actually used,
but nothing uses the tsrm_strtok_r() variant...
2019-07-12 13:14:24 +02:00
Peter Kokot
f99adb4bb5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove TSRM/tsrm_config.w32.h
2019-07-10 21:20:10 +02:00
Peter Kokot
d63fdced2e Remove TSRM/tsrm_config.w32.h
The tsrm_config.w32.h file is a simple wrapper for already defined
symbols and includes elsewhere.

Closes GH-4383
2019-07-10 21:19:44 +02:00
Peter Kokot
b36b6c5fdf Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove PTHREADS_ASSIGN_VARS
2019-07-05 23:30:51 +02:00
Peter Kokot
1c9e8e8f6a Remove PTHREADS_ASSIGN_VARS
This simplifies TSRM build steps a bit and avoids doing unnecessary
steps:
- The `PTHREADS_CHECK_COMPILE` can called inside the for loops only
  since this is only where the `$pthreads_checked` variable is used.
- Assigning variables can be then done only in the configure.ac
  once.
- use `m4_include()` instead of the `sinclude()` in the middle of
  the build steps.
- The `$threads_result` variable is not used in the code or in
  extensions.
2019-07-05 23:26:20 +02:00
Christoph M. Becker
f71268ac67 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78241: touch() does not handle dates after 2038 in PHP 64-bit
2019-07-03 10:03:59 +02:00
Christoph M. Becker
b4c81be9c5 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78241: touch() does not handle dates after 2038 in PHP 64-bit
2019-07-03 10:03:14 +02:00
Christoph M. Becker
5e5b7cb4d4 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78241: touch() does not handle dates after 2038 in PHP 64-bit
2019-07-03 10:02:22 +02:00
Christoph M. Becker
44c8b7414c Fix #78241: touch() does not handle dates after 2038 in PHP 64-bit
`time_t` defaults to `_time64` (which is 64bit signed) even on x86, but
`Int32x32To64()` truncates it to signed 32bit.  We replace the macro
with the "manual" calculation.
2019-07-03 09:59:17 +02:00
Peter Kokot
b1ef50091d Remove some old BeOS artefacts
- checking for beos systems is no longer relevant in configure.ac
- usage of undefined constant BETHREADS removed.

Closes GH-4346
2019-07-02 22:08:54 +02:00
Peter Kokot
b757d49cb5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove TSRM_BASIC_CHECKS
2019-07-01 13:26:17 +02:00
Peter Kokot
30c1c53164 Remove TSRM_BASIC_CHECKS
This macro is not needed anymore. The AC_PROG_CC is done in the main
configure.ac file and the ranlib check is done by the bundled libtool
macros.

Closes GH-4339
2019-07-01 13:23:41 +02:00
Peter Kokot
98d0892dd8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Sync functions checks
2019-06-30 23:59:47 +02:00
Peter Kokot
9a3c8e51e3 Sync functions checks
Removed unused checks:
- mbsinit check removed, HAVE_MBSINIT removed (not used in php-src)
- mempcpy check removed, HAVE_MEMPCPY removed (not used in php-src anymore since
  560ed89bfb which uses PHP's own implementation)
- strpncpy check removed, added via a8c9e893b6 and
  not used.
- setpgid check removed since HAVE_SETPGID is not used

Moved to a central configure.ac:
- fpclass
- mbrlen moved to configure.ac (since the HAVE_MBRLEN is used accross the php-src)
- sigprocmask
- getcwd
- getwd
- glob
- strfmon
- nice

Duplicated checks removed:
- gethostname
- getlogin
- getpwuid_r
- socketpair

- mprotect check simplified
2019-06-30 23:57:54 +02:00
Joe Watkins
b98cd0719a
Merge branch 'PHP-7.4'
* PHP-7.4:
  implement tsrm_is_shutdown API
2019-06-28 10:27:39 +02:00
Joe Watkins
68485f8ab4
implement tsrm_is_shutdown API 2019-06-28 10:27:19 +02:00
Dmitry Stogov
7a236b6761 Attempt to fix JIT on Mac OSX ZTS build 2019-06-17 17:08:58 +03:00
Joe Watkins
5fd027e35c
Merge branch 'PHP-7.4'
* PHP-7.4:
  This reverts 0e5d4ea555 to fix the build on MacOSX
2019-06-11 15:15:31 +02:00
Joe Watkins
69190ce5c0
This reverts 0e5d4ea555 to fix the build on MacOSX
On Mac thread_local and __thread are not ABI compatible, in addition, thread_local
comes with additional overhead, __thread seems to be the most suitable linkage to use
regardless of c++/c
2019-06-11 15:13:27 +02:00
Nikita Popov
623eedbbd5 Merge branch 'PHP-7.4' 2019-06-04 16:14:46 +02:00
Nikita Popov
18060e5923 Merge branch 'PHP-7.3' into PHP-7.4 2019-06-04 16:14:26 +02:00
Nikita Popov
a4633b13d4 Merge branch 'PHP-7.2' into PHP-7.3 2019-06-04 16:14:14 +02:00
Nikita Popov
2d3bc71e89 Reload tsrmls_id in release builds as well
If TSRM is shut down and started again (something that phpdbg does),
then tsrmls_id needs to be reloaded everywhere. As tsrmls_id
update is a rare operation, doing that shouldn't be a problem.
2019-06-04 16:12:59 +02:00
Christoph M. Becker
66b0ba4ce0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove unused variable
2019-05-29 09:10:28 +02:00
Gabriel Caruso
8c7757c233 Remove unused variable 2019-05-29 09:09:17 +02:00
Peter Kokot
2cf90bb2f0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Normalize comments in *nix build system m4 files
2019-05-12 18:51:50 +02:00
Peter Kokot
75fb74860d Normalize comments in *nix build system m4 files
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
  favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
2019-05-12 18:43:03 +02:00
Peter Kokot
465c82b1af Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove TSRM configuration header
2019-04-29 22:35:24 +02:00
Peter Kokot
ce65d2354c Remove TSRM configuration header
TSRM configuration header file was once created by separate autoconf
build system for TSRM and is with the current code not directly needed
like this anymore.
2019-04-29 22:34:43 +02:00
Peter Kokot
cabd8c12d4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove unused TSRM/readdir.h header
2019-04-29 00:55:59 +02:00
Peter Kokot
b931dacc88 Remove unused TSRM/readdir.h header
This was once part of TSRM but then got refactored into the windows
implementation win32/readdir.h directly. Instead of including such files
directly code should use zend_virtual_cwd.h which is already part of the
php.h file.
2019-04-29 00:51:13 +02:00
Peter Kokot
d2e6c1aff1 Merge branch 'PHP-7.4'
* PHP-7.4:
  Move Autoconf Archive macros to a common m4 dir
2019-04-23 20:38:57 +02:00
Peter Kokot
beb58ca128 Move Autoconf Archive macros to a common m4 dir
In PHP the build dir is used as a directory for external macros
including Autoconf Archive macros.
2019-04-23 20:37:31 +02:00
Peter Kokot
e95a372f82 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove sinclude from tsrm.m4
2019-04-23 08:28:53 +02:00
Peter Kokot
07a95b4017 Remove sinclude from tsrm.m4
This was once part of a standalone TSRM build and is not used in current
build system anymore.
2019-04-23 08:27:11 +02:00
Nikita Popov
f89f67037a Merge branch 'PHP-7.4' 2019-04-11 10:42:05 +02:00
Nikita Popov
b213f13a26 Make tsrm_env_lock() void
We're not checking the return value and the NTS version of this
generates warnings. If we want to handle lock failures, we should
do a hard abort inside tsrm_env_lock() itself.
2019-04-11 10:40:54 +02:00