summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-08-12 16:58:52 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-08-12 17:12:28 +0200
commitf3fdf570b3cd3df14af3d698950d341623a97088 (patch)
treee119dd0998f13fdaa6e8adca2928416cda3cf8b4 /ext/pcre/php_pcre.c
parent9b43e29d9b55eafb4e063a0b2d817356f5b908b5 (diff)
downloadphp-git-f3fdf570b3cd3df14af3d698950d341623a97088.tar.gz
Intern alias old_name early
This is likely going to end up interned lateron at some point when the new_name is referenced somewhere. However, it may be that there are some uses that do not get interned before that. In this case we will intern a string that already have zval users, without updating the refcounted flag on those zvals. In particular this can happen with something like [Foo::class], where Foo is an imported symbol. The string it resolves to won't get interned right away, but may be interned later. use Foo as Bar; $x = [Bar::class]; var_dump(Bar::X); debug_zval_dump($x); // Will show negative refcount class Foo { const X = 1; } However, this doesn't really fix the root cause, there are probably other situations where something similar can occur.
Diffstat (limited to 'ext/pcre/php_pcre.c')
0 files changed, 0 insertions, 0 deletions