History log of /PHP-8.1/ext/zend_test/test.stub.php (Results 1 – 25 of 44)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 78fba9cb 08-Nov-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-12628: The gh11374 test fails on Alpinelinux

Closes GH-12636.


# 62228a25 31-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Disable global state test on Windows

It looks like the config.w32 uses CHECK_HEADER_ADD_INCLUDE to add the include
path to libxml into the search path.
That doesn't happen in zend-te

Disable global state test on Windows

It looks like the config.w32 uses CHECK_HEADER_ADD_INCLUDE to add the include
path to libxml into the search path.
That doesn't happen in zend-test.
To add to the Windows trouble, libxml is statically linked in, ext/libxml can
only be built statically but ext/zend-test can be built both statically and
dynamically.
So the regression tests won't work in all possible configurations anyway on Windows.
All of this is no problem on Linux because it just uses dynamic linking
and pkg-config, without any magic.

Signed-off-by: Ben Ramsey <ramsey@php.net>

show more ...


# c283c3ab 15-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Sanitize libxml2 globals before parsing

Fixes GHSA-3qrf-m4j2-pcrr.

To parse a document with libxml2, you first need to create a parsing context.
The parsing context contains par

Sanitize libxml2 globals before parsing

Fixes GHSA-3qrf-m4j2-pcrr.

To parse a document with libxml2, you first need to create a parsing context.
The parsing context contains parsing options (e.g. XML_NOENT to substitute
entities) that the application (in this case PHP) can set.
Unfortunately, libxml2 also supports providing default set options.
For example, if you call xmlSubstituteEntitiesDefault(1) then the XML_NOENT
option will be added to the parsing options every time you create a parsing
context **even if the application never requested XML_NOENT**.

Third party extensions can override these globals, in particular the
substitute entity global. This causes entity substitution to be
unexpectedly active.

Fix it by setting the parsing options to a sane known value.
For API calls that depend on global state we introduce
PHP_LIBXML_SANITIZE_GLOBALS() and PHP_LIBXML_RESTORE_GLOBALS().
For other APIs that work directly with a context we introduce
php_libxml_sanitize_parse_ctxt_options().

show more ...


# 0ac55e9b 15-Apr-2023 Jakub Zelenka

Add zend_test_crash funtion to segfault PHP process

This is useful for testing PHP-FPM handling of crashed children.

Closes GH-11082


# 8a9b80cf 07-Mar-2023 Derick Rethans

Add test case


# ff62d117 04-Mar-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-8646: Memory leak PHP FPM 8.1

Fixes GH-8646
See https://github.com/php/php-src/issues/8646 for thorough discussion.

Interned strings that hold class entries can get a cor

Fix GH-8646: Memory leak PHP FPM 8.1

Fixes GH-8646
See https://github.com/php/php-src/issues/8646 for thorough discussion.

Interned strings that hold class entries can get a corresponding slot in map_ptr for the CE cache.
map_ptr works like a bump allocator: there is a counter which increases to allocate the next slot in the map.

For class name strings in non-opcache we have:
- on startup: permanent + interned
- on request: interned
For class name strings in opcache we have:
- on startup: permanent + interned
- on request: either not interned at all, which we can ignore because they won't get a CE cache entry
or they were already permanent + interned
or we get a new permanent + interned string in the opcache persistence code

Notice that the map_ptr layout always has the permanent strings first, and the request strings after.
In non-opcache, a request string may get a slot in map_ptr, and that interned request string
gets destroyed at the end of the request. The corresponding map_ptr slot can thereafter never be used again.
This causes map_ptr to keep reallocating to larger and larger sizes.

We solve it as follows:
We can check whether we had any interned request strings, which only happens in non-opcache.
If we have any, we reset map_ptr to the last permanent string.
We can't lose any permanent strings because of map_ptr's layout.

Closes GH-10783.

show more ...


# 6d96f39a 01-Jun-2022 Máté Kocsis

Get rid of invalid assertion and cleanup zend_call_method

Closes GH-8672

# 01d84545 31-May-2022 Sara Golemon

Verify internal types before abandoning call frame

An internal caller executing a builtin method with
a static return type will lose context if we drop
our frame before performing th

Verify internal types before abandoning call frame

An internal caller executing a builtin method with
a static return type will lose context if we drop
our frame before performing the validation.

show more ...

# 93fc88e8 25-May-2022 Ilija Tovilo

Fix Enum::from/tryFrom memory leak in JIT for internal enums

when passing an int to a string enum. Previously, the int was coerced to
a string. The JIT skips parameter clean up when unne

Fix Enum::from/tryFrom memory leak in JIT for internal enums

when passing an int to a string enum. Previously, the int was coerced to
a string. The JIT skips parameter clean up when unnecessary. In this
particular case, passing int to from(int|string) normally doesn't cause
a coercion so no dtor for the $value zval is generated.

To circumvent this we avoid coersion by explicitly allowing ints and
converting them to strings ourselves. Then we can free it appropriately.

See GH-8518
Closes GH-8633

show more ...

Revision tags: php-8.1.7RC1
# 510061b5 03-May-2022 Máté Kocsis

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix get_function_or_method_name when included file is scoped


# 74924ada 03-May-2022 vajexal <72415539+vajexal@users.noreply.github.com>

Fix get_function_or_method_name when included file is scoped (#8467)

# 67b372e2 07-Mar-2022 Bob Weinand

Merge branch 'PHP-8.0' into PHP-8.1


Revision tags: php-8.1.4RC1, php-8.1.3
# 070012d6 09-Feb-2022 Tim Düsterhus

Add tests for function parameter attributes to ext/zend_test

These tests verify the correct workings of the previous fixes:

- Parameter attributes for native functions should not le

Add tests for function parameter attributes to ext/zend_test

These tests verify the correct workings of the previous fixes:

- Parameter attributes for native functions should not leak memory.
- Parameter attributes for native functions should behave as expected.

show more ...

Revision tags: php-8.1.2RC1, php-8.1.0, php-7.3.33
# 277caa1d 09-Nov-2021 Nikita Popov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Add string return type to __toString() of internal classes


# a551b083 09-Nov-2021 Nikita Popov

Add string return type to __toString() of internal classes

Same as with userland classes, automatically add a string return
type to __toString() methods in internal classes, so the signa

Add string return type to __toString() of internal classes

Same as with userland classes, automatically add a string return
type to __toString() methods in internal classes, so the signature
is compatible with Stringable.

show more ...

Revision tags: php-7.3.32
# 51a9c68e 21-Oct-2021 Bob Weinand

Merge branch 'PHP-8.0' into PHP-8.1


# 471102ed 21-Oct-2021 Bob Weinand

Add ZEND_API for weakmap functionality via zend_weakrefs_hash_add/del

Closes GH-7600.

Revision tags: php-7.3.31
# 4483ecf5 02-Sep-2021 Máté Kocsis

Properly escape the default value of string properties and enum cases

# 32d48212 31-Aug-2021 Nikita Popov

Support generating internal enum decl from stubs

# eaac77f4 31-Aug-2021 Go Kudo

Fix nested namespaced typed property in gen_stub.php (#7418)

Property escape namespaced class name in property types.

Revision tags: php-7.3.30
# a374230c 22-Jul-2021 Nikita Popov

Add support for internal enums

This adds support for internal enums with the same basic approach
as userland enums. Enum values are stored as CONSTANT_AST and
objects created during

Add support for internal enums

This adds support for internal enums with the same basic approach
as userland enums. Enum values are stored as CONSTANT_AST and
objects created during constant updating at runtime. This means
that we need to use mutable_data for internal enums.

This just adds basic support and APIs, it does not include the
stubs integration from #7212.

Closes GH-7302.

show more ...

# fc56de11 22-Jul-2021 Máté Kocsis

Add support for generating readonly properties via stubs (#7297)

# b3828836 20-Jul-2021 Máté Kocsis

Indent stubs inside global namespace blocks (#7261)

Revision tags: php-7.3.29
# fcd18757 10-May-2021 Máté Kocsis

Add reproducer for possible issue with object return type inheritance (#6961)

Fix early inheritance

Co-authored-by: Joe Watkins <krakjoe@php.net>

Revision tags: php-7.3.28
# 803779e8 16-Feb-2021 Máté Kocsis

Add support for generating properties with union type of multiple classes

Closes GH-6701

12