Skip to content

fix erroneous type inference for static class fields of array type - #1667

Open
apolyakov wants to merge 1 commit into
masterfrom
apolyakov/fix-wrong-array-type-inference
Open

fix erroneous type inference for static class fields of array type#1667
apolyakov wants to merge 1 commit into
masterfrom
apolyakov/fix-wrong-array-type-inference

Conversation

@apolyakov

Copy link
Copy Markdown
Contributor

A static field's init value is stored in php globals and is reset via hard_reset_var() on every request startup, where memory allocations are forbidden; its constant initializer must therefore have exactly the same C++ type as the field itself (otherwise a converting copy_from() is generated, which allocates memory and crashes)

A static field's init value is stored in php globals and is reset via
hard_reset_var() on every request startup, where memory allocations are
forbidden; its constant initializer must therefore have exactly the same C++
type as the field itself (otherwise a converting copy_from() is generated,
which allocates memory and crashes)
@apolyakov apolyakov added this to the next milestone Aug 1, 2026
@apolyakov apolyakov self-assigned this Aug 1, 2026
@apolyakov apolyakov added bug Something isn't working compiler Feature related to compiler k2 Affects compiler or runtime in K2 mode kphp Affects compiler or runtime in default mode (not K2) labels Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working compiler Feature related to compiler k2 Affects compiler or runtime in K2 mode kphp Affects compiler or runtime in default mode (not K2)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant