History log of /PHP-8.3/TSRM/tsrm_win32.c (Results 1 – 25 of 176)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# f303840a 22-Sep-2024 Christoph M. Becker

Prevent closing of unrelated handles

If our `shmget()` fails for certain reasons, the segment handle is
closed. However, the handle might be reused by Windows, and as such we
must n

Prevent closing of unrelated handles

If our `shmget()` fails for certain reasons, the segment handle is
closed. However, the handle might be reused by Windows, and as such we
must not close it again when shutting down the TSRM.

Closes GH-15984.

show more ...

# 39a32665 28-Jun-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-14537: shmop Windows 11 crashes the process

The error handling code isn't entirely right in two places.
One of the code blocks is dead because of an always-false condition, and

Fix GH-14537: shmop Windows 11 crashes the process

The error handling code isn't entirely right in two places.
One of the code blocks is dead because of an always-false condition, and
another code block is missing the assignment of a NULL pointer.

Getting the exact same behaviour is not entirely possible because you
can't extend the size of a shared memory region after it was made with
the Windows APIs we use, unless we destroy the region and recreate it,
but that has other consequences.
However, it certainly shouldn't crash.

Closes GH-14707.

show more ...

# 8ad81c0e 07-Feb-2023 Dmitry Stogov

Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
ext/opcache/zend_jit: cast function to fix -Wincompatible-pointer-types (#10527)


# afbb28df 07-Feb-2023 Max Kellermann

ext/opcache/zend_jit: cast function to fix -Wincompatible-pointer-types (#10527)

* ext/opcache/zend_jit: cast function to fix -Wincompatible-pointer-types

Regression by commit a2119

ext/opcache/zend_jit: cast function to fix -Wincompatible-pointer-types (#10527)

* ext/opcache/zend_jit: cast function to fix -Wincompatible-pointer-types

Regression by commit a21195650e53e34266806a8c379dd5a91f0dbb61

* TSRM/win32: fix ts_allocate_dtor cast

The dtor was casted to ts_allocate_ctor; luckily, ts_allocate_dtor and
ts_allocate_ctor just happen to be the same type.

show more ...

# 4631e9de 13-Dec-2022 Christoph M. Becker

shmget() with IPC_CREAT must not create 0 size SHM

The recently committed fix for GH-9944 did only indirectly cater to
that, namely because in this case `CreateFileMapping()` with a zero

shmget() with IPC_CREAT must not create 0 size SHM

The recently committed fix for GH-9944 did only indirectly cater to
that, namely because in this case `CreateFileMapping()` with a zero
size couldn't be created. As of PHP 8.2.0, the mappings of the actual
SHM and the info segment have been merged, so creating a zero size SHM
would be possible unless we explicitly prohibit this.

show more ...

# 9089e159 13-Dec-2022 Christoph M. Becker

Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
Fix Windows shmget() wrt. IPC_PRIVATE


# 7a983e28 15-Nov-2022 Tyson Andre

Fix Windows shmget() wrt. IPC_PRIVATE

Fixes #9944

https://man7.org/linux/man-pages/man2/shmget.2.html notes

The name choice IPC_PRIVATE was perhaps unfortunate, IPC_NEW

Fix Windows shmget() wrt. IPC_PRIVATE

Fixes #9944

https://man7.org/linux/man-pages/man2/shmget.2.html notes

The name choice IPC_PRIVATE was perhaps unfortunate, IPC_NEW
would more clearly show its function.

Closes GH-9946.

show more ...

# 79d4fdad 02-Nov-2022 Christoph M. Becker

Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
Fix potential NULL pointer dereference Windows shm*() functions


# 8bf6266e 02-Nov-2022 Christoph M. Becker

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix potential NULL pointer dereference Windows shm*() functions


# d1c9ff56 02-Nov-2022 Christoph M. Becker

Fix potential NULL pointer dereference Windows shm*() functions

`shm_get()` (not to be confused with `shmget()`) returns `NULL` if
reallocation fails; we need to cater to that when calli

Fix potential NULL pointer dereference Windows shm*() functions

`shm_get()` (not to be confused with `shmget()`) returns `NULL` if
reallocation fails; we need to cater to that when calling the function.

Closes GH-9872.

show more ...

# 1e3915c8 02-Nov-2022 Christoph M. Becker

Fix GH-9829: Bug in refactoring Windows shmat() function

`shm->addr` cannot be `NULL` here, so the whole check is completely
pointless.

Given that this is merely a clean-up and

Fix GH-9829: Bug in refactoring Windows shmat() function

`shm->addr` cannot be `NULL` here, so the whole check is completely
pointless.

Given that this is merely a clean-up and not an actual bug fix, we do
without a NEWS entry.

Closes GH-9873.

show more ...

Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1, php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30
# d7bdc040 27-May-2022 Christoph M. Becker

Join shm_pair.info and .segment of Windows shm implementation

There is not much point in having two distinct file mappings; since the
info mapping is very small and of fixed size, we can

Join shm_pair.info and .segment of Windows shm implementation

There is not much point in having two distinct file mappings; since the
info mapping is very small and of fixed size, we can put it at the
beginning of a single mapping. Besides the obvious resource savings,
that also simplifies the error handling.

Closes GH-8648.

show more ...

Revision tags: php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28, php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1, php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1
# 404bed1a 02-Sep-2021 Christoph M. Becker

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix #81407: shmop_open won't attach and causes php to crash


# 58ad403c 02-Sep-2021 Christoph M. Becker

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Fix #81407: shmop_open won't attach and causes php to crash


# f3d24af7 02-Sep-2021 Christoph M. Becker

Fix #81407: shmop_open won't attach and causes php to crash

We need to allocate buffers for the file mapping names which are large
enough for all potential keys (`key_t` is defined as `i

Fix #81407: shmop_open won't attach and causes php to crash

We need to allocate buffers for the file mapping names which are large
enough for all potential keys (`key_t` is defined as `int` on Windows).

Regarding the test: it's probably never a good idea to use hard-coded
keys (should always use `ftok()` instead), but to reliably reproduce
this Windows specific issue we need to, and it shouldn't be an issue on
that OS.

Closes GH-7448.

show more ...

Revision tags: php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22, php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29, php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1, php-8.0.7, php-7.4.20, php-8.0.7RC1, php-7.4.20RC1
# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...

Revision tags: php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5, php-8.0.5RC1, php-7.4.18RC1
# 462da6e0 31-Mar-2021 Josh Soref

Fix spelling and grammar mistakes

This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

Fix spelling and grammar mistakes

This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

The action reports that the changes in this PR would make it happy: jsoref@602417c

Closes GH-6822.

show more ...

Revision tags: php-8.0.4RC1, php-7.4.17RC1, php-8.0.3, php-7.4.16, php-8.0.3RC1, php-7.4.16RC1, php-8.0.2, php-7.4.15, php-7.3.27, php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1, php-8.0.1, php-7.4.14, php-7.3.26, php-7.4.14RC1, php-8.0.1RC1, php-7.3.26RC1, php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23, php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1, php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20, php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, php-7.3.19
# 88355dd3 07-Jun-2020 twosee

Constify char * arguments of APIs

Closes GH-5676.

# 5a04796f 27-May-2020 Christoph M. Becker

Fix MSVC level 1 (severe) warnings

We fix (hopefully) all instances of:

* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4005>

Fix MSVC level 1 (severe) warnings

We fix (hopefully) all instances of:

* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4005>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4024>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4028>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4047>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4087>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4090>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4273>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4312>

`zend_llist_add_element()` and `zend_llist_prepend_element()` now
explicitly expect a *const* pointer.

We use the macro `ZEND_VOIDP()` instead of a `(void*)` cast to suppress
C4090; this should prevent accidential removal of the cast by
clarifying the intention, and makes it easier to remove the casts if
the issue[1] will be resolved sometime.

[1] <https://developercommunity.visualstudio.com/content/problem/390711/c-compiler-incorrect-propagation-of-const-qualifie.html>

show more ...

Revision tags: php-7.4.7RC1, php-7.3.19RC1
# 0e4c7b32 12-May-2020 George Peter Banyard

utime is always available on Windows

Therefore drop useless preprocessor if check

Closes GH-5563

Revision tags: php-7.4.6, php-7.2.31
# e749db40 05-May-2020 Christoph M. Becker

Merge branch 'PHP-7.4'

* PHP-7.4:
Fix #79566: Private SHM is not private on Windows


# 80b50061 05-May-2020 Christoph M. Becker

Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
Fix #79566: Private SHM is not private on Windows


# f33cf52f 05-May-2020 Christoph M. Becker

Fix #79566: Private SHM is not private on Windows

We map the POSIX semantics of `IPC_PRIVATE` by creating unnamed file
mapping objects on Windows. While that is not particularly useful

Fix #79566: Private SHM is not private on Windows

We map the POSIX semantics of `IPC_PRIVATE` by creating unnamed file
mapping objects on Windows. While that is not particularly useful for
ext/shmop, which is the only bundled extension which uses `shmget()`,
it may be useful for external extensions.

show more ...

Revision tags: php-7.4.6RC1, php-7.3.18RC1, php-7.2.30, php-7.4.5, php-7.3.17, php-7.4.5RC1, php-7.3.17RC1, php-7.3.18, php-7.4.4, php-7.2.29, php-7.3.16, php-7.4.4RC1, php-7.3.16RC1, php-7.4.3, php-7.2.28, php-7.3.15RC1, php-7.4.3RC1, php-7.3.15, php-7.2.27, php-7.4.2
# 9ca449e0 21-Jan-2020 Christoph M. Becker

Make quoting of cmd execution functions consistent

While the `$command` passed to `proc_open()` had to be wrapped in
double-quotes manually, that was implicitly done for all other
pr

Make quoting of cmd execution functions consistent

While the `$command` passed to `proc_open()` had to be wrapped in
double-quotes manually, that was implicitly done for all other
program execution functions. This could easily introduce bugs and
even security issues when switching from one to another program
execution function.

Furthermore we ensure that the additional quotes are always
unwrapped regardless of what is passed as `$command` by passing
the `/s` flag to cmd.exe. As it was, `shell_exec('path with
spaces/program.exe')` did execute program.exe, but adding an
argument (`shell_exec('path with spaces/program.exe -h)`) failed
to execute program.exe, because cmd.exe stripped the additional
quotes.

While these changes obviously can cause BC breaks, we feel that in
the long run the benefits of having consistent behavior for all
program execution functions outweighs the drawbacks of potentially
breaking some code now.

show more ...

Revision tags: php-7.3.14, php-7.3.14RC1, php-7.4.2RC1
# d4927668 03-Jan-2020 Christoph M. Becker

Merge branch 'PHP-7.4'

* PHP-7.4:
Fix #78538: shmop memory leak


12345678