History log of /PHP-8.1/Zend/zend_portability.h (Results 1 – 25 of 128)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 55514a11 10-Jan-2023 Kévin Dunglas

fix: indirect_return compilation warning

Closes GH-10274

Signed-off-by: George Peter Banyard <girgias@php.net>


Revision tags: php-8.1.7RC1
# 040a37d3 26-Apr-2022 Chen

Add IBT support for fiber

Indirect Branch Tracking (IBT) is part of Intel's Control-Flow
Enforcement Technology (CET). IBT is hardware based, forward edge
Control-Flow-Integrity mech

Add IBT support for fiber

Indirect Branch Tracking (IBT) is part of Intel's Control-Flow
Enforcement Technology (CET). IBT is hardware based, forward edge
Control-Flow-Integrity mechanism where any indirect CALL/JMP must target
an ENDBR instruction or suffer #CP.

This commit adds IBT support for fiber:
1. Add endbr32/64 in assembly
2. Inform compiler jump_fcontext may return via indirect branch

Furthermore:
gcc support CET since v8.1 and set it to default since gcc 11. That is,
the ELF header of sapi/cli/php has a property named IBT. However, such
property is lost since PHP8.1 because the assembly introduced by Fiber.
This commit also fixes this.

Closes GH-8339

Signed-off-by: Chen, Hu <hu1.chen@intel.com>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

show more ...

Revision tags: php-8.1.4RC1, php-8.1.3, php-8.1.2RC1, php-8.1.0, php-7.3.33
# 5d2f3d45 04-Nov-2021 Nikita Popov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Suppress unused label warnings in SWITCH VM


# ee377744 04-Nov-2021 Nikita Popov

Suppress unused label warnings in SWITCH VM

While we avoid emitting labels for handlers that are not referenced
from anywhere else, we do not perform a fine-grained analysis on
used

Suppress unused label warnings in SWITCH VM

While we avoid emitting labels for handlers that are not referenced
from anywhere else, we do not perform a fine-grained analysis on
used specializations, so some of the specialization labels may not
be used. Use ATTRIBUTE_UNUSED_LABEL to suppress the warning. Drop
"cold" from the definition of this attribute, as it is completely
unrelated.

show more ...

Revision tags: php-7.3.32, php-7.3.31
# d630bbdc 26-Aug-2021 Patrick Allaert

Fixed Dmitry Stogov email

Noticed by Luc Vieillescazes

Revision tags: php-7.3.30, php-7.3.29, php-7.3.28
# c276c16b 26-Apr-2021 Aaron Piotrowski

Implement Fibers

RFC: https://wiki.php.net/rfc/fibers

Closes GH-6875.

Revision tags: php-7.3.27, php-7.3.26, php-7.3.26RC1, php-7.3.25, php-7.3.25RC1, php-7.3.24, php-7.3.24RC1
# 5caaf40b 29-Sep-2020 George Peter Banyard

Introduce pseudo-keyword ZEND_FALLTHROUGH

And use it instead of comments

# 3e01f5af 15-Jan-2021 Nikita Popov

Replace zend_bool uses with bool

We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool

Replace zend_bool uses with bool

We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool is retained as an alias.

show more ...

Revision tags: php-7.3.23, php-7.3.23RC1
# c3299d7d 02-Sep-2020 Frank Du

X86: Fast CRC32 computation using PCLMULQDQ instruction

Based on:
"Fast CRC Computation for Generic Polynomials Using PCLMULQDQ Instruction"
V. Gopal, E. Ozturk, et al., 2009, http:/

X86: Fast CRC32 computation using PCLMULQDQ instruction

Based on:
"Fast CRC Computation for Generic Polynomials Using PCLMULQDQ Instruction"
V. Gopal, E. Ozturk, et al., 2009, http://intel.ly/2ySEwL0

Signed-off-by: Frank Du <frank.du@intel.com>

Closes GH-6018

show more ...

# a8687804 01-Sep-2020 Nikita Popov

Disable ifunc resolvers under dataflow sanitizer

As with other sanitizers, this is not supported.

Revision tags: php-7.3.22, php-7.3.22RC1, php-7.3.21, php-7.3.21RC1, php-7.3.20
# 917e28d7 30-Jun-2020 Nikita Popov

Assume offsetof() exists

This is a standard C macro. Define XtOffsetOf as an alias for
compatibility, as this is the name we use in most code right now.

Revision tags: php-7.3.20RC1
# 92c4b065 16-Jun-2020 Christoph M. Becker

Use ZEND_UNREACHABLE() instead of ZEND_ASSERT(0)

Instead of marking unreachable code with `ZEND_ASSERT(0)`, we introduce
`ZEND_UNREACHABLE()`, so that MSVC which does not consider `asser

Use ZEND_UNREACHABLE() instead of ZEND_ASSERT(0)

Instead of marking unreachable code with `ZEND_ASSERT(0)`, we introduce
`ZEND_UNREACHABLE()`, so that MSVC which does not consider `assert(0)`
to mark unreachable code does no longer trigger C4715[1] warnings in
debug builds. This may be useful for other compilers as well.

[1] <https://docs.microsoft.com/de-de/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4715?view=vs-2019>

show more ...

Revision tags: php-7.3.19, php-7.4.7RC1, php-7.3.19RC1
# 68dd6cc9 20-May-2020 Christoph M. Becker

Control VCRT leak reporting via environment variable in debug builds

Formerly, this had to be enabled by passing the configuration flag
`--enable-crt-debug`; now it can be enabled by set

Control VCRT leak reporting via environment variable in debug builds

Formerly, this had to be enabled by passing the configuration flag
`--enable-crt-debug`; now it can be enabled by setting the environment
variable `PHP_WIN32_DEBUG_HEAP`. The advantage is that it is no longer
necessary to do separate builds, at the cost of a very minor
performance penalty during process startup.

show more ...

# 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 ...

# a582931f 20-May-2020 Christoph M. Becker

Revert "Revert "Merge branch 'PHP-7.4'""

This reverts commit 28e650a, which reverted commit 046dcfb, which had
to be reverted due to phpdbg issues. The culprit was that we did not
p

Revert "Revert "Merge branch 'PHP-7.4'""

This reverts commit 28e650a, which reverted commit 046dcfb, which had
to be reverted due to phpdbg issues. The culprit was that we did not
properly reset `zend_handler_table` to `NULL`, which is required for
SAPIs which may restart the engine after shutdown.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=28e650abf8097a28789a005e5028fee095359583>
[2] <http://git.php.net/?p=php-src.git;a=commit;h=046dcfb531e242d36a7af2942b9b148290c3c7fe>

show more ...

# 25acc4a6 12-May-2020 George Peter Banyard

Fix [-Wundef] warning in Zend folder

# b1116743 11-May-2020 Nikita Popov

Only use ifunc resolvers if __builtin_cpu_supports+init available

If either of them is not available, the use of zend_cpu_supports()
inside ifunc resolvers may not be safe.

Revision tags: php-7.3.18RC1, php-7.2.30, php-7.3.17, php-7.3.17RC1, php-7.3.18, php-7.3.16, php-7.3.16RC1, php-7.3.15RC1, php-7.3.15, php-7.3.14, php-7.3.14RC1, php-7.3.13, php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1
# 5dc9418a 31-Oct-2019 Nikita Popov

Reapply "Remove configure checks for supported instruction sets"

I reverted this previously for 7.4 because of bug #78769. Relanding
it now for master, because I still believe that this

Reapply "Remove configure checks for supported instruction sets"

I reverted this previously for 7.4 because of bug #78769. Relanding
it now for master, because I still believe that this change is
right, and if it causes complications, those indicate a bug elsewhere.

---

These were checking whether the instruction set is supported by
the host CPU, however they were only used to condition on whether
this instruction set is targeted at all. It would still use dynamic
dispatch (e.g. based on ifunc resolvers) to select the actual
implementation. Whether the target is guaranteed to support the
instruction set without dispatch is determined based on pre-defined
macros like __SSE2__.

This removes the configure-time builtin cpu checks to remove
confusion. Additionally this allows targeting an architecture that
is newer than the host architecture.

show more ...

# 28e650ab 23-Jan-2020 Christoph M. Becker

Revert "Merge branch 'PHP-7.4'"

This reverts commit 046dcfb531e242d36a7af2942b9b148290c3c7fe, due to
segfaults on Travis. This needs to be investigated.

# 046dcfb5 23-Jan-2020 Christoph M. Becker

Merge branch 'PHP-7.4'

* PHP-7.4:
Make MSVCRT memory leak checking usable for the test suite


# 4130fe43 15-Jan-2020 Christoph M. Becker

Make MSVCRT memory leak checking usable for the test suite

While basic support for MSVCRT debugging has been added long
ago[1], the leak checking is not usable for the test suite, becaus

Make MSVCRT memory leak checking usable for the test suite

While basic support for MSVCRT debugging has been added long
ago[1], the leak checking is not usable for the test suite, because we
are no longer calling `xmlCleanupParser()` on RSHUTDOWN of
ext/libxml[2], and therefore a few bogus leaks are reported whenever
ext/libxml is unloaded.

We therefore ignore memory leaks for this case. We introduce
`ZEND_IGNORE_LEAKS_BEGIN()` and `ZEND_IGNORE_LEAKS_END()` to keep
those ignores better readable, and also because these *might* be
useful for other leak checkers as well.

We also explicitly free the `zend_handlers_table` and the `p5s` to
avoid spurious leak reports.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=d756e1db2324c1f4ab6f9b52e329959ce6a02bc3>
[2] <http://git.php.net/?p=php-src.git;a=commit;h=8742276eb3905eb97a585417000c7b8df85006d4>

show more ...

# 1e62e627 16-Jan-2020 Christoph M. Becker

Merge branch 'PHP-7.4'

* PHP-7.4:
Disable optimizations for ASan instrumented builds


# c9908ee5 27-Dec-2019 Christoph M. Becker

Disable optimizations for ASan instrumented builds

ASan instrumentation does not support the MSVC debug runtime, but still
it does not make sense to enable optimizations for such builds,

Disable optimizations for ASan instrumented builds

ASan instrumentation does not support the MSVC debug runtime, but still
it does not make sense to enable optimizations for such builds, since
they are not meant for production usage anyway, and although memory
corruption issues are still found in optimized builds, the generated
diagnostics are close to being useless, and apparently sometimes even
outright wrong. Therefore, we disable all optimizations for ASan
instrumented builds.

We also introduce and use `ZEND_WIN32_NEVER_INLINE` for ASan enabled
builds to avoid inlining of functions, so we get even better
diagnostics.

show more ...

# 9118a96f 14-Jan-2020 George Peter Banyard

Remove va_copy from zend_portability as it's always available since C99

# 1c4ad17c 04-Dec-2019 George Peter Banyard

Move isinf, isnan, and isfinite to zend_portability.h

Closes GH-4966

123456