Skip to content

Fix GH-12232: FPM: segfault dynamically loading extension without opache #12233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Zend/zend_globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ struct _zend_compiler_globals {
bool multibyte;
bool detect_unicode;
bool encoding_declared;
bool interned_strings_initialized;

zend_ast *ast;
zend_arena *ast_arena;
Expand Down
4 changes: 4 additions & 0 deletions Zend/zend_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ static zend_string* ZEND_FASTCALL zend_new_interned_string_request(zend_string *
return ret;
}

if (!CG(interned_strings_initialized)) {
zend_interned_strings_activate();
}
ret = zend_interned_string_ht_lookup(str, &CG(interned_strings));
if (ret) {
zend_string_release(str);
Expand Down Expand Up @@ -339,6 +342,7 @@ static zend_string* ZEND_FASTCALL zend_string_init_existing_interned_request(con
ZEND_API void zend_interned_strings_activate(void)
{
zend_init_interned_strings_ht(&CG(interned_strings), 0);
CG(interned_strings_initialized) = true;
}

ZEND_API void zend_interned_strings_deactivate(void)
Expand Down