1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
Ilija Tovilo 93fc88e808 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
2022-05-28 10:51:17 +02:00
..
2021-10-08 10:31:24 +02:00