History log of /php-src/ext/ffi/tests/gh14286_1.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# c0de7214 05-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-14286 (ffi enum type (when enum has no name) make memory leak)

For top-level anonymous type definition we never store the declaration anywhere
else nor the type anywhere else.

Fix GH-14286 (ffi enum type (when enum has no name) make memory leak)

For top-level anonymous type definition we never store the declaration anywhere
else nor the type anywhere else.
The declaration keeps owning the type and it goes out of scope.
For anonymous fields this gets handled by the add_anonymous_field code that
removes the type from the declaration.
This patch does something similar in the parsing code when it is
detected we're dealing with an anonymous enum in a top-level declaration.

Closes GH-14839.

show more ...