Skip to content

Setting a PHP::GLOBALS value makes a segfault #234

Description

@goddanao

Hello, trying to set a default global value using a static method cause a segfault.
Inspecting the code, seems that on Global.cpp -> Global &Global::update() the active_symbol_table isn't already built.
Adding this check before the zend_hash_add solves the segfault, but when i try to read this value with PHP::GLOBALS it's always null (maybe because Globals::operator[] read from symbol_table and not from active_symbol_table ???).

if(!EG(active_symbol_table))
  zend_rebuild_symbol_table(TSRMLS_C);

I'm missing something?
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions