mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

The constant name is usually interend. Without opcache, compilation always interns strings. Without opcache, compilation does not intern (new) strings, but persisting of script does. If a script is not stored in shm the constant name will not be interned. The building of enum backing stores was missing a addref for the constant name, leading to a double-free when releasing constants and backing stores of enums. Fixes GH-12366 Closes GH-12405
7 lines
74 B
PHP
7 lines
74 B
PHP
<?php
|
|
|
|
enum Level: int {
|
|
case Debug = 100;
|
|
}
|
|
|
|
var_dump(Level::Debug);
|